MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Global application log. More...
#include <mdsGlobalLog.h>
Public Types | |
enum | { CLASS_SINGLETON } |
Templates that require members of the CSingleton class can use this enum to check the existence. More... | |
enum | { LONGEVITY = L } |
Object longevity. More... | |
enum | { SIZE = 512 } |
Size of the buffer. More... | |
enum | { CLASS_OBJECT } |
Templates that require members of the CObject class can use this enum to check the existence. More... | |
enum | { HEAP_OBJECT = 0x70616568 } |
Signature used to recognize objects on the heap. More... | |
typedef CLibraryLockableClass < CLog >::CLock | tLock |
Lock type. | |
Public Member Functions | |
void | disable () |
Disables the logging. | |
void | enable (bool bEnable=true) |
Enables/disables the logging. | |
int | getReferencesCount () const |
Returns the number of references. | |
std::ostream & | getStream () |
Returns the output stream. | |
bool | isOnHeap () const |
Returns true if the object is allocated on the heap. | |
MDS_SHAREDPTR (CGlobalLog) | |
Smart pointer type. | |
MDS_SHAREDPTR (CLog) | |
Smart pointer type. | |
virtual int | overflow (int c=EOF) |
Implementation of virtual functions (std::streambuf). | |
void | registerChannel (CLogChannel *pLogChannel) |
Registers a given output channel. | |
void | removeAllChannels () |
Removes all registered channels. | |
virtual int | sync () |
virtual int | underflow () |
void | unregisterChannel (CLogChannel *pLogChannel) |
Unregisters a specified logging channel. | |
virtual | ~CGlobalLog () |
Virtual destructor. | |
Static Public Member Functions | |
static void | lock () |
Locks the object. | |
static void * | operator new (std::size_t Size) |
Allocates a new object on the heap. | |
static void | unlock () |
Locks the object. | |
Protected Types | |
typedef std::set< CLogChannelPtr > | tChannels |
Set of all registered logging channels. | |
Protected Member Functions | |
void | addReference () const |
Increase the reference counter. | |
bool | delReference () const |
Decrease the reference counter. | |
Protected Attributes | |
bool | m_bEnabled |
Flag used to disable/enable logging. | |
tChannels | m_Channels |
Set of all registered logging channels. | |
int | m_iHeapObject |
Flag initialized if the object is on the heap. | |
int | m_iReferences |
The number of references to the object. | |
char | m_pcBuffer [SIZE] |
Log buffer. | |
char * | m_pcBufferEnd |
Pointer to the buffer end. | |
CScopedPtr< std::ostream > | m_pStream |
Output stream. | |
Friends | |
class | mds::base::CSingletonHolder< CGlobalLog > |
Allow main log instantiation using the singleton holder. |
Global application log.
typedef std::set<CLogChannelPtr> mds::base::CLog::tChannels [protected, inherited] |
Set of all registered logging channels.
typedef CLibraryLockableClass<CLog>::CLock mds::base::CLog::tLock [inherited] |
Lock type.
anonymous enum [inherited] |
Templates that require members of the CSingleton class can use this enum to check the existence.
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
virtual mds::base::CGlobalLog::~CGlobalLog | ( | ) | [virtual] |
Virtual destructor.
void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
bool mds::base::CObject::delReference | ( | ) | const [protected, inherited] |
Decrease the reference counter.
void mds::base::CLog::disable | ( | ) | [inherited] |
Disables the logging.
void mds::base::CLog::enable | ( | bool | bEnable = true | ) | [inherited] |
Enables/disables the logging.
int mds::base::CObject::getReferencesCount | ( | ) | const [inherited] |
Returns the number of references.
std::ostream& mds::base::CLog::getStream | ( | ) | [inherited] |
Returns the output stream.
bool mds::base::CObject::isOnHeap | ( | ) | const [inherited] |
Returns true if the object is allocated on the heap.
static void mds::base::CLockableClass< CLog >::lock | ( | ) | [static, inherited] |
Locks the object.
Smart pointer type.
mds::base::CLog::MDS_SHAREDPTR | ( | CLog | ) | [inherited] |
Smart pointer type.
static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static, inherited] |
Allocates a new object on the heap.
int mds::base::CLog::overflow | ( | int | c = EOF | ) | [virtual, inherited] |
Implementation of virtual functions (std::streambuf).
void mds::base::CLog::registerChannel | ( | CLogChannel * | pLogChannel | ) | [inherited] |
Registers a given output channel.
void mds::base::CLog::removeAllChannels | ( | ) | [inherited] |
Removes all registered channels.
int mds::base::CLog::sync | ( | ) | [virtual, inherited] |
int mds::base::CLog::underflow | ( | ) | [virtual, inherited] |
static void mds::base::CLockableClass< CLog >::unlock | ( | ) | [static, inherited] |
Locks the object.
void mds::base::CLog::unregisterChannel | ( | CLogChannel * | pLogChannel | ) | [inherited] |
Unregisters a specified logging channel.
friend class mds::base::CSingletonHolder< CGlobalLog > [friend] |
Allow main log instantiation using the singleton holder.
bool mds::base::CLog::m_bEnabled [protected, inherited] |
Flag used to disable/enable logging.
tChannels mds::base::CLog::m_Channels [protected, inherited] |
Set of all registered logging channels.
int mds::base::CObject::m_iHeapObject [mutable, protected, inherited] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected, inherited] |
The number of references to the object.
char mds::base::CLog::m_pcBuffer[SIZE] [protected, inherited] |
Log buffer.
char* mds::base::CLog::m_pcBufferEnd [protected, inherited] |
Pointer to the buffer end.
CScopedPtr<std::ostream> mds::base::CLog::m_pStream [protected, inherited] |
Output stream.