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

vtkObjectBaseVector.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: vtkObjectBaseVector.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_VECTOR_H_
00017 #  define VTK_OBJECT_BASE_VECTOR_H_
00018 #  include "vtkSequenceContainer.h"
00019 #  include "vtkObjectBaseVectorIterator.h" // Covariant return type.
00020 
00021 class vtkObjectBaseVectorInternal;
00022 
00040 class VTK_CONTAINERS_EXPORT vtkObjectBaseVector
00041   : public vtkSequenceContainer
00042 {
00043 public:
00044   static vtkObjectBaseVector* New (void);
00045   vtkTypeRevisionMacro (vtkObjectBaseVector, vtkSequenceContainer);
00046   void PrintSelf (ostream&, vtkIndent);
00047 
00048   virtual vtkIdType     GetSize (void) const;
00049   virtual int           IsEmpty (void) const;
00050   virtual vtkIdType     GetMaxSize (void) const;
00051   virtual int           Clear (void);
00052 
00057   virtual int           Swap (vtkObjectBaseVector* container);
00058 
00063   virtual int           Copy (vtkObjectBaseVector* container);
00064 
00073   virtual vtkObjectBase*        At (vtkIdType position) const;
00074 
00088   virtual int                   Insert (vtkIdType       position,
00089                                         vtkObjectBase*  item);
00090 
00106   virtual int                   Insert (vtkIdType            position,
00107                                         vtkObjectBaseVector* sequence);
00108 
00126   virtual int                   Insert (vtkIdType            position,
00127                                         vtkObjectBaseVector* sequence,
00128                                         vtkIdType            seqBeg,
00129                                         vtkIdType            seqEnd);
00130 
00135   virtual int                   Assign (vtkIdType      position,
00136                                         vtkObjectBase* item);
00137 
00142   virtual int                   PushBack (vtkObjectBase* item);
00143 
00149   int                           PopBack (void);
00150 
00155   int                           Erase (vtkIdType position);
00156 
00161   int                           Erase (vtkIdType pos1, vtkIdType pos2);
00162 
00163 
00165   void                          Reserve (vtkIdType capacity);
00179   virtual int                   PushFront (vtkObjectBase* item);
00180 
00191   int                           PopFront (void);
00192 
00197   int                           Erase (vtkObjectBase* item);
00198 
00203   int                           Clear (vtkObjectBase* item);
00204 
00209   vtkIdType                     Find (vtkObjectBase* item) const;
00210 
00215   int                           Reverse (void);
00216 
00223   int                           Reverse (vtkIdType pos1, vtkIdType pos2);
00224 
00229   int                           Sort (void);
00230 
00237   int                           Unique (void);
00238 
00245   int                           Rotate (vtkIdType index);
00246 
00253   int                           Shuffle (void);
00262   vtkObjectBase*                Front (void) const;
00263 
00268   vtkObjectBase*                Back (void) const;
00272   vtkObjectBaseVectorIterator* CreateIterator (void);
00273 
00274 protected:
00275   vtkObjectBaseVector (void);
00276   ~vtkObjectBaseVector();
00277 
00278   void  ReportReferences (vtkGarbageCollector*);
00279 
00280 private:
00281   //BTX
00282   vtkObjectBaseVectorInternal* Internal;
00283 
00284   friend class vtkObjectBaseVectorIterator;
00285 
00288   int Swap (vtkSequenceContainer* a)
00289     { return this->Swap(static_cast<vtkObjectBaseVector*>(a)); }
00290   int Copy (vtkSequenceContainer* a)
00291     { return this->Copy(static_cast<vtkObjectBaseVector*>(a)); }
00292   int Insert (vtkIdType pos, vtkSequenceContainer* a)
00293     { return this->Insert(pos, static_cast<vtkObjectBaseVector*>(a)); }
00294   int Insert (vtkIdType pos, vtkSequenceContainer* a,
00295               vtkIdType sbeg, vtkIdType send)
00296     { return this->Insert(pos,static_cast<vtkObjectBaseVector*>(a),sbeg,send); }
00298   //ETX
00299 
00300 private:
00306   vtkObjectBaseVector (const vtkObjectBaseVector&);
00307   void operator= (const vtkObjectBaseVector&);
00309 };
00310 
00311 #endif /* VTK_OBJECT_BASE_VECTOR_H_ */
00312 /* 
00313  * End of: $Id: vtkObjectBaseVector.h,v 1.4 2005/06/24 23:17:16 xpxqx Exp $.
00314  * 
00315  */

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