00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef VTK_SEQUENCE_CONTAINER_H_
00017 # define VTK_SEQUENCE_CONTAINER_H_
00018 # include "vtkContainer.h"
00019 # include "vtkSequenceIterator.h"
00020
00021 class vtkObjectBaseComparison;
00022
00041 class VTK_CONTAINERS_EXPORT vtkSequenceContainer
00042 : public vtkContainer
00043 {
00044 public:
00045 vtkTypeRevisionMacro (vtkSequenceContainer, vtkContainer);
00046 void PrintSelf (ostream&, vtkIndent);
00047
00052 virtual int Swap (vtkSequenceContainer* container) = 0;
00053
00058 virtual int Copy (vtkSequenceContainer* container) = 0;
00059
00066 virtual vtkObjectBase* At (vtkIdType position) const { return NULL; }
00067
00081 virtual int Insert (vtkIdType position,
00082 vtkObjectBase* item) = 0;
00083
00099 virtual int Insert (vtkIdType position,
00100 vtkSequenceContainer* sequence) = 0;
00101
00119 virtual int Insert (vtkIdType position,
00120 vtkSequenceContainer* sequence,
00121 vtkIdType seqBeg,
00122 vtkIdType seqEnd) = 0;
00123
00128 virtual int Assign (vtkIdType position,
00129 vtkObjectBase* item) = 0;
00130
00135 virtual int PushFront (vtkObjectBase* item) = 0;
00136
00142 virtual int PopFront (void) = 0;
00143
00148 virtual int PushBack (vtkObjectBase* item) = 0;
00149
00155 virtual int PopBack (void) = 0;
00156
00161 virtual int Erase (vtkIdType position) = 0;
00162
00167 virtual int Erase (vtkIdType pos1, vtkIdType pos2) = 0;
00168
00173 virtual int Erase (vtkObjectBase* item) = 0;
00174
00179 virtual int Clear (vtkObjectBase* item) = 0;
00180
00185 virtual vtkIdType Find (vtkObjectBase* item) const { return -1; }
00186
00191 virtual int Reverse (void) = 0;
00192
00199 virtual int Reverse (vtkIdType pos1, vtkIdType pos2) = 0;
00200
00205 virtual int Sort (void) = 0;
00206
00213 virtual int Unique (void) = 0;
00214
00221 virtual int Rotate (vtkIdType index) = 0;
00222
00229 virtual int Shuffle (void) = 0;
00230
00232 virtual vtkSequenceIterator* CreateIterator (void) = 0;
00233
00234 protected:
00235 vtkSequenceContainer (void);
00236 ~vtkSequenceContainer();
00237
00238 private:
00239
00242 int Swap (vtkContainer* a)
00243 { return this->Swap(static_cast<vtkSequenceContainer*>(a)); }
00244 int Copy (vtkContainer* a)
00245 { return this->Copy(static_cast<vtkSequenceContainer*>(a)); }
00247
00248
00249 private:
00255 vtkSequenceContainer (const vtkSequenceContainer&);
00256 void operator= (const vtkSequenceContainer&);
00258 };
00259
00260 #endif
00261
00262
00263
00264