VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Attributes
trpgwArchive Class Reference
Inheritance diagram for trpgwArchive:
Inheritance graph
[legend]

Classes

class  TileFile
class  TileFileEntry
 Used to keep track of which tiles are in which file. More...

Public Types

enum  TileMode { TileLocal, TileExternal, TileExternalSaved }
 Tiles can be stored as individual files (External) or grouped together (Local) More...

Public Member Functions

 trpgwArchive (char *baseDir, char *name, trpg2dPoint &ll, trpg2dPoint &ur, int majorVer=TRPG_VERSION_MAJOR, int minorVer=TRPG_VERSION_MINOR)
 real constructor work done in Init(...) now for quasi-virtual ctor action.
virtual void Init (char *baseDir, char *name, trpg2dPoint &ll, trpg2dPoint &ur, int majorVer=TRPG_VERSION_MAJOR, int minorVer=TRPG_VERSION_MINOR)
 trpgwArchive (trpgEndian ness=LittleEndian, TileMode tileMode=TileLocal, int majorVer=TRPG_VERSION_MAJOR, int minorVer=TRPG_VERSION_MINOR)
 Start an archive from scratch.
virtual void Init (trpgEndian ness=LittleEndian, TileMode tileMode=TileLocal, int majorVer=TRPG_VERSION_MAJOR, int minorVer=TRPG_VERSION_MINOR)
 trpgwArchive (int)
 dummy constructor, does nothing so subclasses can have more control
virtual ~trpgwArchive (void)
virtual void SetMaxTileFileLength (int len)
 Set the maximum length for a tile file (if using them) This is only a suggestion for when to stop appending.
virtual bool SetHeader (const trpgHeader &)
 Set functions. Have to fill all these out before writing.
virtual bool SetMaterialTable (const trpgMatTable &)
virtual bool SetTextureTable (const trpgTexTable &)
virtual bool SetModelTable (const trpgModelTable &)
virtual bool SetLightTable (const trpgLightTable &)
virtual bool SetRangeTable (const trpgRangeTable &)
virtual bool SetLabelPropertyTable (const trpgLabelPropertyTable &)
virtual bool SetSupportStyleTable (const trpgSupportStyleTable &)
virtual bool SetTextStyleTable (const trpgTextStyleTable &)
virtual trpgHeaderGetHeader ()
 Get functions. If we're doing a regenerate we need to get at these.
virtual trpgMatTableGetMatTable ()
virtual trpgTexTableGetTextureTable ()
virtual trpgModelTableGetModelTable ()
virtual trpgLightTableGetLightTable ()
virtual trpgRangeTableGetRangeTable ()
virtual trpgLabelPropertyTableGetLabelPropertyTable ()
virtual trpgTextStyleTableGetTextStyleTable ()
virtual trpgSupportStyleTableGetSupportStyleTable ()
virtual bool IncrementTileFile (void)
virtual bool DesignateTileFile (int)
virtual bool OpenFile (const char *, const char *)
 Write functions.
virtual void CloseFile (void)
virtual bool WriteHeader (void)
virtual bool CheckpointHeader (void)
virtual bool WriteTile (unsigned int, unsigned int, unsigned int, float zmin, float zmax, const trpgMemWriteBuffer *, const trpgMemWriteBuffer *, int32 &fileId, int32 &fileOffset)
bool isValid (void) const
 virtual bool WriteModel(unsigned int,trpgMemWriteBuffer &);
const chargetErrMess () const
chargetDir (void)
virtual trpgwImageHelperGetNewWImageHelper (trpgEndian ness, char *dir, trpgTexTable &)
virtual trpgwAppFileGetNewWAppFile (trpgEndian inNess, const char *fileName, bool reuse=false)
virtual trpgr_ArchiveGetArchiveReader ()
virtual int32 WriteHeaderData (const char *dataPtr, int32 length, FILE *filehandle)
virtual int32 GetMagicNumber ()
- Public Member Functions inherited from trpgCheckable
 trpgCheckable (void)
