#include <StreamCenter.hpp>


Public Member Functions | |
| OStream & | log (int i) |
| OStream & | out (int i) |
| OStream & | err (int i) |
| int | getDebugLevel () const |
| void | setDebugLevel (int i) |
| StreamCenter () | |
| ~StreamCenter () | |
Static Public Member Functions | |
| static StreamCenter & | instance () |
| 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 |
Definition at line 35 of file StreamCenter.hpp.
| 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] |
| 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] |
Definition at line 93 of file StreamCenter.hpp.
References __debugLevel.
Referenced by SpectralFEMPreconditioner::computes(), SpectralFEMPreconditioner::computesTransposed(), and SpectralFEMPreconditioner::initializes().
00094 { 00095 return __debugLevel; 00096 }
| void StreamCenter::setDebugLevel | ( | int | i | ) | [inline] |
Definition at line 98 of file StreamCenter.hpp.
References __debugLevel.
Referenced by SpectralFEMPreconditioner::computes(), SpectralFEMPreconditioner::computesTransposed(), SpectralFEMPreconditioner::initializes(), and FFThread::run().
00099 { 00100 __debugLevel = i; 00101 }
| static StreamCenter & StaticBase< StreamCenter >::instance | ( | ) | [inline, static, inherited] |
Access to auto instanciated static;
Definition at line 46 of file StaticBase.hpp.
Referenced by BiConjugateGradient::BiConjugateGradient(), BiConjugateGradientStabilized::BiConjugateGradientStabilized(), SpectralFEMPreconditioner::computes(), SpectralFEMPreconditioner::computesTransposed(), ConjugateGradient::ConjugateGradient(), fferr(), fflog(), ffout(), FGMRES::FGMRES(), GMRES::GMRES(), SpectralFEMPreconditioner::initializes(), MeshExpressionVariable::put(), FunctionExpressionVariable::put(), FFThread::run(), and XMLWriter::writeHeader().
00047 { 00048 return *__pInstance; 00049 }
| 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 }
friend class StaticCenter [friend] |
Definition at line 39 of file StreamCenter.hpp.
int StreamCenter::__debugLevel [private] |
Definition at line 41 of file StreamCenter.hpp.
Referenced by err(), getDebugLevel(), log(), out(), and setDebugLevel().
OStream StreamCenter::__nullStream [private] |
OStream StreamCenter::__log [private] |
Mainly used to write output in a file.
Definition at line 47 of file StreamCenter.hpp.
Referenced by log().
OStream StreamCenter::__out [private] |
OStream StreamCenter::__err [private] |
StreamCenter * StaticBase< StreamCenter >::__pInstance [static, protected, inherited] |
The static variable
Definition at line 37 of file StaticBase.hpp.
1.5.6