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 flush ()
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 _flush
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 36 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 Person::addHealth(), Player::control(), and WeaponPunch::shoot().

void CommandManager::flush  ) 
 

Definition at line 122 of file CommandManager.cpp.

References _flush.

Referenced by CutScene::activate(), FlushCommand::execute(), and Level::~Level().

CommandManager * CommandManager::instance  )  [static]
 

Definition at line 89 of file CommandManager.cpp.

References _instance, and CommandManager().

Referenced by CutScene::activate(), Person::addHealth(), EventPoint::collide(), Player::control(), Enemy::die(), PlayScriptCommand::execute(), FlushCommand::execute(), WeaponPunch::shoot(), Enemy::update(), and Level::~Level().

void CommandManager::saveRecording std::string  filename  ) 
 

Definition at line 109 of file CommandManager.cpp.

References _demoCommands, and Parser::open.

Referenced by Player::control().

void CommandManager::startPlaying std::string  filename  ) 
 

Definition at line 76 of file CommandManager.cpp.

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

void CommandManager::startPlaying List commands  ) 
 

Definition at line 58 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 44 of file CommandManager.cpp.

References _playCommands, _playing, and _playTime.

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

void CommandManager::startRecording  ) 
 

Definition at line 97 of file CommandManager.cpp.

References _demoCommands, _demoTime, and _recording.

Referenced by Player::control().

void CommandManager::startTimestep  ) 
 

Definition at line 127 of file CommandManager.cpp.

References _flush, _playCommands, and _playing.

void CommandManager::stopPlaying  ) 
 

Definition at line 84 of file CommandManager.cpp.

References _playing.

void CommandManager::stopRecording  ) 
 

Definition at line 104 of file CommandManager.cpp.

References _recording.

Referenced by Player::control().


Member Data Documentation

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

Definition at line 42 of file CommandManager.h.

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

int CommandManager::_demoTime [private]
 

Definition at line 51 of file CommandManager.h.

Referenced by execute(), and startRecording().

bool CommandManager::_flush [private]
 

Definition at line 45 of file CommandManager.h.

Referenced by flush(), and startTimestep().

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

Definition at line 49 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 43 of file CommandManager.h.

Referenced by startPlaying(), and startTimestep().

bool CommandManager::_playing [private]
 

Definition at line 47 of file CommandManager.h.

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

int CommandManager::_playTime [private]
 

Definition at line 52 of file CommandManager.h.

Referenced by startPlaying().

bool CommandManager::_recording [private]
 

Definition at line 46 of file CommandManager.h.

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


The documentation for this class was generated from the following files:
Generated on Fri May 5 00:20:19 2006 for ProjectX by  doxygen 1.4.6-NO