OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkIdListCollection.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkIdListCollection.h,v $
5   Language:  C++
6   Date:      $Date: 2002/12/26 18:24:21 $
7   Version:   $Revision: 1.2 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
13      This software is distributed WITHOUT ANY WARRANTY; without even 
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notice for more information.
16
17 =========================================================================*/
18 // .NAME vtkIdListCollection - maintain an unordered list of dataarray objects
19 // .SECTION Description
20 // vtkIdListCollection is an object that creates and manipulates lists of
21 // datasets. See also vtkCollection and subclasses.
22
23 #ifndef __vtkIdListCollection_h
24 #define __vtkIdListCollection_h
25
26 #include "vtkCollection.h"
27
28 #include "vtkIdList.h" // Needed for inline methods
29
30 class VTK_COMMON_EXPORT vtkIdListCollection : public vtkCollection
31 {
32 public:
33   static vtkIdListCollection *New();
34   vtkTypeRevisionMacro(vtkIdListCollection,vtkCollection);
35
36   // Description:
37   // Add a dataset to the list.
38   void AddItem(vtkIdList *ds) {
39     this->vtkCollection::AddItem((vtkObject *)ds);};
40   
41   // Description:
42   // Get the next dataset in the list.
43   vtkIdList *GetNextItem() { 
44     return static_cast<vtkIdList *>(this->GetNextItemAsObject());};
45
46   // Description:
47   // Get the ith dataset in the list.
48   vtkIdList *GetItem(int i) { 
49     return static_cast<vtkIdList *>(this->GetItemAsObject(i));};
50   
51 protected:
52   vtkIdListCollection() {};
53   ~vtkIdListCollection() {};
54
55
56 private:
57   // hide the standard AddItem from the user and the compiler.
58   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
59
60 private:
61   vtkIdListCollection(const vtkIdListCollection&);  // Not implemented.
62   void operator=(const vtkIdListCollection&);  // Not implemented.
63 };
64
65
66 #endif