Slicer
4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Libs
vtkAddon
vtkAddonSetGet.h
Go to the documentation of this file.
1
/*==============================================================================
2
3
Program: 3D Slicer
4
5
Copyright (c) Kitware Inc.
6
7
See COPYRIGHT.txt
8
or http://www.slicer.org/copyright/copyright.txt for details.
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
16
==============================================================================*/
17
24
25
#ifndef vtkAddonSetGet_h
26
#define vtkAddonSetGet_h
27
28
//
29
// Set macro for STL containers. Sets the local variable to be a copy of the specified container.
30
// Currently, STL containers cannot use the generic vtkSetMacro/vtkGetMacro types since those macros require a "<<" operator within vtkDebugMacro
31
//
32
#define vtkSetStdVectorMacro(name,type) \
33
virtual void Set##name (type _arg) \
34
{ \
35
if (this->name != _arg) \
36
{ \
37
this->name = _arg; \
38
this->Modified(); \
39
} \
40
}
41
42
//
43
// Get macro for STL containers. Returns a copy of the container.
44
// Currently, STL containers cannot use the generic vtkSetMacro/vtkGetMacro types since those macros require a "<<" operator within vtkDebugMacro
45
//
46
#define vtkGetStdVectorMacro(name,type) \
47
virtual type Get##name () { \
48
return this->name; \
49
}
50
51
#endif
52
// VTK-HeaderTest-Exclude: vtkSetGet.h
Generated on Fri May 17 2019 15:20:19 for Slicer by
1.8.14