VTK
dox
opt
build
vtk6-6.3.0+dfsg2
Common
Core
vtkInformationInternals.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkInformationInternals.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
=========================================================================*/
23
#ifndef vtkInformationInternals_h
24
#define vtkInformationInternals_h
25
26
#include "
vtkInformationKey.h
"
27
#include "
vtkObjectBase.h
"
28
29
#define VTK_INFORMATION_USE_HASH_MAP
30
#ifdef VTK_INFORMATION_USE_HASH_MAP
31
# include <vtksys/hash_map.hxx>
32
#else
33
# include <vtksys/stl/map>
34
#endif
35
36
//----------------------------------------------------------------------------
37
class
vtkInformationInternals
38
{
39
public
:
40
typedef
vtkInformationKey
*
KeyType
;
41
typedef
vtkObjectBase
*
DataType
;
42
#ifdef VTK_INFORMATION_USE_HASH_MAP
43
struct
HashFun
44
{
45
size_t
operator()
(
KeyType
key
)
const
46
{
47
return
static_cast<
size_t
>
(
key
-
KeyType
(0));
48
}
49
};
50
typedef
vtksys::hash_map<KeyType, DataType, HashFun>
MapType
;
51
#else
52
typedef
vtksys_stl::map<KeyType, DataType>
MapType
;
53
#endif
54
MapType
Map
;
55
56
#ifdef VTK_INFORMATION_USE_HASH_MAP
57
vtkInformationInternals
():
Map
(33) {}
58
#endif
59
60
~vtkInformationInternals
()
61
{
62
for
(MapType::iterator i = this->Map.begin(); i != this->Map.end(); ++i)
63
{
64
if
(
vtkObjectBase
*
value
= i->second)
65
{
66
value
->UnRegister(0);
67
}
68
}
69
}
70
};
71
72
#undef VTK_INFORMATION_USE_HASH_MAP
73
74
#endif
75
// VTK-HeaderTest-Exclude: vtkInformationInternals.h
vtkInformationInternals::DataType
vtkObjectBase * DataType
Definition:
vtkInformationInternals.h:41
vtkInformationInternals::Map
MapType Map
Definition:
vtkInformationInternals.h:54
vtkObjectBase.h
vtkInformationInternals::MapType
vtksys::hash_map< KeyType, DataType, HashFun > MapType
Definition:
vtkInformationInternals.h:50
vtkInformationInternals
internal structure for vtkInformation
Definition:
vtkInformationInternals.h:38
vtkX3D::key
@ key
Definition:
vtkX3D.h:257
vtkInformationInternals::~vtkInformationInternals
~vtkInformationInternals()
Definition:
vtkInformationInternals.h:60
vtkInformationInternals::vtkInformationInternals
vtkInformationInternals()
Definition:
vtkInformationInternals.h:57
vtkgl::value
GLsizei const GLfloat * value
Definition:
vtkgl.h:12021
vtkObjectBase
abstract base class for most VTK objects
Definition:
vtkObjectBase.h:60
vtkInformationInternals::KeyType
vtkInformationKey * KeyType
Definition:
vtkInformationInternals.h:40
vtkInformationInternals::HashFun::operator()
size_t operator()(KeyType key) const
Definition:
vtkInformationInternals.h:45
vtkInformationInternals::HashFun
Definition:
vtkInformationInternals.h:44
vtkInformationKey.h
vtkInformationKey
Superclass for vtkInformation keys.
Definition:
vtkInformationKey.h:38
Generated by
1.8.20