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 "vtkInformationKey.h"
28 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
29 
30 class vtkInformationObjectBaseVectorValue;
31 
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent);
38 
45  const char* location,
46  const char* requiredClass=0);
47  //
50 
52  void Clear(vtkInformation* info);
55  void Resize(vtkInformation* info, int n);
57 
58  int Size(vtkInformation* info);
59  int Length(vtkInformation* info){ return this->Size(info); }
61 
62  void Append(vtkInformation* info, vtkObjectBase *value);
64  void Set(vtkInformation* info, vtkObjectBase *value, int i);
66 
69  void SetRange(vtkInformation* info,
71  int from,
72  int to,
73  int n);
75 
77 
80  void GetRange(vtkInformation *info,
81  vtkObjectBase **dest,
82  int from,
83  int to,
84  int n);
86 
88  vtkObjectBase *Get(vtkInformation* info, int idx);
89 
90  // _escription:
91  // Get a pointer to the first vtkObjectBase in the vector. We are
92  // uysing a vector of smart pointers so this is not easy to
93  // implement.
94  // vtkObjectBase **Get(vtkInformation* info);
95 
99  virtual void ShallowCopy(vtkInformation* from, vtkInformation* to);
100 
102  virtual void Print(ostream& os, vtkInformation* info);
103 
104 protected:
105  // The type required of all objects stored with this key.
106  const char* RequiredClass;
107 
108 private:
111  void CreateObjectBase();
114  bool ValidateDerivedType(vtkInformation* info,vtkObjectBase* aValue);
117  vtkInformationObjectBaseVectorValue *GetObjectBaseVector(vtkInformation *info);
118 
119  //
121  void operator=(const vtkInformationObjectBaseVectorKey&); // Not implemented.
122 };
123 
124 #endif