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 () |
ObjectWithClassVerbosity and the related verbosity() method provide a method for getting/setting verbosity flags for entire classes.
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;
which sets the verbosity of 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;
which sets the default verbosity to 2. Since 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 106 of file SundanceObjectWithVerbosity.hpp.
| Sundance::ObjectWithClassVerbosity< X >::ObjectWithClassVerbosity | ( | int | verb = classVerbosity() | ) | [inline] |
Definition at line 110 of file SundanceObjectWithVerbosity.hpp.
| static int& Sundance::ObjectWithClassVerbosity< X >::classVerbosity | ( | ) | [inline, static] |
Definition at line 114 of file SundanceObjectWithVerbosity.hpp.
| int & verbosity | ( | ) | [related] |
Global method for setting verbosity of a class
Definition at line 128 of file SundanceObjectWithVerbosity.hpp.