News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

TNL::Journal class Reference

TNL::Journal Class Reference

#include <tnlJournal.h>

Inheritance diagram for TNL::Journal:

TNL::Object

Detailed Description

The Journal class represents the recordable entry point(s) into program execution.

When journaling is enabled by the TNL_ENABLE_JOURNALING macro, any calls into specially marked Journal methods will be intercepted and potentially recorded for later playback. If TNL_ENABLE_JOURNALING is not defined, all of the interception code will be disabled.


Public Types

enum  Mode {
  Inactive,
  Record,
  Playback
}

Public Member Functions

 Journal ()
void record (const char *fileName)
void load (const char *fileName)
void callEntry (const char *funcName, Functor *theCall)
void processNextJournalEntry ()

Static Public Member Functions

Mode getCurrentMode ()
Journalget ()
BitStreamgetReadStream ()
BitStreamgetWriteStream ()
bool isInEntrypoint ()
void beginBlock (U32 blockId, bool writeBlock)
void endBlock (U32 blockId, bool writeBlock)

Static Protected Member Functions

void checkReadPosition ()
void syncWriteStream ()

Static Protected Attributes

Mode mCurrentMode
bool mInsideEntrypoint

Static Private Attributes

FILE * mJournalFile
BitStream mReadStream
BitStream mWriteStream
JournalmJournal
U32 mWritePosition
U32 mReadBreakBitPos
U32 mBreakBlockIndex
U32 mBlockIndex


Member Enumeration Documentation

enum TNL::Journal::Mode
 

Enumeration values:
Inactive 
Record 
Playback 


Constructor & Destructor Documentation

TNL::Journal::Journal  ) 
 


Member Function Documentation

void TNL::Journal::checkReadPosition  )  [static, protected]
 

void TNL::Journal::syncWriteStream  )  [static, protected]
 

void TNL::Journal::record const char *  fileName  ) 
 

void TNL::Journal::load const char *  fileName  ) 
 

void TNL::Journal::callEntry const char *  funcName,
Functor theCall
 

void TNL::Journal::processNextJournalEntry  ) 
 

Mode TNL::Journal::getCurrentMode  )  [inline, static]
 

Journal* TNL::Journal::get  )  [inline, static]
 

BitStream* TNL::Journal::getReadStream  )  [inline, static]
 

BitStream* TNL::Journal::getWriteStream  )  [inline, static]
 

bool TNL::Journal::isInEntrypoint  )  [inline, static]
 

void TNL::Journal::beginBlock U32  blockId,
bool  writeBlock
[static]
 

void TNL::Journal::endBlock U32  blockId,
bool  writeBlock
[static]
 


Field Documentation

FILE* TNL::Journal::mJournalFile [static, private]
 

BitStream TNL::Journal::mReadStream [static, private]
 

BitStream TNL::Journal::mWriteStream [static, private]
 

Journal* TNL::Journal::mJournal [static, private]
 

U32 TNL::Journal::mWritePosition [static, private]
 

U32 TNL::Journal::mReadBreakBitPos [static, private]
 

U32 TNL::Journal::mBreakBlockIndex [static, private]
 

U32 TNL::Journal::mBlockIndex [static, private]
 

Mode TNL::Journal::mCurrentMode [static, protected]
 

bool TNL::Journal::mInsideEntrypoint [static, protected]