CommandManager Class Reference

#include <CommandManager.h>

List of all members.

Public Member Functions

void startRecording ()
void stopRecording ()
void saveRecording (std::string filename)
void startPlaying (std::priority_queue< CommandTime, std::vector< CommandTime >, std::greater< CommandTime > > &commands)
void startPlaying (List *commands)
void startPlaying (std::string filename)
void stopPlaying ()
void startTimestep ()
void execute (Command *command)
void execute (std::queue< Command * > commands)

Static Public Member Functions

static CommandManagerinstance ()

Private Member Functions

 CommandManager ()

Private Attributes

std::priority_queue< CommandTime,
std::vector< CommandTime >,
std::greater< CommandTime > > 
_demoCommands
std::priority_queue< CommandTime,
std::vector< CommandTime >,
std::greater< CommandTime > > 
_playCommands
bool _recording
bool _playing
int _demoTime
int _playTime

Static Private Attributes

static CommandManager_instance = NULL


Detailed Description

Definition at line 20 of file CommandManager.h.


Constructor & Destructor Documentation

CommandManager::CommandManager  )  [private]
 

Definition at line 16 of file CommandManager.cpp.

References _instance.

Referenced by instance().


Member Function Documentation

void CommandManager::execute std::queue< Command * >  commands  ) 
 

Definition at line 34 of file CommandManager.cpp.

void CommandManager::execute Command command  ) 
 

Definition at line 22 of file CommandManager.cpp.

References _demoCommands, _demoTime, _recording, CommandTime::c, Command::execute(), and CommandTime::time.

Referenced by Player::control(), and startTimestep().

CommandManager * CommandManager::instance  )  [static]
 

Definition at line 87 of file CommandManager.cpp.

References _instance, and CommandManager().

Referenced by EventPoint::collide(), Player::control(), and PlayScriptCommand::execute().

void CommandManager::saveRecording std::string  filename  ) 
 

Definition at line 107 of file CommandManager.cpp.

References _demoCommands, and Parser::open.

void CommandManager::startPlaying std::string  filename  ) 
 

Definition at line 74 of file CommandManager.cpp.

References Parser::parse(), and startPlaying().

void CommandManager::startPlaying List commands  ) 
 

Definition at line 56 of file CommandManager.cpp.

References List::empty(), List::firstList(), List::firstString(), Command::loadCommand(), and List::rest().

void CommandManager::startPlaying std::priority_queue< CommandTime, std::vector< CommandTime >, std::greater< CommandTime > > &  commands  ) 
 

Definition at line 42 of file CommandManager.cpp.

References _playCommands, _playing, and _playTime.

Referenced by EventPoint::collide(), PlayScriptCommand::execute(), and startPlaying().

void CommandManager::startRecording  ) 
 

Definition at line 95 of file CommandManager.cpp.

References _demoCommands, _demoTime, and _recording.

void CommandManager::startTimestep  ) 
 

Definition at line 120 of file CommandManager.cpp.

References _demoTime, _playCommands, _playing, _playTime, _recording, CommandTime::c, execute(), and CommandTime::time.

void CommandManager::stopPlaying  ) 
 

Definition at line 82 of file CommandManager.cpp.

References _playing.

void CommandManager::stopRecording  ) 
 

Definition at line 102 of file CommandManager.cpp.

References _recording.


Member Data Documentation

std::priority_queue<CommandTime,std::vector<CommandTime>,std::greater<CommandTime> > CommandManager::_demoCommands [private]
 

Definition at line 40 of file CommandManager.h.

Referenced by execute(), saveRecording(), and startRecording().

int CommandManager::_demoTime [private]
 

Definition at line 48 of file CommandManager.h.

Referenced by execute(), startRecording(), and startTimestep().

CommandManager * CommandManager::_instance = NULL [static, private]
 

Definition at line 46 of file CommandManager.h.

Referenced by CommandManager(), and instance().

std::priority_queue<CommandTime,std::vector<CommandTime>,std::greater<CommandTime> > CommandManager::_playCommands [private]
 

Definition at line 41 of file CommandManager.h.

Referenced by startPlaying(), and startTimestep().

bool CommandManager::_playing [private]
 

Definition at line 44 of file CommandManager.h.

Referenced by startPlaying(), startTimestep(), and stopPlaying().

int CommandManager::_playTime [private]
 

Definition at line 49 of file CommandManager.h.

Referenced by startPlaying(), and startTimestep().

bool CommandManager::_recording [private]
 

Definition at line 43 of file CommandManager.h.

Referenced by execute(), startRecording(), startTimestep(), and stopRecording().


The documentation for this class was generated from the following files:
Generated on Sat Apr 22 15:05:21 2006 for ProjectX by  doxygen 1.4.6-NO