RunningOptions Class Reference

#include <RunningOptions.hpp>

Inheritance diagram for RunningOptions:

Inheritance graph
[legend]
Collaboration diagram for RunningOptions:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void setVerbosity (const size_t &verbosity)
const size_t & getVerbosity ()
const bool & haveDisplay () const
const bool & useGUI () const
const bool & pauseOnError () const
void setDisplay (const bool &b)
void setGUI (const bool &b)
void setNoPauseOnError ()
 RunningOptions ()
 ~RunningOptions ()

Static Public Member Functions

static RunningOptionsinstance ()
static void create ()
static void destroy ()

Static Protected Attributes

static RunningOptions__pInstance

Private Attributes

bool __haveDisplay
bool __useGUI
bool __pauseOnError
size_t __verbosity


Detailed Description

Definition at line 35 of file RunningOptions.hpp.


Constructor & Destructor Documentation

RunningOptions::RunningOptions (  )  [inline]

Constructor

Definition at line 136 of file RunningOptions.hpp.

00137     : __haveDisplay(false),
00138       __useGUI(false),
00139       __pauseOnError(true)
00140   {
00141     ;
00142   }

RunningOptions::~RunningOptions (  )  [inline]

Destructor

Definition at line 148 of file RunningOptions.hpp.

00149   {
00150     ;
00151   }


Member Function Documentation

void RunningOptions::setVerbosity ( const size_t &  verbosity  )  [inline]

Sets the level of verbosity of the code

Parameters:
verbosity level of verbosity

Definition at line 51 of file RunningOptions.hpp.

References __verbosity.

Referenced by main().

00052   {
00053     __verbosity = verbosity;
00054   }

const size_t& RunningOptions::getVerbosity (  )  [inline]

Gets the level of verbosity of the code

Returns:
verbosity level

Definition at line 61 of file RunningOptions.hpp.

References __verbosity.

00062   {
00063     return __verbosity;
00064   }

const bool& RunningOptions::haveDisplay (  )  const [inline]

Readonly access to __haveDisplay

Returns:
__haveDisplay

Definition at line 71 of file RunningOptions.hpp.

References __haveDisplay.

00072   {
00073     return __haveDisplay;
00074   }

const bool& RunningOptions::useGUI (  )  const [inline]

Readonly access to __useGUI

Returns:
__useGUI

Definition at line 81 of file RunningOptions.hpp.

References __useGUI.

00082   {
00083     return __useGUI;
00084   }

const bool& RunningOptions::pauseOnError (  )  const [inline]

Pause on error

Returns:
__pauseOnError

Definition at line 91 of file RunningOptions.hpp.

References __pauseOnError.

00092   {
00093     return __pauseOnError;
00094   }

void RunningOptions::setDisplay ( const bool &  b  )  [inline]

Sets Display presence. By default sets use of GUI the same value as Display.

Parameters:
b Display value

Definition at line 102 of file RunningOptions.hpp.

References __haveDisplay, and __useGUI.

Referenced by main().

00103   {
00104     __haveDisplay = b;
00105     __useGUI = b;
00106   }

void RunningOptions::setGUI ( const bool &  b  )  [inline]

Sets GUI usage only when Display is available.

Parameters:
b GUI use

Definition at line 113 of file RunningOptions.hpp.

References __haveDisplay, and __useGUI.

Referenced by CommandLineParser::__treatOption().

00114   {
00115     if (__haveDisplay) {
00116       __useGUI = b;
00117     } else {
00118       __useGUI = false;
00119     }
00120   }

void RunningOptions::setNoPauseOnError (  )  [inline]

Pause on error

Returns:
__pauseOnError

Definition at line 127 of file RunningOptions.hpp.

References __pauseOnError.

Referenced by CommandLineParser::__treatOption().

00128   {
00129     __pauseOnError = false;
00130   }

static RunningOptions & StaticBase< RunningOptions >::instance (  )  [inline, static, inherited]

Access to auto instanciated static;

Returns:
*__pInstance

Definition at line 46 of file StaticBase.hpp.

Referenced by CommandLineParser::__treatOption(), CommandLineParser::CommandLineParser(), GUI::GUI(), main(), and FFThread::run().

00047   {
00048     return *__pInstance;
00049   }

static void StaticBase< RunningOptions >::create (  )  [inline, static, inherited]

Creates __pInstance in Embedding class.

Definition at line 55 of file StaticBase.hpp.

Referenced by StaticCenter::StaticCenter().

00056   {
00057     __pInstance = new EmbeddingClass();
00058   }

static void StaticBase< RunningOptions >::destroy (  )  [inline, static, inherited]

Destroyes __autoInstanciated in Embedding class.

Definition at line 64 of file StaticBase.hpp.

Referenced by StaticCenter::~StaticCenter().

00065   {
00066     delete __pInstance;
00067   }


Member Data Documentation

true if DISPLAY can be opened (unix only)

Definition at line 39 of file RunningOptions.hpp.

Referenced by haveDisplay(), setDisplay(), and setGUI().

bool RunningOptions::__useGUI [private]

true if GUI is to be used

Definition at line 40 of file RunningOptions.hpp.

Referenced by setDisplay(), setGUI(), and useGUI().

ff3d's pause on error for debug

Definition at line 41 of file RunningOptions.hpp.

Referenced by pauseOnError(), and setNoPauseOnError().

size_t RunningOptions::__verbosity [private]

Verbolity

Definition at line 43 of file RunningOptions.hpp.

Referenced by getVerbosity(), and setVerbosity().

RunningOptions * StaticBase< RunningOptions >::__pInstance [static, protected, inherited]

The static variable

Definition at line 37 of file StaticBase.hpp.


The documentation for this class was generated from the following file:

Generated on Wed Nov 19 00:12:44 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6