Console Class Reference

#include <Console.hpp>

Inheritance diagram for Console:

Inheritance graph
[legend]
Collaboration diagram for Console:

Collaboration graph
[legend]

List of all members.

Public Member Functions

template<typename T>
void writeStd (const T &t)
template<typename T>
void writeError (const T &t)
 Console ()
 ~Console ()

Static Public Member Functions

static Consoleinstance ()
static void create ()
static void destroy ()

Static Protected Attributes

static Console__pInstance

Private Member Functions

void _writeStd (std::string output)
void _writeError (std::string output)

Private Attributes

std::stringstream * __std_buffer
std::stringstream * __error_buffer


Detailed Description

Definition at line 34 of file Console.hpp.


Constructor & Destructor Documentation

Console::Console (  ) 

Definition at line 89 of file Console.cpp.

References __error_buffer, and __std_buffer.

00090 {
00091   __std_buffer = new std::stringstream();
00092   __error_buffer = new std::stringstream();
00093 }

Console::~Console (  ) 

Definition at line 95 of file Console.cpp.

References __error_buffer, and __std_buffer.

00096 {
00097   delete __std_buffer;
00098   delete __error_buffer;
00099 }


Member Function Documentation

void Console::_writeStd ( std::string  output  )  [private]

Definition at line 80 of file Console.cpp.

References ErrorHandler::unexpected.

Referenced by writeStd().

00081 {
00082   throw ErrorHandler(__FILE__,__LINE__,
00083                      "cannot use console output",
00084                      ErrorHandler::unexpected);
00085 }

void Console::_writeError ( std::string  output  )  [private]

Definition at line 72 of file Console.cpp.

References ErrorHandler::unexpected.

Referenced by writeError().

00073 {
00074   throw ErrorHandler(__FILE__,__LINE__,
00075                      "cannot use console output",
00076                      ErrorHandler::unexpected);
00077 }

template<typename T>
void Console::writeStd ( const T &  t  )  [inline]

Definition at line 54 of file Console.hpp.

References _writeStd(), and stringify().

Referenced by OStream::_writes().

00055   {
00056     this->_writeStd(stringify(t));
00057   }

Here is the call graph for this function:

template<typename T>
void Console::writeError ( const T &  t  )  [inline]

Definition at line 60 of file Console.hpp.

References _writeError(), and stringify().

Referenced by OStream::_writes().

00061   {
00062     this->_writeError(stringify(t));
00063   }

Here is the call graph for this function:

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

Access to auto instanciated static;

Returns:
*__pInstance

Definition at line 46 of file StaticBase.hpp.

Referenced by OStream::_writes().

00047   {
00048     return *__pInstance;
00049   }

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

Creates __pInstance in Embedding class.

Definition at line 55 of file StaticBase.hpp.

Referenced by ThreadStaticCenter::ThreadStaticCenter().

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

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

Destroyes __autoInstanciated in Embedding class.

Definition at line 64 of file StaticBase.hpp.

Referenced by ThreadStaticCenter::~ThreadStaticCenter().

00065   {
00066     delete __pInstance;
00067   }


Member Data Documentation

std::stringstream* Console::__std_buffer [private]

Definition at line 42 of file Console.hpp.

Referenced by Console(), and ~Console().

std::stringstream* Console::__error_buffer [private]

Definition at line 43 of file Console.hpp.

Referenced by Console(), and ~Console().

Console * StaticBase< Console >::__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 files:

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