16 #if !defined(AFX_DATALOADER_H__A606F2DA_B9BD_487F_93F8_A22F5BAD1DA5__INCLUDED_)
17 #define AFX_DATALOADER_H__A606F2DA_B9BD_487F_93F8_A22F5BAD1DA5__INCLUDED_
21 #endif // _MSC_VER > 1000
28 #include "HOpcodeHandler.h"
29 struct IWebBrowserApp;
42 class HUtilityXMLGenerator;
43 class ModelStructureObject;
82 bool StartDownload(BSTR filename,
bool isStreamable =
true);
89 bool OnData (BYTE* pBytes, DWORD dwSize);
95 bool ProcessNextChunk();
121 if (!m_bDataProcessingComplete || m_bDownloadInProgress) {
122 m_bAbortDownload =
true;
123 if (!m_bDownloadInProgress)
124 m_bDataProcessingComplete =
true;
150 void SetTreeControlXML(
char *data);
175 int FilterIdentifier(
int identifier,
char *type);
183 ModelStructureObject * FindModelStructureObject(ModelStructureObject *mso,
int identifier);
191 void GetXMLForItemChildren(
int identifier,
char *(&text));
200 ModelStructureObject * FindModelStructureObject(ModelStructureObject *mso,
char *path);
207 void GetXMLForItemChildren(ModelStructureObject *mso,
char *(&text));
214 void GetXMLForItemChildren(
char *path,
char *(&text));
221 void GetPathFromIdentifier(
int identifier,
char *path);
244 TK_Status ProcessData( BYTE* pBytes, DWORD dwSize);
248 void ClearCachedDataList();
267 void ResetModelStructureTypes();
270 TCHAR m_tempfilename[MAX_PATH];
271 char * m_pTreeControlXML;
272 struct vlist_s* m_ModelStructureTypesList;
273 ModelStructureObject *m_pModelStructureObjectTree;
280 #ifndef DOXYGEN_SHOULD_SKIP_THIS
283 class CBindStatusCallback2 :
public CBindStatusCallback<T>
285 typedef void (T::*ATL_PDATAAVAILABLE2)(CBindStatusCallback<T>* pbsc, BYTE* pBytes, DWORD dwSize);
288 STDMETHOD(OnProgress)(ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
296 static HRESULT Download(T* pT, ATL_PDATAAVAILABLE2 pFunc, BSTR bstrURL, IUnknown* pUnkContainer = NULL, BOOL bRelative = FALSE)
298 CComObject<CBindStatusCallback2<T> > *pbsc;
299 HRESULT hRes = CComObject<CBindStatusCallback2<T> >::CreateInstance(&pbsc);
302 return pbsc->StartAsyncDownload(pT, pFunc, bstrURL, pUnkContainer, bRelative);
306 class ModelStructureType
314 m_bSelectable =
false;
317 ~ModelStructureType()
323 void SetName(
char *name)
325 m_pName =
new char[strlen(name)+1];
326 strcpy(m_pName, name);
329 void SetImage(
char *image)
331 m_pImage =
new char[strlen(image)+1];
332 strcpy(m_pImage, image);
335 char *GetName() {
return m_pName; }
336 char *GetImage() {
return m_pImage; }
337 bool GetSelectable() {
return m_bSelectable; }
338 void SetSelectable(
bool selectable ) { m_bSelectable = selectable; }
346 class ModelStructureObject
350 ModelStructureObject();
351 ~ModelStructureObject();
352 void SetType(
char *name)
354 m_pType =
new char[strlen(name)+1];
355 strcpy(m_pType, name);
357 void SetType(ModelStructureType *type)
359 m_pTypePointer = type;
362 void SetIdentifier(
int identifier)
364 m_Identifier = identifier;
366 void SetParent(ModelStructureObject *parent)
370 void SetName(
char *name)
372 m_pName =
new char[strlen(name)+1];
373 strcpy(m_pName, name);
376 char *GetType() {
return m_pType; }
377 ModelStructureType *GetTypePointer() {
return m_pTypePointer; }
378 void SelectAllChildItemsRecursive(
HBaseView *view);
382 void AddChild(ModelStructureObject *child);
386 struct vlist_s* m_Children;
387 struct vlist_s* m_IdentifierList;
388 ModelStructureObject *m_pParent;
389 ModelStructureType *m_pTypePointer;
407 m_pDataLoader = dataloader;
418 class TK_ModelStructure_XML :
public TK_XML
430 m_pDataLoader = model;
431 m_pStreamFileToolkit = toolkit;
438 static void *XMLCallback(HUtilityXMLTag *xt,
bool open,
void *m_pExtraData);
443 struct vlist_s* m_TempObjects;
448 class XML_Parsing_Object
453 static unsigned long XMLParsingThread(LPVOID pParam);
454 struct vlist_s* m_TempObjects;
455 HUtilityXMLGenerator * m_pXmlgen;
462 #endif // !defined(AFX_DATALOADER_H__A606F2DA_B9BD_487F_93F8_A22F5BAD1DA5__INCLUDED_)
long m_DataReceived
Definition: DataLoader.h:258
void SetDownloadStatus(int ulProgressMax)
Definition: DataLoader.h:132
long GetDownloadDataReceived()
Definition: DataLoader.h:110
bool m_bDataIsStreamable
Definition: DataLoader.h:255
long m_DataReceiveSize
Definition: DataLoader.h:259
bool GetDownloadComplete()
Definition: DataLoader.h:105
A HOOPS/ATL specific implmentation of the HOOPS/MVO HDB class.
Definition: HCtrlDB.h:32
char * GetTreeControlXML()
Definition: DataLoader.h:156
void AbortDownload()
Definition: DataLoader.h:120
CDataLoader * GetDataLoader()
Definition: Hoops3dStreamCtrl.h:1612
long GetDownloadDataTotalSize()
Definition: DataLoader.h:115
struct vlist_s * GetModelStructureTypeList()
Definition: DataLoader.h:163
bool m_bDataProcessingComplete
Definition: DataLoader.h:262
bool GetRestoreCamera()
Definition: DataLoader.h:137
The CHoops3dStreamCtrl is the primary HOOPS ATL Control class.
Definition: Hoops3dStreamCtrl.h:73
bool m_bRestoreCamera
Definition: DataLoader.h:264
void SetRestoreCamera(bool restorecamera)
Definition: DataLoader.h:143
HCtrlView * m_pView
Definition: DataLoader.h:254
bool m_bAbortDownload
Definition: DataLoader.h:260
The CDataLoader class provides support for loading a file in a piecwise fashion (streaming) ...
Definition: DataLoader.h:61
A HOOPS/ActiveX specific implmentation of the HOOPS/MVO HBaseView class.
Definition: HCtrlView.h:37
vector< databuffer * > m_CachedDataList
Definition: DataLoader.h:252
bool GetDownloadInProgress()
Definition: DataLoader.h:100
HCtrlView * GetView()
Definition: DataLoader.h:228
! databuffer holds chunks of stream data
Definition: DataLoader.h:48
unsigned char * data
Definition: DataLoader.h:50
ModelStructureObject * GetModelStructureObjectTree()
Definition: DataLoader.h:168
CHoops3dStreamCtrl * GetControl()
Definition: DataLoader.h:233
unsigned int length
Definition: DataLoader.h:51
DWORD m_ParsingThread
Definition: DataLoader.h:236
bool m_bDownloadInProgress
Definition: DataLoader.h:257