virtual ~trpgCheckable (void)
virtual TeAttrHdl GetHandle () const
virtual void SetHandle (TeAttrHdl hdl)

Protected Attributes

bool isRegenerate
 Set if we're adding to an existing archive.
trpgEndian ness
trpgEndian cpuNess
int majorVersion
int minorVersion
char dir [1024]
 Fed in from the outside.
trpgHeader header
 Directory where we're doing all this.
trpgMatTable matTable
trpgTexTable texTable
trpgModelTable modelTable
trpgLightTable lightTable
trpgRangeTable rangeTable
trpgTextStyleTable textStyleTable
trpgSupportStyleTable supportStyleTable
trpgLabelPropertyTable labelPropertyTable
trpgTileTable tileTable
int numLod
TileMode tileMode
trpgwAppFiletileFile
int tileFileCount
std::vector< TileFiletileFiles
std::vector< TileFileEntryexternalTiles
int maxTileFileLen
trpg2iPoint addOffset
 This offset is used when we're adding to an existing archive.
FILE * fp
bool firstHeaderWrite
char errMess [512]
- Protected Attributes inherited from trpgCheckable
bool valid
TeAttrHdl handle
bool writeHandle

Member Enumeration Documentation

Tiles can be stored as individual files (External) or grouped together (Local)

Enumerator:
TileLocal 
TileExternal 
TileExternalSaved 

Constructor & Destructor Documentation

trpgwArchive::trpgwArchive ( char baseDir,
char name,
trpg2dPoint ll,
trpg2dPoint ur,
int  majorVer = TRPG_VERSION_MAJOR,
int  minorVer = TRPG_VERSION_MINOR 
)

real constructor work done in Init(...) now for quasi-virtual ctor action.

Add data to an existing archive

trpgwArchive::trpgwArchive ( trpgEndian  ness = LittleEndian,
TileMode  tileMode = TileLocal,
int  majorVer = TRPG_VERSION_MAJOR,
int  minorVer = TRPG_VERSION_MINOR 
)

Start an archive from scratch.

trpgwArchive::trpgwArchive ( int  )
inline

dummy constructor, does nothing so subclasses can have more control

virtual trpgwArchive::~trpgwArchive ( void  )
virtual

Member Function Documentation

virtual void trpgwArchive::Init ( char baseDir,
char name,
trpg2dPoint ll,
trpg2dPoint ur,
int  majorVer = TRPG_VERSION_MAJOR,
int  minorVer = TRPG_VERSION_MINOR 
)
virtual
virtual void trpgwArchive::Init ( trpgEndian  ness = LittleEndian,
TileMode  tileMode = TileLocal,
int  majorVer = TRPG_VERSION_MAJOR,
int  minorVer = TRPG_VERSION_MINOR 
)
virtual
virtual void trpgwArchive::SetMaxTileFileLength ( int  len)
virtual

Set the maximum length for a tile file (if using them) This is only a suggestion for when to stop appending.

virtual bool trpgwArchive::SetHeader ( const trpgHeader )
virtual

Set functions. Have to fill all these out before writing.

virtual bool trpgwArchive::SetMaterialTable ( const trpgMatTable )
virtual
virtual bool trpgwArchive::SetTextureTable ( const trpgTexTable )
virtual
virtual bool trpgwArchive::SetModelTable ( const trpgModelTable )
virtual
virtual bool trpgwArchive::SetLightTable ( const trpgLightTable )
virtual
virtual bool trpgwArchive::SetRangeTable ( const trpgRangeTable )
virtual
virtual bool trpgwArchive::SetLabelPropertyTable ( const trpgLabelPropertyTable )
virtual
virtual bool trpgwArchive::SetSupportStyleTable ( const trpgSupportStyleTable )
virtual
virtual bool trpgwArchive::SetTextStyleTable ( const trpgTextStyleTable )
virtual
virtual trpgHeader* trpgwArchive::GetHeader ( )
virtual

Get functions. If we're doing a regenerate we need to get at these.

