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

CC_IntStack.h

00001 00002 00003 00004 // 00005 // Copyright 2003 P&P Software GmbH - All Rights Reserved 00006 // 00007 // CC_IntStack.h 00008 // 00009 // Version 1.0 00010 // Date 30.08.03 (Version 1.0) 00011 // Author A. Pasetti (P&P Software) 00012 // 00013 00014 #ifndef CC_IntStackH 00015 #define CC_IntStackH 00016 00017 #include "../GeneralInclude/ForwardDeclarations.h" 00018 #include "../GeneralInclude/BasicTypes.h" 00019 #include "../Base/CC_RootObject.h" 00020 00021 00036 class CC_IntStack : public CC_RootObject { 00037 00038 private: 00039 unsigned int size; 00040 unsigned int stackPointer; // index of next free location on stack 00041 int* pStack; // Array of pointers to the items in the stack. 00042 00043 public: 00044 00050 CC_IntStack(); 00051 00061 void push(int newItem); 00062 00073 int pop(); 00074 00086 void setStackSize(unsigned int size); 00087 00093 unsigned int getStackSize() const; 00094 00099 unsigned int getNumberOfItems() const; 00100 00105 bool isEmpty() const; 00106 00111 bool isFull() const; 00112 00118 void reset(); 00119 00126 virtual bool isObjectConfigured(); 00127 00128 }; 00129 00130 #endif 00131 00132
Copyright 2003 P&P Software GmbH - All Rights Reserved