The CDataLoader class provides support for loading a file in a piecwise fashion (streaming) More...
#include <DataLoader.h>
Public Member Functions | |
CDataLoader (CHoops3dStreamCtrl *ctrl) | |
void | Init (HCtrlView *view) |
bool | StartDownload (BSTR filename, bool isStreamable=true) |
bool | OnData (BYTE *pBytes, DWORD dwSize) |
bool | ProcessNextChunk () |
bool | GetDownloadInProgress () |
bool | GetDownloadComplete () |
long | GetDownloadDataReceived () |
long | GetDownloadDataTotalSize () |
void | AbortDownload () |
void | SetDownloadStatus (int ulProgressMax) |
bool | GetRestoreCamera () |
void | SetRestoreCamera (bool restorecamera) |
void | SetTreeControlXML (char *data) |
char * | GetTreeControlXML () |
struct vlist_s * | GetModelStructureTypeList () |
ModelStructureObject * | GetModelStructureObjectTree () |
int | FilterIdentifier (int identifier, char *type) |
ModelStructureObject * | FindModelStructureObject (ModelStructureObject *mso, int identifier) |
void | GetXMLForItemChildren (int identifier, char *(&text)) |
ModelStructureObject * | FindModelStructureObject (ModelStructureObject *mso, char *path) |
void | GetXMLForItemChildren (ModelStructureObject *mso, char *(&text)) |
void | GetXMLForItemChildren (char *path, char *(&text)) |
void | GetPathFromIdentifier (int identifier, char *path) |
HCtrlView * | GetView () |
CHoops3dStreamCtrl * | GetControl () |
Public Attributes | |
DWORD | m_ParsingThread |
Protected Member Functions | |
TK_Status | ProcessData (BYTE *pBytes, DWORD dwSize) |
void | ClearCachedDataList () |
Protected Attributes | |
vector< databuffer * > | m_CachedDataList |
HCtrlView * | m_pView |
bool | m_bDataIsStreamable |
bool | m_bDownloadInProgress |
long | m_DataReceived |
long | m_DataReceiveSize |
bool | m_bAbortDownload |
bool | m_bDataProcessingComplete |
bool | m_bRestoreCamera |
The CDataLoader class provides support for loading a file in a piecwise fashion (streaming)
By chopping up data into smaller chunks the CDataLoader class allows the streaming of HSF data while not interrupting any user interaction
CDataLoader::CDataLoader | ( | CHoops3dStreamCtrl * | ctrl | ) |
Class Constructor
ctrl | Pointer to Control Class |
void CDataLoader::AbortDownload | ( | ) | [inline] |
Abort current download
void CDataLoader::ClearCachedDataList | ( | ) | [protected] |
Free data cache
int CDataLoader::FilterIdentifier | ( | int | identifier, |
char * | type | ||
) |
Filters Identifier based on model structure type. (example: an identifier pointing to an edge with a face as a filter will return the identifier of its parent face
ModelStructureObject* CDataLoader::FindModelStructureObject | ( | ModelStructureObject * | mso, |
int | identifier | ||
) |
ModelStructureObject* CDataLoader::FindModelStructureObject | ( | ModelStructureObject * | mso, |
char * | path | ||
) |
CHoops3dStreamCtrl* CDataLoader::GetControl | ( | ) | [inline] |
bool CDataLoader::GetDownloadComplete | ( | ) | [inline] |
long CDataLoader::GetDownloadDataReceived | ( | ) | [inline] |
long CDataLoader::GetDownloadDataTotalSize | ( | ) | [inline] |
bool CDataLoader::GetDownloadInProgress | ( | ) | [inline] |
ModelStructureObject* CDataLoader::GetModelStructureObjectTree | ( | ) | [inline] |
Returns Pointer to the Model Structure Tree describing the model structure of the currently loaded hsf file
struct vlist_s* CDataLoader::GetModelStructureTypeList | ( | ) | [inline, read] |
Returns Pointer to a list of Model Structure Types (body, shell, face,etc.)
void CDataLoader::GetPathFromIdentifier | ( | int | identifier, |
char * | path | ||
) |
Returns full path for given identifier
identifier | Identifier to start returning path for |
path | path for given identifier (returned) |
bool CDataLoader::GetRestoreCamera | ( | ) | [inline] |
char* CDataLoader::GetTreeControlXML | ( | ) | [inline] |
Returns Model Structure XML
void CDataLoader::GetXMLForItemChildren | ( | int | identifier, |
char *& | text | ||
) |
Returns Model Structure XML for children of the object with the given identifier
identifier | Identifier to start returning XML description from |
text | XML description of children for given identifier (returned) |
void CDataLoader::GetXMLForItemChildren | ( | ModelStructureObject * | mso, |
char *& | text | ||
) |
void CDataLoader::GetXMLForItemChildren | ( | char * | path, |
char *& | text | ||
) |
Returns Model Structure XML for children of the object with the given path
path | Path of model structure object to start returning XML description from |
text | XML description of children for given identifier (returned) |
void CDataLoader::Init | ( | HCtrlView * | view | ) |
Class Initialization
view | Pointer to Hoops View Object |
bool CDataLoader::OnData | ( | BYTE * | pBytes, |
DWORD | dwSize | ||
) |
Put new data chunk in cache list
pBytes | Pointer to data chunk |
dwSize | Size of data chunk |
TK_Status CDataLoader::ProcessData | ( | BYTE * | pBytes, |
DWORD | dwSize | ||
) | [protected] |
Process new data chunk (either store or hand to streaming toolkit)
pBytes | Pointer to data chunk |
dwSize | Size of data chunk |
bool CDataLoader::ProcessNextChunk | ( | ) |
Process next data chunk. This function is typically called ín regular intervals from the main application
void CDataLoader::SetDownloadStatus | ( | int | ulProgressMax | ) | [inline] |
Set download status
ulProgressMax | Size of total data |
void CDataLoader::SetRestoreCamera | ( | bool | restorecamera | ) | [inline] |
Restore camera to scene default
restorecamera | TRUE: Restore Camera |
void CDataLoader::SetTreeControlXML | ( | char * | data | ) |
Sets Text String containing xml model structure information
data | Pointer to Text String |
bool CDataLoader::StartDownload | ( | BSTR | filename, |
bool | isStreamable = true |
||
) |
Start file download
filename | name of file to download |
isStreamable | true = allow streaming for this file, false = do not allow streaming for this file |
bool CDataLoader::m_bAbortDownload [protected] |
true = abort download as soon as possible, false = no abortion
bool CDataLoader::m_bDataIsStreamable [protected] |
true = file is streamable, false = file is not streamable
bool CDataLoader::m_bDataProcessingComplete [protected] |
true = all data chunks have been processed, false = data processing in progress
bool CDataLoader::m_bDownloadInProgress [protected] |
true = download currently in progress, false = no download in progress
bool CDataLoader::m_bRestoreCamera [protected] |
true = restore camera, false = do not restore camera
vector<databuffer *> CDataLoader::m_CachedDataList [protected] |
vector of data chunks
long CDataLoader::m_DataReceived [protected] |
amount of already received data
long CDataLoader::m_DataReceiveSize [protected] |
total size of downloaded file
parsing thread ID
HCtrlView* CDataLoader::m_pView [protected] |
Pointer to HOOPS view object