10 #if !defined(AFX_DATALOADER_H__A606F2DA_B9BD_487F_93F8_A22F5BAD1DA5__INCLUDED_)
11 #define AFX_DATALOADER_H__A606F2DA_B9BD_487F_93F8_A22F5BAD1DA5__INCLUDED_
15 #endif // _MSC_VER > 1000
22 #include "HOpcodeHandler.h"
23 struct IWebBrowserApp;
36 class HUtilityXMLGenerator;
37 class ModelStructureObject;
76 bool StartDownload(BSTR filename,
bool isStreamable =
true);
83 bool OnData (BYTE* pBytes, DWORD dwSize);
89 bool ProcessNextChunk();
115 if (!m_bDataProcessingComplete || m_bDownloadInProgress) {
116 m_bAbortDownload =
true;
117 if (!m_bDownloadInProgress)
118 m_bDataProcessingComplete =
true;
144 void SetTreeControlXML(
char *data);
169 int FilterIdentifier(
int identifier,
char *type);
177 ModelStructureObject * FindModelStructureObject(ModelStructureObject *mso,
int identifier);
185 void GetXMLForItemChildren(
int identifier,
char *(&text));
194 ModelStructureObject * FindModelStructureObject(ModelStructureObject *mso,
char *path);
201 void GetXMLForItemChildren(ModelStructureObject *mso,
char *(&text));
208 void GetXMLForItemChildren(
char *path,
char *(&text));
215 void GetPathFromIdentifier(
int identifier,
char *path);
238 TK_Status ProcessData( BYTE* pBytes, DWORD dwSize);
242 void ClearCachedDataList();
261 void ResetModelStructureTypes();
264 TCHAR m_tempfilename[MAX_PATH];
265 char * m_pTreeControlXML;
266 struct vlist_s* m_ModelStructureTypesList;
267 ModelStructureObject *m_pModelStructureObjectTree;
274 #ifndef DOXYGEN_SHOULD_SKIP_THIS
277 class CBindStatusCallback2 :
public CBindStatusCallback<T>
279 typedef void (T::*ATL_PDATAAVAILABLE2)(CBindStatusCallback<T>* pbsc, BYTE* pBytes, DWORD dwSize);
282 STDMETHOD(OnProgress)(ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
290 static HRESULT Download(T* pT, ATL_PDATAAVAILABLE2 pFunc, BSTR bstrURL, IUnknown* pUnkContainer = NULL, BOOL bRelative = FALSE)
292 CComObject<CBindStatusCallback2<T> > *pbsc;
293 HRESULT hRes = CComObject<CBindStatusCallback2<T> >::CreateInstance(&pbsc);
296 return pbsc->StartAsyncDownload(pT, pFunc, bstrURL, pUnkContainer, bRelative);
300 class ModelStructureType
308 m_bSelectable =
false;
311 ~ModelStructureType()
317 void SetName(
char *name)
319 m_pName =
new char[strlen(name)+1];
320 strcpy(m_pName, name);
323 void SetImage(
char *image)
325 m_pImage =
new char[strlen(image)+1];
326 strcpy(m_pImage, image);
329 char *GetName() {
return m_pName; }
330 char *GetImage() {
return m_pImage; }
331 bool GetSelectable() {
return m_bSelectable; }
332 void SetSelectable(
bool selectable ) { m_bSelectable = selectable; }
340 class ModelStructureObject
344 ModelStructureObject();
345 ~ModelStructureObject();
346 void SetType(
char *name)
348 m_pType =
new char[strlen(name)+1];
349 strcpy(m_pType, name);
351 void SetType(ModelStructureType *type)
353 m_pTypePointer = type;
356 void SetIdentifier(
int identifier)
358 m_Identifier = identifier;
360 void SetParent(ModelStructureObject *parent)
364 void SetName(
char *name)
366 m_pName =
new char[strlen(name)+1];
367 strcpy(m_pName, name);
370 char *GetType() {
return m_pType; }
371 ModelStructureType *GetTypePointer() {
return m_pTypePointer; }
372 void SelectAllChildItemsRecursive(
HBaseView *view);
376 void AddChild(ModelStructureObject *child);
380 struct vlist_s* m_Children;
381 struct vlist_s* m_IdentifierList;
382 ModelStructureObject *m_pParent;
383 ModelStructureType *m_pTypePointer;
401 m_pDataLoader = dataloader;
412 class TK_ModelStructure_XML :
public TK_XML
424 m_pDataLoader = model;
425 m_pStreamFileToolkit = toolkit;
432 static void *XMLCallback(HUtilityXMLTag *xt,
bool open,
void *m_pExtraData);
437 struct vlist_s* m_TempObjects;
442 class XML_Parsing_Object
447 static unsigned long XMLParsingThread(LPVOID pParam);
448 struct vlist_s* m_TempObjects;
449 HUtilityXMLGenerator * m_pXmlgen;
456 #endif // !defined(AFX_DATALOADER_H__A606F2DA_B9BD_487F_93F8_A22F5BAD1DA5__INCLUDED_)
long m_DataReceived
Definition: DataLoader.h:252
void SetDownloadStatus(int ulProgressMax)
Definition: DataLoader.h:126
long GetDownloadDataReceived()
Definition: DataLoader.h:104
bool m_bDataIsStreamable
Definition: DataLoader.h:249
long m_DataReceiveSize
Definition: DataLoader.h:253
bool GetDownloadComplete()
Definition: DataLoader.h:99
A HOOPS/ATL specific implmentation of the HOOPS/MVO HDB class.
Definition: HCtrlDB.h:27
char * GetTreeControlXML()
Definition: DataLoader.h:150
void AbortDownload()
Definition: DataLoader.h:114
CDataLoader * GetDataLoader()
Definition: Hoops3dStreamCtrl.h:1607
long GetDownloadDataTotalSize()
Definition: DataLoader.h:109
struct vlist_s * GetModelStructureTypeList()
Definition: DataLoader.h:157
bool m_bDataProcessingComplete
Definition: DataLoader.h:256
bool GetRestoreCamera()
Definition: DataLoader.h:131
The CHoops3dStreamCtrl is the primary HOOPS ATL Control class.
Definition: Hoops3dStreamCtrl.h:68
bool m_bRestoreCamera
Definition: DataLoader.h:258
void SetRestoreCamera(bool restorecamera)
Definition: DataLoader.h:137
HCtrlView * m_pView
Definition: DataLoader.h:248
bool m_bAbortDownload
Definition: DataLoader.h:254
The CDataLoader class provides support for loading a file in a piecwise fashion (streaming) ...
Definition: DataLoader.h:55
A HOOPS/ActiveX specific implmentation of the HOOPS/MVO HBaseView class.
Definition: HCtrlView.h:32
vector< databuffer * > m_CachedDataList
Definition: DataLoader.h:246
bool GetDownloadInProgress()
Definition: DataLoader.h:94
HCtrlView * GetView()
Definition: DataLoader.h:222
! databuffer holds chunks of stream data
Definition: DataLoader.h:42
unsigned char * data
Definition: DataLoader.h:44
ModelStructureObject * GetModelStructureObjectTree()
Definition: DataLoader.h:162
CHoops3dStreamCtrl * GetControl()
Definition: DataLoader.h:227
unsigned int length
Definition: DataLoader.h:45
DWORD m_ParsingThread
Definition: DataLoader.h:230
bool m_bDownloadInProgress
Definition: DataLoader.h:251