CDataLoader Class Reference
The
CDataLoader class provides support for loading a file in a piecwise fashion (streaming).
More...
#include <DataLoader.h>
List of all members.
|
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 |
Detailed Description
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
Constructor & Destructor Documentation
Class Constructor
- Parameters:
-
| ctrl | Pointer to Control Class |
Member Function Documentation
Class Initialization
- Parameters:
-
| view | Pointer to Hoops View Object |
bool CDataLoader::StartDownload |
( |
BSTR |
filename, |
|
|
bool |
isStreamable = true | |
|
) |
| | |
Start file download
- Parameters:
-
| filename | name of file to download |
| isStreamable | true = allow streaming for this file, false = do not allow streaming for this file |
- Returns:
- success
bool CDataLoader::OnData |
( |
BYTE * |
pBytes, |
|
|
DWORD |
dwSize | |
|
) |
| | |
Put new data chunk in cache list
- Parameters:
-
| pBytes | Pointer to data chunk |
| dwSize | Size of data chunk |
- Returns:
- true = more data is pending, false = no more data is pending
bool CDataLoader::ProcessNextChunk |
( |
|
) |
|
Process next data chunk. This function is typically called ín regular intervals from the main application
- Returns:
- true = more data is pending, false = no more data is pending
bool CDataLoader::GetDownloadInProgress |
( |
|
) |
[inline] |
bool CDataLoader::GetDownloadComplete |
( |
|
) |
[inline] |
long CDataLoader::GetDownloadDataReceived |
( |
|
) |
[inline] |
long CDataLoader::GetDownloadDataTotalSize |
( |
|
) |
[inline] |
void CDataLoader::AbortDownload |
( |
|
) |
[inline] |
void CDataLoader::SetDownloadStatus |
( |
int |
ulProgressMax |
) |
[inline] |
Set download status
- Parameters:
-
| ulProgressMax | Size of total data |
References m_DataReceiveSize.
bool CDataLoader::GetRestoreCamera |
( |
|
) |
[inline] |
void CDataLoader::SetRestoreCamera |
( |
bool |
restorecamera |
) |
[inline] |
Restore camera to scene default
- Parameters:
-
| restorecamera | TRUE: Restore Camera |
References m_bRestoreCamera.
void CDataLoader::SetTreeControlXML |
( |
char * |
data |
) |
|
Sets Text String containing xml model structure information
- Parameters:
-
| data | Pointer to Text String |
char* CDataLoader::GetTreeControlXML |
( |
|
) |
[inline] |
Returns Model Structure XML
- Returns:
- pointer to text string
struct vlist_s* CDataLoader::GetModelStructureTypeList |
( |
|
) |
[inline, read] |
Returns Pointer to a list of Model Structure Types (body, shell, face,etc.)
- Returns:
- Pointer to vlist
ModelStructureObject* CDataLoader::GetModelStructureObjectTree |
( |
|
) |
[inline] |
Returns Pointer to the Model Structure Tree describing the model structure of the currently loaded hsf file
- Returns:
- Pointer to ModelStructureObject
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
- Returns:
- Pointer to identifier
ModelStructureObject* CDataLoader::FindModelStructureObject |
( |
ModelStructureObject * |
mso, |
|
|
int |
identifier | |
|
) |
| | |
Given the model structure object to start the search from this function will return the model structure object associated to a given identifier
- Parameters:
-
| mso | Model Structure Object |
| identifier | Identifier to search for |
- Returns:
- Model Structure Object with given identifier
void CDataLoader::GetXMLForItemChildren |
( |
int |
identifier, |
|
|
char *& |
text | |
|
) |
| | |
Returns Model Structure XML for children of the object with the given identifier
- Parameters:
-
| identifier | Identifier to start returning XML description from |
| text | XML description of children for given identifier (returned) |
ModelStructureObject* CDataLoader::FindModelStructureObject |
( |
ModelStructureObject * |
mso, |
|
|
char * |
path | |
|
) |
| | |
Given the model structure object to start the search from this function will return the model structure object associated to a given path
- Parameters:
-
| mso | Model Structure Object |
| path | Path to search for |
- Returns:
- Model Structure Object with given path
void CDataLoader::GetXMLForItemChildren |
( |
ModelStructureObject * |
mso, |
|
|
char *& |
text | |
|
) |
| | |
Returns Model Structure XML for children of the given model structure object
- Parameters:
-
| mso | Model Structure Object to start returning XML description from |
| text | XML description of children for given identifier (returned) |
void CDataLoader::GetXMLForItemChildren |
( |
char * |
path, |
|
|
char *& |
text | |
|
) |
| | |
Returns Model Structure XML for children of the object with the given path
- Parameters:
-
| path | Path of model structure object to start returning XML description from |
| text | XML description of children for given identifier (returned) |
void CDataLoader::GetPathFromIdentifier |
( |
int |
identifier, |
|
|
char * |
path | |
|
) |
| | |
Returns full path for given identifier
- Parameters:
-
| identifier | Identifier to start returning path for |
| path | path for given identifier (returned) |
- Returns:
- Control Class Object
TK_Status CDataLoader::ProcessData |
( |
BYTE * |
pBytes, |
|
|
DWORD |
dwSize | |
|
) |
| | [protected] |
Process new data chunk (either store or hand to streaming toolkit)
- Parameters:
-
| pBytes | Pointer to data chunk |
| dwSize | Size of data chunk |
- Returns:
- true = more data is pending, false = no more data is pending
void CDataLoader::ClearCachedDataList |
( |
|
) |
[protected] |
Member Data Documentation
Pointer to HOOPS view object
Referenced by GetView().
true = file is streamable, false = file is not streamable
true = abort download as soon as possible, false = no abortion
Referenced by AbortDownload().
The documentation for this class was generated from the following file: