ComposedCommand Class Reference

#include <ComposedCommand.h>

Inheritance diagram for ComposedCommand:

Inheritance graph
[legend]
Collaboration diagram for ComposedCommand:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

Definition at line 16 of file ComposedCommand.h.


Constructor & Destructor Documentation

ComposedCommand::ComposedCommand (  ) 

Definition at line 17 of file ComposedCommand.cxx.

00018         {
00019 
00020         }

ComposedCommand::~ComposedCommand (  )  [virtual]

Definition at line 22 of file ComposedCommand.cxx.

References clear().

00023         {
00024                 clear();        
00025         }

Here is the call graph for this function:


Member Function Documentation

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         }

Here is the caller graph for this function:

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         }


Member Data Documentation

Definition at line 65 of file ComposedCommand.h.

Referenced by addCommand(), clear(), count(), and includeToExecute().


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

Generated on Wed Jun 27 23:28:33 2012 for creaContours_lib by  doxygen 1.5.7.1