StreamCenter Class Reference

#include <StreamCenter.hpp>

Inheritance diagram for StreamCenter:

Inheritance graph
[legend]
Collaboration diagram for StreamCenter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

OStreamlog (int i)
OStreamout (int i)
OStreamerr (int i)
int getDebugLevel () const
void setDebugLevel (int i)
 StreamCenter ()
 ~StreamCenter ()

Static Public Member Functions

static StreamCenterinstance ()
static void create ()
static void destroy ()

Static Protected Attributes

static StreamCenter__pInstance

Private Member Functions

 StreamCenter (const StreamCenter &SC)
 forbides the copy constructor.

Private Attributes

int __debugLevel
OStream __nullStream
 used as a black hole to write unwanted output.
OStream __log
 Mainly used to write output in a file.
OStream __out
 standard output
OStream __err
 error output

Friends

class StaticCenter


Detailed Description

Definition at line 35 of file StreamCenter.hpp.


Constructor & Destructor Documentation

StreamCenter::StreamCenter ( const StreamCenter SC  )  [private]

forbides the copy constructor.

StreamCenter::StreamCenter (  ) 

Definition at line 37 of file StreamCenter.cpp.

00038   : __debugLevel(1),
00039     __nullStream(OStream::null),
00040     __log(OStream::null),
00041     __out(OStream::standard),
00042     __err(OStream::error)
00043 {
00044   ;
00045 }

StreamCenter::~StreamCenter (  )  [inline]

Definition at line 105 of file StreamCenter.hpp.

00106   {
00107     ;
00108   }


Member Function Documentation

OStream& StreamCenter::log ( int  i  )  [inline]

Definition at line 69 of file StreamCenter.hpp.

References __debugLevel, __log, and __nullStream.

Referenced by fflog().

00070   {
00071     if (i<=__debugLevel)
00072       return __log;
00073     else
00074       return __nullStream;
00075   }

OStream& StreamCenter::out ( int  i  )  [inline]

Definition at line 77 of file StreamCenter.hpp.

References __debugLevel, __nullStream, and __out.

Referenced by ffout().

00078   {
00079     if (i<=__debugLevel)
00080       return __out;
00081     else
00082       return __nullStream;
00083   }

OStream& StreamCenter::err ( int  i  )  [inline]

Definition at line 85 of file StreamCenter.hpp.

References __debugLevel, __err, and __nullStream.

Referenced by fferr().

00086   {
00087     if (i<=__debugLevel)
00088       return __err;
00089     else
00090       return __nullStream;
00091   }

int StreamCenter::getDebugLevel (  )  const [inline]

void StreamCenter::setDebugLevel ( int  i  )  [inline]

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

static void StaticBase< StreamCenter >::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< StreamCenter >::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   }


Friends And Related Function Documentation

friend class StaticCenter [friend]

Definition at line 39 of file StreamCenter.hpp.


Member Data Documentation

Definition at line 41 of file StreamCenter.hpp.

Referenced by err(), getDebugLevel(), log(), out(), and setDebugLevel().

used as a black hole to write unwanted output.

Definition at line 44 of file StreamCenter.hpp.

Referenced by err(), log(), and out().

Mainly used to write output in a file.

Definition at line 47 of file StreamCenter.hpp.

Referenced by log().

standard output

Definition at line 50 of file StreamCenter.hpp.

Referenced by out().

error output

Definition at line 53 of file StreamCenter.hpp.

Referenced by err().

StreamCenter * StaticBase< StreamCenter >::__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:15:12 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6