[vtk-developers] VTK Support for 64 bit file systems
John Biddiscombe
biddisco at cscs.ch
Fri Jun 9 08:17:32 EDT 2006
Andy,
> since I modified vtkConfigure.h, so all VTK will rebuild. Sorry....
In that case, can I make a change to vtkSetGet.h
I often want a vtkSetMacro and vtkSetStringMacro that will execute an
extra line of code in addition to caling this->Modified().
for example, SetMyFancyAlphaBlendingOption(...) needs to call
this->AlphaModified() as well as this->Modified, and similarly with
certian string sets.
I'm using
#define vtkSetMacroWithModifier(name,type,code) \
virtual void Set##name (type _arg) \
{ \
vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting
" #name " to " << _arg); \
if (this->name != _arg) \
{ \
this->name = _arg; \
this->Modified(); \
code; \
} \
}
whicb allows you to do a vtkSetMacro(myVar, int, this->AlphaModified())
Just add a line of code of your own which is tagged on after the modified.
and thus save making lots of extra copies of Set/Get type code in your
own places.
Can we generalize this to all the vtkSet-XXX macros to make life easier?
JB
--
John Biddiscombe, email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the vtk-developers
mailing list