Alphabetical Class List   File List   Compound Members  

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 Methods

void Init (HCtrlView *View)
bool StartDownload (BSTR filename, bool isStreamable=true)
bool OnData (BYTE *pBytes, DWORD dwSize)
bool ProcessNextChunk ()
bool GetDownloadInProgress ()
long GetDownloadDataReceived ()
long GetDownloadDataTotalSize ()
void AbortDownload ()
void SetDownloadStatus (int ulProgressMax)

Protected Methods

TK_Status ProcessData (BYTE *pBytes, DWORD dwSize)
void ClearCachedDataList ()

Protected Attributes

vector< databuffer * > m_CachedDataList
HCtrlViewm_pView
bool m_bDataIsStreamable
bool m_bDownloadInProgress
long m_DataReceived
long m_DataReceiveSize
bool m_bAbortDownload
bool m_bDataProcessingComplete


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


Member Function Documentation

void CDataLoader::AbortDownload   [inline]
 

Abort current download

void CDataLoader::ClearCachedDataList   [protected]
 

Free data cache

long CDataLoader::GetDownloadDataReceived   [inline]
 

Returns:
Size of already received data

long CDataLoader::GetDownloadDataTotalSize   [inline]
 

Returns:
Total size of downloaded file

bool CDataLoader::GetDownloadInProgress   [inline]
 

Returns:
Indicates if download is currently in progress

void CDataLoader::Init HCtrlView   View
 

Class Initialization

Parameters:
view  Pointer to Hoops View Object

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

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

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

void CDataLoader::SetDownloadStatus int    ulProgressMax [inline]
 

Set download status

Parameters:
ulProgressMax  Size of total data

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


Member Data Documentation

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

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

HCtrlView* CDataLoader::m_pView [protected]
 

Pointer to HOOPS view object


The documentation for this class was generated from the following file:


Copyright © 2002 Tech Soft 3D