#include <ComposedCommand.h>
Public Member Functions | |
ComposedCommand () | |
virtual | ~ComposedCommand () |
void | addCommand (CommandObject *nwCommand) |
virtual void | includeToExecute (std::deque< CommandObject * > &executionQueue) |
virtual int | count () |
virtual void | clear () |
Private Attributes | |
std::deque< CommandObject * > | internalCommands |
Definition at line 16 of file ComposedCommand.h.
ComposedCommand::ComposedCommand | ( | ) |
ComposedCommand::~ComposedCommand | ( | ) | [virtual] |
Definition at line 22 of file ComposedCommand.cxx.
References clear().
00023 { 00024 clear(); 00025 }
void ComposedCommand::addCommand | ( | CommandObject * | nwCommand | ) |
Definition at line 35 of file ComposedCommand.cxx.
References internalCommands.
00036 { 00037 internalCommands.push_back(nwCommand); 00038 }
void ComposedCommand::clear | ( | ) | [virtual] |
Implements CommandObject.
Definition at line 73 of file ComposedCommand.cxx.
References internalCommands.
Referenced by ~ComposedCommand().
00074 { 00075 while( internalCommands.size()>0 ) 00076 { 00077 internalCommands.back()->clear(); 00078 internalCommands.pop_back(); 00079 } 00080 internalCommands.clear(); 00081 }
int ComposedCommand::count | ( | ) | [virtual] |
Implements CommandObject.
Definition at line 58 of file ComposedCommand.cxx.
References internalCommands.
00059 { 00060 int count = 0; 00061 int i =0; 00062 while( i<internalCommands.size() ) 00063 { 00064 count += internalCommands[i]->count(); 00065 i++; 00066 } 00067 return count; 00068 }
void ComposedCommand::includeToExecute | ( | std::deque< CommandObject * > & | executionQueue | ) | [virtual] |
Implements CommandObject.
Definition at line 44 of file ComposedCommand.cxx.
References internalCommands.
00045 { 00046 std::deque<CommandObject *>::iterator actualCommandIter = internalCommands.end(); 00047 while( actualCommandIter != internalCommands.begin()) 00048 { 00049 (*actualCommandIter)->includeToExecute(executionQueue); 00050 actualCommandIter--; 00051 } 00052 }
std::deque< CommandObject *> ComposedCommand::internalCommands [private] |
Definition at line 65 of file ComposedCommand.h.
Referenced by addCommand(), clear(), count(), and includeToExecute().