#include <context.h>
Collaboration diagram for context::Context:

Public Methods | |
| Context (const string &argd) | |
| Constructs an object of this type and adds it to the ContextStack. | |
| ~Context () | |
| Destructs this object and removes it from the ContextStack. | |
| const std::string & | getDescription () const |
| Returns a description of this object. | |
Static Public Methods | |
| void | print (const vector< string > &list, size_t start=0, size_t end=0) |
| Prints a vector of strings as a stack (FILO). | |
|
|
Constructs an object of this type and adds it to the ContextStack.
00036 :
00037 description(argd)
00038 {
00039 ContextStack::getInstanceOf().push(*this);
00040 }
|
|
|
Destructs this object and removes it from the ContextStack.
00047 {
00048 ContextStack::getInstanceOf().pop(*this);
00049 }
|
|
|
Returns a description of this object.
00056 {
00057 return description;
00058 }
|
|
||||||||||||||||
|
Prints a vector of strings as a stack (FILO).
00069 {
00070 if (start>=list.size()) return;
00071 end=(end>start)?end:list.size();
00072
00073 for (size_t i=end; i>start; --i)
00074 {
00075 std::cout<<list[i-1]<<"\n";
00076 }
00077 }
|
1.2.18