casa
5.7.0-16
|
A templated function which sets a variable to a default value. More...
#include <DefaultValue.h>
Public Member Functions | |
template<class T > | |
void | defaultValue (T &theValue) |
A templated function which sets a variable to a default value.
Public interface
The DefaultValue function name is derived from its use to fill a data type with a default value, usually zero.
The DefaultValue function is passed an instance of a data type and the variable is filled with a default value. The majority of classes may use the templated version here. Special classes may use their own non-templated specializations as demonstrated in ../Utilities/test/tDefaultValue.cc.
A special class may need its own implementation:
We needed a common way of setting all objects to zero or some null/default value. Specializing a templated function seemed the only way to reach everyone.
Definition at line 99 of file DefaultValue.h.
|
inline |
Definition at line 100 of file DefaultValue.h.