00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef VTK_OBJECT_BASE_SET_H_
00017 # define VTK_OBJECT_BASE_SET_H_
00018 # include "vtkContainer.h"
00019 # include "vtkObjectBaseSetIterator.h"
00020
00021 class vtkObjectBaseSetInternal;
00022
00043 class VTK_CONTAINERS_EXPORT vtkObjectBaseSet
00044 : public vtkContainer
00045 {
00046 public:
00047 static vtkObjectBaseSet* New (void);
00048 vtkTypeRevisionMacro (vtkObjectBaseSet, vtkContainer);
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 (vtkObjectBaseSet* container);
00061
00066 virtual int Copy (vtkObjectBaseSet* container);
00067
00069 vtkIdType GetCapacity (void) const;
00070
00075 virtual int Find (vtkObjectBase* item) const;
00076
00081 virtual int Insert (vtkIdType position,
00082 vtkObjectBase* item);
00083
00088 virtual int Erase (vtkIdType position);
00089
00094 virtual int Erase (vtkIdType pos1, vtkIdType pos2);
00095
00100 virtual int Erase (vtkObjectBase* item);
00101
00119 virtual int CreateUnion (vtkObjectBaseSet* source,
00120 vtkObjectBaseSet* destination);
00121
00136 virtual int CreateIntersection (vtkObjectBaseSet* source,
00137 vtkObjectBaseSet* destination);
00138
00153 virtual int CreateDifference (vtkObjectBaseSet* source,
00154 vtkObjectBaseSet* destination);
00155
00171 virtual int CreateSymmetricDifference (vtkObjectBaseSet* source,
00172 vtkObjectBaseSet* destination);
00181 vtkObjectBase* Front (void) const;
00182
00187 vtkObjectBase* Back (void) const;
00191 vtkObjectBaseSetIterator* CreateIterator (void);
00192
00193 protected:
00194 vtkObjectBaseSet (void);
00195 ~vtkObjectBaseSet();
00196
00197 void ReportReferences (vtkGarbageCollector*);
00198
00199 private:
00200
00201 vtkObjectBaseSetInternal* Internal;
00202
00203 friend class vtkObjectBaseSetIterator;
00204
00207 int Swap (vtkContainer* a)
00208 { return this->Swap(static_cast<vtkObjectBaseSet*>(a)); }
00209 int Copy (vtkContainer* a)
00210 { return this->Copy(static_cast<vtkObjectBaseSet*>(a)); }
00212
00213
00214 private:
00220 vtkObjectBaseSet (const vtkObjectBaseSet&);
00221 void operator= (const vtkObjectBaseSet&);
00223 };
00224
00225 #endif
00226
00227
00228
00229