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

Detailed Description

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


Constructor & Destructor Documentation

Composite::Composite (  )  [inline]

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

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, and ProcVec().

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

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

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

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

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

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

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


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

Generated on 17 Jun 2018 for loon by  doxygen 1.6.1