Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Composite Class Reference

Inheritance diagram for Composite:

Undoable List of all members.

Public Member Functions

 Composite ()
virtual ~Composite ()
UndoMemento GetMemento (void)
void ProcVec (vector< UndoMemento > umv)
void Increment ()
void Print ()

Private Attributes

UndoableInt i1
UndoableInt i2
UndoableInt i3

Constructor & Destructor Documentation

Composite::Composite  )  [inline]
 

Definition at line 138 of file test-Undoable.cxx.

References i1, i2, and i3.

00138 : i1(1), i2(2), i3(3) {}

virtual Composite::~Composite  )  [inline, virtual]
 

Definition at line 139 of file test-Undoable.cxx.

00139 {}


Member Function Documentation

UndoMemento Composite::GetMemento void   )  [inline, virtual]
 

Implements Undoable.

Definition at line 142 of file test-Undoable.cxx.

References UndoableInt::GetMemento(), i1, i2, i3, ProcVec(), and UndoMemento.

00142                                  {
00143         vector<UndoMemento> umv;
00144         umv.push_back(i1.GetMemento());
00145         umv.push_back(i2.GetMemento());
00146         umv.push_back(i3.GetMemento());
00147         return SigC::bind(SigC::slot_class(*this,&Composite::ProcVec),umv);
00148     }

void Composite::Increment  )  [inline]
 

Definition at line 155 of file test-Undoable.cxx.

References UndoableInt::Get(), i1, i2, i3, and UndoableInt::Set().

Referenced by test2().

00155                      { 
00156         i1.Set(i1.Get()+1);
00157         i2.Set(i2.Get()+1);
00158         i3.Set(i3.Get()+1);
00159     }

void Composite::Print  )  [inline]
 

Definition at line 161 of file test-Undoable.cxx.

References UndoableInt::Get(), i1, i2, and i3.

Referenced by test2().

00161                  {
00162         cout << "i1="<< i1.Get()
00163              << " i2="<< i2.Get()
00164              << " i3="<< i3.Get()
00165              << endl;
00166     }

void Composite::ProcVec vector< UndoMemento umv  )  [inline]
 

Definition at line 150 of file test-Undoable.cxx.

Referenced by GetMemento().

00150                                           {
00151         vector<UndoMemento>::iterator vit;
00152         for (vit = umv.begin(); vit != umv.end(); ++vit) (*vit)();
00153     }


Member Data Documentation

UndoableInt Composite::i1 [private]
 

Definition at line 169 of file test-Undoable.cxx.

Referenced by Composite(), GetMemento(), Increment(), and Print().

UndoableInt Composite::i2 [private]
 

Definition at line 169 of file test-Undoable.cxx.

Referenced by Composite(), GetMemento(), Increment(), and Print().

UndoableInt Composite::i3 [private]
 

Definition at line 169 of file test-Undoable.cxx.

Referenced by Composite(), GetMemento(), Increment(), and Print().


The documentation for this class was generated from the following file:
Generated on Mon Feb 15 11:09:00 2010 for loon by  doxygen 1.3.9.1