Sundance::ObjectWithClassVerbosity< X > Class Template Reference

Inheritance diagram for Sundance::ObjectWithClassVerbosity< X >:

Playa::ObjectWithVerbosity

List of all members.

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 ()


Detailed Description

template<class X>
class Sundance::ObjectWithClassVerbosity< X >

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 68 of file SundanceObjectWithVerbosity.hpp.


Constructor & Destructor Documentation

template<class X>
Sundance::ObjectWithClassVerbosity< X >::ObjectWithClassVerbosity ( int  verb = classVerbosity()  )  [inline]

Deprecated:
Construct, starting silent

Definition at line 72 of file SundanceObjectWithVerbosity.hpp.


Member Function Documentation

template<class X>
static int& Sundance::ObjectWithClassVerbosity< X >::classVerbosity (  )  [inline, static]

Deprecated:
Writeable access to the default verbosity for the class

Definition at line 76 of file SundanceObjectWithVerbosity.hpp.


Friends And Related Function Documentation

template<class X >
int & verbosity (  )  [related]

Global method for setting verbosity of a class

Definition at line 90 of file SundanceObjectWithVerbosity.hpp.

Site Contact