MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
mds::base::CLogChannelFStream Class Reference

Channel for logging to the file stream. More...

#include <mdsLogChannel.h>

Inheritance diagram for mds::base::CLogChannelFStream:
Inheritance graph
[legend]

List of all members.

Public Types

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...

Public Member Functions

 CLogChannelFStream (const char *pcFileName)
 Constructor.
 CLogChannelFStream (const std::string &ssFileName)
 Constructor.
virtual void entry (const char *pcData)
 Writes a given log entry to the channel.
int getReferencesCount () const
 Returns the number of references.
bool isOnHeap () const
 Returns true if the object is allocated on the heap.
 MDS_SHAREDPTR (CLogChannel)
 Smart pointer type.
 MDS_SHAREDPTR (CLogChannelOStream)
 Smart pointer type.
 MDS_SHAREDPTR (CLogChannelFStream)
 Smart pointer type.
virtual ~CLogChannelFStream ()
 Virtual destructor.

Static Public Member Functions

static void * operator new (std::size_t Size)
 Allocates a new object on the heap.

Protected Member Functions

void addReference () const
 Increase the reference counter.
 CLogChannelFStream (const CLogChannelFStream &)
 Protected copy constructor.
bool delReference () const
 Decrease the reference counter.
void operator= (const CLogChannelFStream &)
 Protected assignment operator.

Protected Attributes

std::ofstream m_FileStream
 Output file stream.
int m_iHeapObject
 Flag initialized if the object is on the heap.
int m_iReferences
 The number of references to the object.
std::ostream & m_Stream
 Output STL stream.

Detailed Description

Channel for logging to the file stream.


Member Enumeration Documentation

anonymous enum [inherited]

Templates that require members of the CObject class can use this enum to check the existence.

Enumerator:
CLASS_OBJECT 
anonymous enum [inherited]

Signature used to recognize objects on the heap.

Enumerator:
HEAP_OBJECT 

Constructor & Destructor Documentation

Constructor.

mds::base::CLogChannelFStream::CLogChannelFStream ( const std::string &  ssFileName)

Constructor.

Virtual destructor.

Protected copy constructor.


Member Function Documentation

void mds::base::CObject::addReference ( ) const [protected, inherited]

Increase the reference counter.

bool mds::base::CObject::delReference ( ) const [protected, inherited]

Decrease the reference counter.

  • Returns true if the decremented number of references is lower or equal to zero and object must be deleted.
virtual void mds::base::CLogChannelOStream::entry ( const char *  pcData) [virtual, inherited]

Writes a given log entry to the channel.

Implements mds::base::CLogChannel.

Returns the number of references.

bool mds::base::CObject::isOnHeap ( ) const [inherited]

Returns true if the object is allocated on the heap.

Smart pointer type.

  • Declares type tSmartPtr.

Smart pointer type.

  • Declares type tSmartPtr.

Smart pointer type.

  • Declares type tSmartPtr.
static void* mds::base::CObject::operator new ( std::size_t  Size) [static, inherited]

Allocates a new object on the heap.

void mds::base::CLogChannelFStream::operator= ( const CLogChannelFStream ) [protected]

Protected assignment operator.


Member Data Documentation

Output file stream.

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.

  • Zero if there is no reference.
std::ostream& mds::base::CLogChannelOStream::m_Stream [protected, inherited]

Output STL stream.


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