My Project
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ParaEngine::LogDetail::LocationInfo Class Reference

This class represents the location of a logging statement. More...

#include <Log.h>

Public Member Functions

 LocationInfo (const char *const fileName, const char *const functionName, int lineNumber)
 Constructor. More...
 
 LocationInfo ()
 Default constructor.
 
 LocationInfo (const LocationInfo &src)
 Copy constructor. More...
 
LocationInfooperator= (const LocationInfo &src)
 Assignment operator. More...
 
void clear ()
 Resets location info to default state.
 
const std::string getClassName ()
 Return the class name of the call site. More...
 
const char * getFileName ()
 Return the file name of the caller. More...
 
int getLineNumber ()
 Returns the line number of the caller. More...
 
const std::string getMethodName ()
 Returns the method name of the caller. More...
 
void write (CLogger *pOutput) const
 write to log file. More...
 

Static Public Member Functions

static const LocationInfogetLocationUnavailable ()
 

Static Public Attributes

static const char *const NA = "?"
 When location information is not available the constant NA is returned. More...
 
static const char *const NA_METHOD = "?::?"
 

Detailed Description

This class represents the location of a logging statement.

Constructor & Destructor Documentation

§ LocationInfo() [1/2]

ParaEngine::LogDetail::LocationInfo::LocationInfo ( const char *const  fileName,
const char *const  functionName,
int  lineNumber 
)

Constructor.

Remarks
Used by SERVICE_LOG_LOCATION to generate location info for current code site

§ LocationInfo() [2/2]

ParaEngine::LogDetail::LocationInfo::LocationInfo ( const LocationInfo src)

Copy constructor.

Parameters
srcsource location

Member Function Documentation

§ getClassName()

const std::string ParaEngine::LogDetail::LocationInfo::getClassName ( )

Return the class name of the call site.

§ getFileName()

const char * ParaEngine::LogDetail::LocationInfo::getFileName ( )

Return the file name of the caller.

Returns
file name, may be null.

§ getLineNumber()

int ParaEngine::LogDetail::LocationInfo::getLineNumber ( )

Returns the line number of the caller.

Returns
line number, -1 if not available.

§ getMethodName()

const std::string ParaEngine::LogDetail::LocationInfo::getMethodName ( )

Returns the method name of the caller.

§ operator=()

LocationInfo & ParaEngine::LogDetail::LocationInfo::operator= ( const LocationInfo src)

Assignment operator.

Parameters
srcsource location

§ write()

void ParaEngine::LogDetail::LocationInfo::write ( CLogger pOutput) const

write to log file.

Member Data Documentation

§ NA

const char *const ParaEngine::LogDetail::LocationInfo::NA = "?"
static

When location information is not available the constant NA is returned.

Current value of this string constant is ?.


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