virtual trpgMatTable* trpgwArchive::GetMatTable ( )
virtual
virtual trpgTexTable* trpgwArchive::GetTextureTable ( )
virtual
virtual trpgModelTable* trpgwArchive::GetModelTable ( )
virtual
virtual trpgLightTable* trpgwArchive::GetLightTable ( )
virtual
virtual trpgRangeTable* trpgwArchive::GetRangeTable ( )
virtual
virtual trpgLabelPropertyTable* trpgwArchive::GetLabelPropertyTable ( )
virtual
virtual trpgTextStyleTable* trpgwArchive::GetTextStyleTable ( )
virtual
virtual trpgSupportStyleTable* trpgwArchive::GetSupportStyleTable ( )
virtual
virtual bool trpgwArchive::IncrementTileFile ( void  )
virtual
virtual bool trpgwArchive::DesignateTileFile ( int  )
virtual
virtual bool trpgwArchive::OpenFile ( const char ,
const char  
)
virtual

Write functions.

For now, the header is written last.

virtual void trpgwArchive::CloseFile ( void  )
virtual
virtual bool trpgwArchive::WriteHeader ( void  )
virtual
virtual bool trpgwArchive::CheckpointHeader ( void  )
virtual
virtual bool trpgwArchive::WriteTile ( unsigned  int,
unsigned  int,
unsigned  int,
float  zmin,
float  zmax,
const trpgMemWriteBuffer ,
const trpgMemWriteBuffer ,
int32 fileId,
int32 fileOffset 
)
virtual
bool trpgwArchive::isValid ( void  ) const

virtual bool WriteModel(unsigned int,trpgMemWriteBuffer &);

Reimplemented from trpgCheckable.

const char* trpgwArchive::getErrMess ( ) const
char* trpgwArchive::getDir ( void  )
inline
virtual trpgwImageHelper* trpgwArchive::GetNewWImageHelper ( trpgEndian  ness,
char dir,
trpgTexTable  
)
virtual
virtual trpgwAppFile* trpgwArchive::GetNewWAppFile ( trpgEndian  inNess,
const char fileName,
bool  reuse = false 
)
virtual
virtual trpgr_Archive* trpgwArchive::GetArchiveReader ( )
inlinevirtual
virtual int32 trpgwArchive::WriteHeaderData ( const char dataPtr,
int32  length,
FILE *  filehandle 
)
virtual
virtual int32 trpgwArchive::GetMagicNumber ( )
inlinevirtual

Member Data Documentation

bool trpgwArchive::isRegenerate
protected

Set if we're adding to an existing archive.

trpgEndian trpgwArchive::ness
protected
trpgEndian trpgwArchive::cpuNess
protected
int trpgwArchive::majorVersion
protected
int trpgwArchive::minorVersion
protected
char trpgwArchive::dir[1024]
protected

Fed in from the outside.

trpgHeader trpgwArchive::header
protected

Directory where we're doing all this.

These are passed in

trpgMatTable trpgwArchive::matTable
protected
trpgTexTable trpgwArchive::texTable
protected
trpgModelTable trpgwArchive::modelTable
protected
trpgLightTable trpgwArchive::lightTable
protected
trpgRangeTable trpgwArchive::rangeTable
protected
trpgTextStyleTable trpgwArchive::textStyleTable
protected
trpgSupportStyleTable trpgwArchive::supportStyleTable
protected
trpgLabelPropertyTable trpgwArchive::labelPropertyTable
protected
trpgTileTable trpgwArchive::tileTable
protected
int trpgwArchive::numLod
protected
TileMode trpgwArchive::tileMode
protected
trpgwAppFile* trpgwArchive::tileFile
protected
int trpgwArchive::tileFileCount
protected
std::vector<TileFile> trpgwArchive::tileFiles
protected
std::vector<TileFileEntry> trpgwArchive::externalTiles
protected
int trpgwArchive::maxTileFileLen
protected
trpg2iPoint trpgwArchive::addOffset
protected

This offset is used when we're adding to an existing archive.

FILE* trpgwArchive::fp
protected
bool trpgwArchive::firstHeaderWrite
protected
char trpgwArchive::errMess[512]
mutableprotected

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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)