VTK
vtkInformationObjectBaseVectorKey.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInformationObjectBaseVectorKey.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkInformationObjectBaseVectorKey_h
25 #define vtkInformationObjectBaseVectorKey_h
26 
27 #include "vtkCommonCoreModule.h" // For export macro
28 #include "vtkInformationKey.h"
29 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
30 
31 class vtkInformationObjectBaseVectorValue;
32 
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent);
39 
46  const char* location,
47  const char* requiredClass=0);
48  //
51 
53 
58  static vtkInformationObjectBaseVectorKey* MakeKey(const char* name, const char* location,
59  const char* requiredClass=0)
60  {
61  return new vtkInformationObjectBaseVectorKey(name, location, requiredClass);
62  }
64 
66  void Clear(vtkInformation* info);
69  void Resize(vtkInformation* info, int n);
71 
72  int Size(vtkInformation* info);
73  int Length(vtkInformation* info){ return this->Size(info); }
75 
76  void Append(vtkInformation* info, vtkObjectBase *value);
78  void Set(vtkInformation* info, vtkObjectBase *value, int i);
80 
83  void SetRange(vtkInformation* info,
85  int from,
86  int to,
87  int n);
89 
91 
94  void GetRange(vtkInformation *info,
95  vtkObjectBase **dest,
96  int from,
97  int to,
98  int n);
100 
102  vtkObjectBase *Get(vtkInformation* info, int idx);
103 
104  // _escription:
105  // Get a pointer to the first vtkObjectBase in the vector. We are
106  // uysing a vector of smart pointers so this is not easy to
107  // implement.
108  // vtkObjectBase **Get(vtkInformation* info);
109 
113  virtual void ShallowCopy(vtkInformation* from, vtkInformation* to);
114 
116  virtual void Print(ostream& os, vtkInformation* info);
117 
118 protected:
119  // The type required of all objects stored with this key.
120  const char* RequiredClass;
121 
122 private:
125  void CreateObjectBase();
128  bool ValidateDerivedType(vtkInformation* info,vtkObjectBase* aValue);
131  vtkInformationObjectBaseVectorValue *GetObjectBaseVector(vtkInformation *info);
132 
133  //
135  void operator=(const vtkInformationObjectBaseVectorKey&); // Not implemented.
136 };
137 
138 #endif
virtual void ShallowCopy(vtkInformation *from, vtkInformation *to)=0
Store vtkAlgorithm input/output information.
#define VTKCOMMONCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
void Print(vtkInformation *info)
Superclass for vtkInformation keys.
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkInformationObjectBaseVectorKey * MakeKey(const char *name, const char *location, const char *requiredClass=0)
abstract base class for most VTK objects
Definition: vtkObjectBase.h:59
Key for vtkObjectBase vector values.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)