Public Member Functions | |
ObjectWithClassVerbosity (int verb=classVerbosity()) | |
Static Public Member Functions | |
static int & | classVerbosity () |
Related Functions | |
(Note that these are not member functions.) | |
template<class X > | |
int & | verbosity () |
You can set verbosity for a single instance of a class, or for the whole class. To set for an instance, use the verbosity() member function, for example,
Mesh mesh1 = reader1.getMesh(); Mesh mesh2 = reader2.getMesh(); Mesh mesh3 = reader3.getMesh(); mesh1.verbosity() = 3;
mesh1
to 3 and leaves those of mesh2
and mesh3
unchanged.Alternatively, you can set a default verbosity for an entire class, for example,
Mesh mesh1 = reader1.getMesh(); Mesh mesh2 = reader2.getMesh(); Mesh mesh3 = reader3.getMesh(); mesh1.verbosity() = 3; verbosity<Mesh>() = 2;
mesh1
has its own verbosity setting of 3, it will use it rather than the default, but mesh2
and mesh3
will use 2.
Definition at line 68 of file SundanceObjectWithVerbosity.hpp.
Sundance::ObjectWithClassVerbosity< X >::ObjectWithClassVerbosity | ( | int | verb = classVerbosity() |
) | [inline] |
Definition at line 72 of file SundanceObjectWithVerbosity.hpp.
static int& Sundance::ObjectWithClassVerbosity< X >::classVerbosity | ( | ) | [inline, static] |
Definition at line 76 of file SundanceObjectWithVerbosity.hpp.
int & verbosity | ( | ) | [related] |
Global method for setting verbosity of a class
Definition at line 90 of file SundanceObjectWithVerbosity.hpp.