Commit 77d3ebd3 authored by George Zagaris's avatar George Zagaris
Browse files

ENH: Added vtkSetNGet macro

Added a vtkSetNGet macro which combines the
functionality of the vtkGetMacro and vtkSetMacro
in a single macro. In addition, it alleviates
the requirement to inherit from vtkObject in order
to use this macro
parent d188e1bd
......@@ -61,6 +61,22 @@
(((type) == VTK_OBJECT) ? "object" : \
"Undefined"))))))))))))))))))))))
//
// Set built-in type. Creates member Set"name"() & Get"name"()
// Note: This method can be used by objects that do not inherit
// by vtkObject.
//
#define vtkSetNGetMacro(name,type) \
virtual void Set##name( type _arg ) \
{ \
this->name = _arg; \
} \
virtual type Get##name( ) \
{ \
return this->name; \
}
//
// Set built-in type. Creates member Set"name"() (e.g., SetVisibility());
//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment