Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: TNL::Journal Class Reference

# TNL::Journal Class Reference

`#include <tnlJournal.h>`

Inheritance diagram for TNL::Journal:

## 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

static Mode | getCurrentMode ()
static Journal * | get ()
static BitStream * | getReadStream ()
static BitStream * | getWriteStream ()
static bool | isInEntrypoint ()
static void | beginBlock (U32 blockId, bool writeBlock)
static void | endBlock (U32 blockId, bool writeBlock)

## Static Protected Member Functions

static void | checkReadPosition ()
static void | syncWriteStream ()

## Static Protected Attributes

static Mode | mCurrentMode
static bool | mInsideEntrypoint

## Static Private Attributes

static FILE * | mJournalFile
static BitStream | mReadStream
static BitStream | mWriteStream
static Journal * | mJournal
static U32 | mWritePosition
static U32 | mReadBreakBitPos
static U32 | mBreakBlockIndex
static U32 | mBlockIndex

## Member Enumeration Documentation

enum TNL::Journal::Mode

Enumerator:

  Inactive |
  Record |
  Playback |

## Constructor & Destructor Documentation

TNL::Journal::Journal | ( |  | ) |

## Member Function Documentation

static void TNL::Journal::checkReadPosition | ( |  | ) | `[static, protected]`

static 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 | ( |  | ) |

static Mode TNL::Journal::getCurrentMode | ( |  | ) | `[inline, static]`

static Journal* TNL::Journal::get | ( |  | ) | `[inline, static]`

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

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

static bool TNL::Journal::isInEntrypoint | ( |  | ) | `[inline, static]`

static void TNL::Journal::beginBlock | ( | U32 | blockId,
|  | bool | writeBlock |
| ) |  |  | `[static]`

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]`