00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkObjectBaseSet.h,v 1.5 2004/06/03 18:58:28 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkextensions.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_SET_H_ 00017 # define VTK_OBJECT_BASE_SET_H_ 00018 # include "vtkContainer.h" 00019 # include "vtkObjectBaseSetIterator.h" // Covariant return type. 00020 00021 VTK_EXTENSIONS_CONTAINERS_NAMESPACE_BEGIN 00022 00023 class vtkObjectBaseSetInternal; 00024 00038 class VTK_EXTENSIONS_CONTAINERS_EXPORT vtkObjectBaseSet 00039 : public vtkContainer 00040 { 00041 public: 00042 static vtkObjectBaseSet* New (void); 00043 vtkTypeRevisionMacro (vtkObjectBaseSet, vtkContainer); 00044 00046 vtkIdType GetSize (void) const; 00047 00049 int IsEmpty (void) const; 00050 00052 vtkIdType GetMaxSize (void) const; 00053 00055 void Clear (void); 00056 00061 virtual int Swap (vtkObjectBaseSet* container); 00062 00064 vtkIdType GetCapacity (void) const; 00065 00070 virtual int Find (vtkObjectBase* object) const; 00071 00076 virtual int Insert (vtkObjectBase* object); 00077 00082 virtual int Erase (vtkObjectBase* object); 00083 00090 vtkObjectBase* Front (void) const; 00091 00096 vtkObjectBase* Back (void) const; 00100 vtkObjectBaseSetIterator* CreateIterator (void); 00101 00102 protected: 00103 vtkObjectBaseSet (void); 00104 ~vtkObjectBaseSet(); 00105 00106 private: 00107 //BTX 00108 vtkObjectBaseSetInternal* Internal; 00109 00110 friend class vtkObjectBaseSetIterator; 00111 00114 int Swap (vtkContainer* a) 00115 { return this->Swap(static_cast<vtkObjectBaseSet*>(a)); } 00117 //ETX 00118 00119 private: 00125 vtkObjectBaseSet (const vtkObjectBaseSet&); 00126 void operator= (const vtkObjectBaseSet&); 00128 }; 00129 00130 VTK_EXTENSIONS_CONTAINERS_NAMESPACE_END 00131 00132 #endif /* VTK_OBJECT_BASE_SET_H_ */ 00133 /* 00134 * End of: $Id: vtkObjectBaseSet.h,v 1.5 2004/06/03 18:58:28 xpxqx Exp $. 00135 * 00136 */