OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkDataSetCollection.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkDataSetCollection.h,v $
5   Language:  C++
6   Date:      $Date: 2002/12/26 18:24:21 $
7   Version:   $Revision: 1.18 $
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 vtkDataSetCollection - maintain an unordered list of dataset objects
19 // .SECTION Description
20 // vtkDataSetCollection is an object that creates and manipulates lists of
21 // datasets. See also vtkCollection and subclasses.
22
23 #ifndef __vtkDataSetCollection_h
24 #define __vtkDataSetCollection_h
25
26 #include "vtkCollection.h"
27
28 #include "vtkDataSet.h" // Needed for inline methods.
29
30 class VTK_COMMON_EXPORT vtkDataSetCollection : public vtkCollection
31 {
32 public:
33   static vtkDataSetCollection *New();
34   vtkTypeRevisionMacro(vtkDataSetCollection,vtkCollection);
35
36   // Description:
37   // Add a dataset to the list.
38   void AddItem(vtkDataSet *ds) {
39     this->vtkCollection::AddItem((vtkObject *)ds);};
40   
41   // Description:
42   // Get the next dataset in the list.
43   vtkDataSet *GetNextItem() { 
44     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
45
46   // Description:
47   // Get the ith dataset in the list.
48   vtkDataSet *GetItem(int i) { 
49     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
50   
51 protected:
52   vtkDataSetCollection() {};
53   ~vtkDataSetCollection() {};
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   vtkDataSetCollection(const vtkDataSetCollection&);  // Not implemented.
62   void operator=(const vtkDataSetCollection&);  // Not implemented.
63 };
64
65
66 #endif