00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef VTK_OBJECT_BASE_STACK_H_
00017 # define VTK_OBJECT_BASE_STACK_H_
00018 # include "vtkAdaptorContainer.h"
00019
00020 class vtkObjectBaseStackInternal;
00021
00043 class VTK_CONTAINERS_EXPORT vtkObjectBaseStack
00044 : public vtkAdaptorContainer
00045 {
00046 public:
00047 static vtkObjectBaseStack* New (void);
00048 vtkTypeRevisionMacro (vtkObjectBaseStack, vtkAdaptorContainer);
00049 void PrintSelf (ostream&, vtkIndent);
00050
00051 virtual vtkIdType GetSize (void) const;
00052 virtual int IsEmpty (void) const;
00053 virtual vtkIdType GetMaxSize (void) const;
00054 virtual int Clear (void);
00055
00060 virtual int Swap (vtkObjectBaseStack* container);
00061
00066 virtual int Copy (vtkObjectBaseStack* container);
00067
00070 vtkIdType GetSizeLimit (void) const;
00071 void SetSizeLimit (vtkIdType limit);
00082 virtual int Push (vtkObjectBase* item);
00083
00091 int Pop (void);
00092
00094 virtual vtkObjectBase* Top (void) const;
00105 virtual vtkObjectBase* At (vtkIdType position) const;
00106
00114 int PopBottom (void);
00117 protected:
00118 vtkObjectBaseStack (void);
00119 ~vtkObjectBaseStack();
00120
00121 void ReportReferences (vtkGarbageCollector*);
00122
00123 private:
00124
00125 vtkObjectBaseStackInternal* Internal;
00126
00133 vtkObjectBase* Front (void) const;
00134
00139 vtkObjectBase* Back (void) const;
00144 int Swap (vtkAdaptorContainer* a)
00145 { return this->Swap(static_cast<vtkObjectBaseStack*>(a)); }
00146 int Copy (vtkAdaptorContainer* a)
00147 { return this->Copy(static_cast<vtkObjectBaseStack*>(a)); }
00149
00150
00151 private:
00157 vtkObjectBaseStack (const vtkObjectBaseStack&);
00158 void operator= (const vtkObjectBaseStack&);
00160 };
00161
00162
00163 inline vtkObjectBase*
00164 vtkObjectBaseStack::Top (void) const
00165 {
00166 return this->Back();
00167 }
00168
00169 #endif
00170
00171
00172
00173