Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkObjectBaseList.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * $Id: vtkObjectBaseList.h,v 1.4 2005/06/24 23:17:16 xpxqx Exp $
00004  *
00005  * Copyright (c) 2005 Sean McInerney
00006  * All rights reserved.
00007  *
00008  * See Copyright.txt or http://vtkcontainers.sourceforge.net/Copyright.html
00009  * for details.
00010  *
00011  *    This software is distributed WITHOUT ANY WARRANTY; without even 
00012  *    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013  *    PURPOSE.  See the above copyright notice for more information.
00014  *
00015  */
00016 #ifndef VTK_OBJECT_BASE_LIST_H_
00017 #  define VTK_OBJECT_BASE_LIST_H_
00018 #  include "vtkSequenceContainer.h"
00019 #  include "vtkObjectBaseListIterator.h" // Covariant return type.
00020 
00021 class vtkObjectBaseListInternal;
00022 
00045 class VTK_CONTAINERS_EXPORT vtkObjectBaseList
00046   : public vtkSequenceContainer
00047 {
00048 public:
00049   static vtkObjectBaseList* New (void);
00050   vtkTypeRevisionMacro (vtkObjectBaseList, vtkSequenceContainer);
00051   void PrintSelf (ostream&, vtkIndent);
00052 
00053   virtual vtkIdType     GetSize (void) const;
00054   virtual int           IsEmpty (void) const;
00055   virtual vtkIdType     GetMaxSize (void) const;
00056   virtual int           Clear (void);
00057 
00062   virtual int           Swap (vtkObjectBaseList* container);
00063 
00068   virtual int           Copy (vtkObjectBaseList* container);
00069 
00085   virtual int                   Insert (vtkIdType       position,
00086                                         vtkObjectBase*  item);
00087 
00103   virtual int                   Insert (vtkIdType          position,
00104                                         vtkObjectBaseList* sequence);
00105 
00123   virtual int                   Insert (vtkIdType          position,
00124                                         vtkObjectBaseList* sequence,
00125                                         vtkIdType          seqBeg,
00126                                         vtkIdType          seqEnd);
00127 
00132   virtual int                   Assign (vtkIdType      position,
00133                                         vtkObjectBase* item);
00134 
00139   virtual int                   PushFront (vtkObjectBase* item);
00140 
00146   int                           PopFront (void);
00147 
00152   virtual int                   PushBack (vtkObjectBase* item);
00153 
00159   int                           PopBack (void);
00160 
00165   int                           Erase (vtkIdType position);
00166 
00171   int                           Erase (vtkIdType pos1, vtkIdType pos2);
00172 
00177   int                           Reverse (void);
00178 
00185   int                           Reverse (vtkIdType pos1, vtkIdType pos2);
00186 
00191   int                           Sort (void);
00192 
00199   int                           Unique (void);
00200 
00212   virtual int                   Splice (vtkIdType          dstPos,
00213                                         vtkObjectBaseList* src);
00214 
00225   virtual int                   Splice (vtkIdType          dstPos,
00226                                         vtkObjectBaseList* src,
00227                                         vtkIdType          srcPos);
00228 
00243   virtual int                   Splice (vtkIdType          dstPos,
00244                                         vtkObjectBaseList* src,
00245                                         vtkIdType          srcBeg,
00246                                         vtkIdType          srcEnd);
00247 
00257   virtual int                   Merge (vtkObjectBaseList* src);
00268   virtual vtkObjectBase*        At (vtkIdType position) const;
00269 
00274   int                           Erase (vtkObjectBase* item);
00275 
00280   int                           Clear (vtkObjectBase* item);
00281 
00286   vtkIdType                     Find (vtkObjectBase* item) const;
00287 
00294   int                           Rotate (vtkIdType index);
00295 
00302   int                           Shuffle (void);
00311   vtkObjectBase*                Front (void) const;
00312 
00317   vtkObjectBase*                Back (void) const;
00321   vtkObjectBaseListIterator* CreateIterator (void);
00322 
00323 protected:
00324   vtkObjectBaseList (void);
00325   ~vtkObjectBaseList();
00326 
00327   void  ReportReferences (vtkGarbageCollector*);
00328 
00329 private:
00330   //BTX
00331   vtkObjectBaseListInternal* Internal;
00332 
00333   friend class vtkObjectBaseListIterator;
00334 
00337   int Swap (vtkSequenceContainer* a)
00338     { return this->Swap(static_cast<vtkObjectBaseList*>(a)); }
00339   int Copy (vtkSequenceContainer* a)
00340     { return this->Copy(static_cast<vtkObjectBaseList*>(a)); }
00341   int Insert (vtkIdType pos, vtkSequenceContainer* a)
00342     { return this->Insert(pos, static_cast<vtkObjectBaseList*>(a)); }
00343   int Insert (vtkIdType pos, vtkSequenceContainer* a,
00344               vtkIdType sbeg, vtkIdType send)
00345     { return this->Insert(pos,static_cast<vtkObjectBaseList*>(a),sbeg,send); }
00347   //ETX
00348 
00349 private:
00355   vtkObjectBaseList (const vtkObjectBaseList&);
00356   void operator= (const vtkObjectBaseList&);
00358 };
00359 
00360 #endif /* VTK_OBJECT_BASE_LIST_H_ */
00361 /* 
00362  * End of: $Id: vtkObjectBaseList.h,v 1.4 2005/06/24 23:17:16 xpxqx Exp $.
00363  * 
00364  */

Generated on Thu Jul 14 14:39:38 2005 for vtkContainers by doxygen 1.3.6