Pyrogenesis  trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CReplayLogger Class Reference

Implementation of IReplayLogger that saves data to a file in the logs directory. More...

#include <Replay.h>

Inheritance diagram for CReplayLogger:
Inheritance graph
[legend]
Collaboration diagram for CReplayLogger:
Collaboration graph
[legend]

Public Member Functions

 CReplayLogger (ScriptInterface &scriptInterface)
 
 ~CReplayLogger ()
 
virtual void StartGame (JS::MutableHandleValue attribs)
 Started the game with the given game attributes. More...
 
virtual void Turn (u32 n, u32 turnLength, std::vector< SimulationCommand > &commands)
 Run the given turn with the given collection of player commands. More...
 
virtual void Hash (const std::string &hash, bool quick)
 Optional hash of simulation state (for sync checking). More...
 
virtual OsPath GetDirectory () const
 Remember the directory containing the commands.txt file, so that we can save additional files to it. More...
 
- Public Member Functions inherited from IReplayLogger
 IReplayLogger ()
 
virtual ~IReplayLogger ()
 

Private Member Functions

 NONCOPYABLE (CReplayLogger)
 

Private Attributes

ScriptInterfacem_ScriptInterface
 
std::ostream * m_Stream
 
OsPath m_Directory
 

Detailed Description

Implementation of IReplayLogger that saves data to a file in the logs directory.

Constructor & Destructor Documentation

CReplayLogger::CReplayLogger ( ScriptInterface scriptInterface)
CReplayLogger::~CReplayLogger ( )

Member Function Documentation

OsPath CReplayLogger::GetDirectory ( ) const
virtual

Remember the directory containing the commands.txt file, so that we can save additional files to it.

Implements IReplayLogger.

void CReplayLogger::Hash ( const std::string &  hash,
bool  quick 
)
virtual

Optional hash of simulation state (for sync checking).

Implements IReplayLogger.

CReplayLogger::NONCOPYABLE ( CReplayLogger  )
private
void CReplayLogger::StartGame ( JS::MutableHandleValue  attribs)
virtual

Started the game with the given game attributes.

Implements IReplayLogger.

void CReplayLogger::Turn ( u32  n,
u32  turnLength,
std::vector< SimulationCommand > &  commands 
)
virtual

Run the given turn with the given collection of player commands.

Implements IReplayLogger.

Member Data Documentation

OsPath CReplayLogger::m_Directory
private
ScriptInterface& CReplayLogger::m_ScriptInterface
private
std::ostream* CReplayLogger::m_Stream
private

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