OBT::TracerOutput Class Reference

Interface to output messages in a console. More...

#include <OBTTrace.h>

List of all members.

Protected Member Functions

virtual ~TracerOutput ()
 The destructor called by Tracer.
virtual void trace (const char *id, const char *fct, const char *file, const int line, const char *msg)
 You can define this method to format the message in your own log.
virtual void trace (const std::string &msg)
 You should define this method to output an already formated message in your own log.

Friends

class Tracer


Detailed Description

Interface to output messages in a console.

Used to output messages in the Ogre log.

Definition at line 20 of file OBTTrace.h.


Constructor & Destructor Documentation

virtual OBT::TracerOutput::~TracerOutput (  )  [inline, protected, virtual]

The destructor called by Tracer.

Definition at line 27 of file OBTTrace.h.

00027 {}


Member Function Documentation

virtual void OBT::TracerOutput::trace ( const char *  id,
const char *  fct,
const char *  file,
const int  line,
const char *  msg 
) [inline, protected, virtual]

You can define this method to format the message in your own log.

This method allow to format the message informations.

Parameters:
[in] id The message identifier.
[in] fct The function where the message comes from.
[in] file The file where the message comes from.
[in] line The line in the file where the message comes from.
[in] msg The message body.

Definition at line 36 of file OBTTrace.h.

Referenced by OBT::Tracer::traceWithoutTest().

00037   {
00038     std::ostringstream stream ;
00039 #ifdef _MSC_VER
00040     // The debug message is set for the visual studio format
00041     stream << "[" << id << "] in \"" << fct << "\" of " <<  file << "@" << line << std::endl << msg << std::endl ;
00042 #else
00043     // The debug message is set for the vim format
00044     stream << "[" << id << "] in \"" << fct << "\" of " <<  file << " +" << line <<     " : " <<msg << std::endl ;
00045 #endif
00046     trace( stream.str() ) ; 
00047   }
00050   virtual void trace( const std::string& msg ) {} ;
00051 } ;

virtual void OBT::TracerOutput::trace ( const std::string &  msg  )  [inline, protected, virtual]

You should define this method to output an already formated message in your own log.

Parameters:
[in] msg The message to output.

Definition at line 54 of file OBTTrace.h.

00062 :
* \code


Friends And Related Function Documentation

friend class Tracer [friend]

Definition at line 22 of file OBTTrace.h.


Generated on Wed Oct 1 11:34:22 2008 for OBT by  doxygen 1.5.3