VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Common
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
32
class
VTK_COMMON_EXPORT
vtkInformationObjectBaseVectorKey
:
public
vtkInformationKey
33
{
34
public
:
35
vtkTypeMacro(
vtkInformationObjectBaseVectorKey
,
vtkInformationKey
);
36
void
PrintSelf
(ostream& os,
vtkIndent
indent);
38
44
vtkInformationObjectBaseVectorKey
(
const
char
*
name
,
45
const
char
*
location
,
46
const
char
* requiredClass=0);
47
//
48
~
vtkInformationObjectBaseVectorKey
();
50
52
53
void
Clear(
vtkInformation
*
info
);
54
// Description:
55
// Resize (extend) the vector to hold n objects. Any new elements
56
// created will be null initialized.
57
void
Resize(
vtkInformation
*
info
,
int
n);
58
// Description:
59
// Get the vector's length.
60
int
Size(
vtkInformation
*
info
);
61
int
Length
(
vtkInformation
*
info
){
return
this->Size(info); }
62
// Description:
63
// Put the value on the back of the vector, with ref counting.
64
void
Append(
vtkInformation
*
info
,
vtkObjectBase
*
value
);
65
// Description:
66
// Set element i of the vector to value. Resizes the vector
67
// if needed.
68
void
Set(
vtkInformation
*
info
,
vtkObjectBase
*
value
,
int
i);
69
// Description:
70
// Copy n values from the range in source defined by [from from+n-1]
71
// into the range in this vector defined by [to to+n-1]. Resizes
72
// the vector if needed.
73
void
SetRange(
vtkInformation
*
info
,
74
vtkObjectBase
**
source
,
75
int
from,
76
int
to,
77
int
n);
79
81
84
void
GetRange(
vtkInformation
*
info
,
85
vtkObjectBase
**dest,
86
int
from,
87
int
to,
88
int
n);
90
92
vtkObjectBase
*Get(
vtkInformation
*
info
,
int
idx);
93
94
// _escription:
95
// Get a pointer to the first vtkObjectBase in the vector. We are
96
// uysing a vector of smart pointers so this is not easy to
97
// implement.
98
// vtkObjectBase **Get(vtkInformation* info);
99
103
virtual
void
ShallowCopy
(
vtkInformation
* from,
vtkInformation
* to);
104
106
virtual
void
Print
(ostream& os,
vtkInformation
*
info
);
107
108
protected
:
109
// The type required of all objects stored with this key.
110
const
char
*
RequiredClass
;
111
112
private
:
114
116
void
CreateObjectBase();
117
// Description:
118
// Check insures that if RequiredClass is set then the
119
// type of aValue matches. return true if the two match.
120
bool
ValidateDerivedType(
vtkInformation
*
info
,
vtkObjectBase
* aValue);
121
// Description:
122
// Get the vector associated with this key, if there is
123
// none then associate a new vector with this key and return
124
// that.
125
vtkInformationObjectBaseVectorValue *GetObjectBaseVector(
vtkInformation
*
info
);
127
128
//
129
vtkInformationObjectBaseVectorKey
(
const
vtkInformationObjectBaseVectorKey
&);
// Not implemented.
130
void
operator=(
const
vtkInformationObjectBaseVectorKey
&);
// Not implemented.
131
};
132
133
#endif
Generated on Sun Sep 9 2012 13:03:26 for VTK by
1.8.1.2