DDraceNetwork Docs
CGhostLoader Class Reference

#include <ghost.h>

Inheritance diagram for CGhostLoader:
[legend]
Collaboration diagram for CGhostLoader:
[legend]

Public Member Functions

 CGhostLoader ()
 
void Init ()
 
bool Load (const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc) override
 
void Close () override
 
const CGhostInfoGetInfo () const override
 
bool ReadNextType (int *pType) override
 
bool ReadData (int Type, void *pData, size_t Size) override
 
bool GetGhostInfo (const char *pFilename, CGhostInfo *pGhostInfo, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc) override
 
- Public Member Functions inherited from IGhostLoader
virtual ~IGhostLoader ()
 
virtual bool Load (const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc)=0
 
virtual void Close ()=0
 
virtual const CGhostInfoGetInfo () const =0
 
virtual bool ReadNextType (int *pType)=0
 
virtual bool ReadData (int Type, void *pData, size_t Size)=0
 
virtual bool GetGhostInfo (const char *pFilename, CGhostInfo *pInfo, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc)=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Private Member Functions

void ResetBuffer ()
 
IOHANDLE ReadHeader (CGhostHeader &Header, const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc, bool LogMapMismatch) const
 
bool ValidateHeader (const CGhostHeader &Header, const char *pFilename) const
 
bool CheckHeaderMap (const CGhostHeader &Header, const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc, bool LogMapMismatch) const
 
bool ReadChunk (int *pType)
 

Private Attributes

IOHANDLE m_File
 
char m_aFilename [IO_MAX_PATH_LENGTH]
 
class IStoragem_pStorage
 
CGhostHeader m_Header
 
CGhostInfo m_Info
 
char m_aBuffer [MAX_CHUNK_SIZE]
 
char m_aBufferTemp [MAX_CHUNK_SIZE]
 
char * m_pBufferPos
 
const char * m_pBufferEnd
 
int m_BufferNumItems
 
int m_BufferCurItem
 
int m_BufferPrevItem
 
CGhostItem m_LastItem
 

Additional Inherited Members

- Static Public Member Functions inherited from IGhostLoader
static const char * InterfaceName ()
 
- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Constructor & Destructor Documentation

◆ CGhostLoader()

CGhostLoader::CGhostLoader ( )

Member Function Documentation

◆ CheckHeaderMap()

bool CGhostLoader::CheckHeaderMap ( const CGhostHeader Header,
const char *  pFilename,
const char *  pMap,
const SHA256_DIGEST MapSha256,
unsigned  MapCrc,
bool  LogMapMismatch 
) const
private

◆ Close()

void CGhostLoader::Close ( )
overridevirtual

Implements IGhostLoader.

◆ GetGhostInfo()

bool CGhostLoader::GetGhostInfo ( const char *  pFilename,
CGhostInfo pGhostInfo,
const char *  pMap,
const SHA256_DIGEST MapSha256,
unsigned  MapCrc 
)
overridevirtual

Implements IGhostLoader.

◆ GetInfo()

const CGhostInfo * CGhostLoader::GetInfo ( ) const
inlineoverridevirtual

Implements IGhostLoader.

◆ Init()

void CGhostLoader::Init ( )

◆ Load()

bool CGhostLoader::Load ( const char *  pFilename,
const char *  pMap,
const SHA256_DIGEST MapSha256,
unsigned  MapCrc 
)
overridevirtual

Implements IGhostLoader.

◆ ReadChunk()

bool CGhostLoader::ReadChunk ( int *  pType)
private

◆ ReadData()

bool CGhostLoader::ReadData ( int  Type,
void *  pData,
size_t  Size 
)
overridevirtual

Implements IGhostLoader.

◆ ReadHeader()

IOHANDLE CGhostLoader::ReadHeader ( CGhostHeader Header,
const char *  pFilename,
const char *  pMap,
const SHA256_DIGEST MapSha256,
unsigned  MapCrc,
bool  LogMapMismatch 
) const
private

◆ ReadNextType()

bool CGhostLoader::ReadNextType ( int *  pType)
overridevirtual

Implements IGhostLoader.

◆ ResetBuffer()

void CGhostLoader::ResetBuffer ( )
private

◆ ValidateHeader()

bool CGhostLoader::ValidateHeader ( const CGhostHeader Header,
const char *  pFilename 
) const
private

Member Data Documentation

◆ m_aBuffer

char CGhostLoader::m_aBuffer[MAX_CHUNK_SIZE]
private

◆ m_aBufferTemp

char CGhostLoader::m_aBufferTemp[MAX_CHUNK_SIZE]
private

◆ m_aFilename

char CGhostLoader::m_aFilename[IO_MAX_PATH_LENGTH]
private

◆ m_BufferCurItem

int CGhostLoader::m_BufferCurItem
private

◆ m_BufferNumItems

int CGhostLoader::m_BufferNumItems
private

◆ m_BufferPrevItem

int CGhostLoader::m_BufferPrevItem
private

◆ m_File

IOHANDLE CGhostLoader::m_File
private

◆ m_Header

CGhostHeader CGhostLoader::m_Header
private

◆ m_Info

CGhostInfo CGhostLoader::m_Info
private

◆ m_LastItem

CGhostItem CGhostLoader::m_LastItem
private

◆ m_pBufferEnd

const char* CGhostLoader::m_pBufferEnd
private

◆ m_pBufferPos

char* CGhostLoader::m_pBufferPos
private

◆ m_pStorage

class IStorage* CGhostLoader::m_pStorage
private

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