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

vtkObjectBaseDeque.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: vtkObjectBaseDeque.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_DEQUE_H_
00017 #  define VTK_OBJECT_BASE_DEQUE_H_
00018 #  include "vtkSequenceContainer.h"
00019 #  include "vtkObjectBaseDequeIterator.h" // Covariant return type.
00020 
00021 class vtkObjectBaseDequeInternal;
00022 
00042 class VTK_CONTAINERS_EXPORT vtkObjectBaseDeque
00043   : public vtkSequenceContainer
00044 {
00045 public:
00046   static vtkObjectBaseDeque* New (void);
00047   vtkTypeRevisionMacro (vtkObjectBaseDeque, vtkSequenceContainer);
00048   void PrintSelf (ostream&, vtkIndent);
00049 
00050   virtual vtkIdType     GetSize (void) const;
00051   virtual int           IsEmpty (void) const;
00052   virtual vtkIdType     GetMaxSize (void) const;
00053   virtual int           Clear (void);
00054 
00059   virtual int           Swap (vtkObjectBaseDeque* container);
00060 
00065   virtual int           Copy (vtkObjectBaseDeque* container);
00066 
00075   virtual vtkObjectBase*        At (vtkIdType position) const;
00076 
00090   virtual int                   Insert (vtkIdType       position,
00091                                         vtkObjectBase*  item);
00092 
00108   virtual int                   Insert (vtkIdType           position,
00109                                         vtkObjectBaseDeque* sequence);
00110 
00128   virtual int                   Insert (vtkIdType           position,
00129                                         vtkObjectBaseDeque* sequence,
00130                                         vtkIdType           seqBeg,
00131                                         vtkIdType           seqEnd);
00132 
00137   virtual int                   Assign (vtkIdType      position,
00138                                         vtkObjectBase* item);
00139 
00144   virtual int                   PushFront (vtkObjectBase* item);
00145 
00151   int                           PopFront (void);
00152 
00157   virtual int                   PushBack (vtkObjectBase* item);
00158 
00164   int                           PopBack (void);
00165 
00170   int                           Erase (vtkIdType position);
00171 
00176   int                           Erase (vtkIdType pos1, vtkIdType pos2);
00185   int                           Erase (vtkObjectBase* item);
00186 
00191   int                           Clear (vtkObjectBase* object);
00192 
00197   vtkIdType                     Find (vtkObjectBase* item) const;
00198 
00203   int                           Reverse (void);
00204 
00211   int                           Reverse (vtkIdType pos1, vtkIdType pos2);
00212 
00217   int                           Sort (void);
00218 
00225   int                           Unique (void);
00226 
00233   int                           Rotate (vtkIdType index);
00234 
00241   int                           Shuffle (void);
00250   vtkObjectBase*                Front (void) const;
00251 
00256   vtkObjectBase*                Back (void) const;
00260   vtkObjectBaseDequeIterator* CreateIterator (void);
00261 
00262 protected:
00263   vtkObjectBaseDeque (void);
00264   ~vtkObjectBaseDeque();
00265 
00266   void  ReportReferences (vtkGarbageCollector*);
00267 
00268 private:
00269   //BTX
00270   vtkObjectBaseDequeInternal* Internal;
00271 
00272   friend class vtkObjectBaseDequeIterator;
00273 
00276   int Swap (vtkSequenceContainer* a)
00277     { return this->Swap(static_cast<vtkObjectBaseDeque*>(a)); }
00278   int Copy (vtkSequenceContainer* a)
00279     { return this->Copy(static_cast<vtkObjectBaseDeque*>(a)); }
00280   int Insert (vtkIdType pos, vtkSequenceContainer* a)
00281     { return this->Insert(pos, static_cast<vtkObjectBaseDeque*>(a)); }
00282   int Insert (vtkIdType pos, vtkSequenceContainer* a,
00283               vtkIdType sbeg, vtkIdType send)
00284     { return this->Insert(pos,static_cast<vtkObjectBaseDeque*>(a),sbeg,send); }
00286   //ETX
00287 
00288 private:
00294   vtkObjectBaseDeque (const vtkObjectBaseDeque&);
00295   void operator= (const vtkObjectBaseDeque&);
00297 };
00298 
00299 #endif /* VTK_OBJECT_BASE_DEQUE_H_ */
00300 /* 
00301  * End of: $Id: vtkObjectBaseDeque.h,v 1.4 2005/06/24 23:17:16 xpxqx Exp $.
00302  * 
00303  */

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