Workaround manager when you cannot add class members to a class due to binary compability issues.
More...
template<class O, class V>
class HiddenParam< O, V >
Workaround manager when you cannot add class members to a class due to binary compability issues.
If you want to add the variable of type V to class O, do the following in the source-file:
Workaround manager when you cannot add class members to a class due to binary compability issues.
Definition: hiddenparam.h:54
You can then access the variable in the source-file by:
myparammanager.setParam( this, new_value );
and retrieve it by
V value = myparammanager.getParam( this );
- Note
- V cannot be boolean. Use char instead. V must be 'simple' enough to be stored in a type-set. Also note you may not be able to call the removeParam (if the class does not already have a destructor), so so don't use with objects that are created millions of times in those cases, as you will leak memory. Finally, note that you MUST set the parameter in the constructor. The undef value is not ment to be returned, it's merely to keep the compiler happy.
<>