creaContours_lib
ComposedCommand Class Reference

#include <ComposedCommand.h>

Inheritance diagram for ComposedCommand:
Collaboration diagram for ComposedCommand:

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 41 of file ComposedCommand.h.

Constructor & Destructor Documentation

ComposedCommand::ComposedCommand ( )

Definition at line 42 of file ComposedCommand.cxx.

43  {
44 
45  }
ComposedCommand::~ComposedCommand ( )
virtual

Definition at line 47 of file ComposedCommand.cxx.

References clear().

48  {
49  clear();
50  }

Here is the call graph for this function:

Member Function Documentation

void ComposedCommand::addCommand ( CommandObject nwCommand)

Definition at line 60 of file ComposedCommand.cxx.

References internalCommands.

61  {
62  internalCommands.push_back(nwCommand);
63  }
void ComposedCommand::clear ( )
virtual

Implements CommandObject.

Definition at line 98 of file ComposedCommand.cxx.

References internalCommands.

Referenced by ~ComposedCommand().

99  {
100  while( internalCommands.size()>0 )
101  {
102  internalCommands.back()->clear();
103  internalCommands.pop_back();
104  }
105  internalCommands.clear();
106  }

Here is the caller graph for this function:

int ComposedCommand::count ( )
virtual

Implements CommandObject.

Definition at line 83 of file ComposedCommand.cxx.

References internalCommands.

84  {
85  int count = 0;
86  int i =0;
87  while( i<internalCommands.size() )
88  {
89  count += internalCommands[i]->count();
90  i++;
91  }
92  return count;
93  }
void ComposedCommand::includeToExecute ( std::deque< CommandObject * > &  executionQueue)
virtual

Implements CommandObject.

Definition at line 69 of file ComposedCommand.cxx.

References internalCommands.

70  {
71  std::deque<CommandObject *>::iterator actualCommandIter = internalCommands.end();
72  while( actualCommandIter != internalCommands.begin())
73  {
74  (*actualCommandIter)->includeToExecute(executionQueue);
75  actualCommandIter--;
76  }
77  }

Member Data Documentation

std::deque< CommandObject *> ComposedCommand::internalCommands
private

Definition at line 90 of file ComposedCommand.h.

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


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