WARPXM v1.10.0
Loading...
Searching...
No Matches
WxLogRecordHandler Class Reference

Class to handle log messages generated by WarpX logging system. More...

#include <wxlogrecordhandler.h>

Inheritance diagram for WxLogRecordHandler:
WxObject WxFileHandler WxStreamHandler

Detailed Description

Class to handle log messages generated by WarpX logging system.

In general this class should not be used directly but one of its children used instead.

Public Member Functions

 WxLogRecordHandler ()
 Create new handler and attach std::cout to it.
 
virtual ~WxLogRecordHandler ()
 
void setStream (std::ostream *stream)
 Set the output stream to one specified.
 
void write (const std::string &msg)
 Write message 'msg' to the output stream.
 
void setOwns (bool handlerOwns)
 Set if the stream to which data is being written is owned by the handler.
 
bool owns () const
 Returns true if handler owns the stream and false otherwise.
 
- Public Member Functions inherited from WxObject
virtual ~WxObject ()
 Dtor: destroy object.
 
void setIo (WxIoBase &io)
 Set the I/O pointer for use in object.
 
void setMsg (WxMsgBase &msg)
 Set the msg pointer for use in object.
 
WxIoBasegetIo ()
 Return reference to I/O object.
 
const WxIoBasegetIo () const
 Return constant reference to I/O object.
 
WxMsgBasegetMsg ()
 Return reference to msg object.
 
const WxMsgBasegetMsg () const
 Return const reference to msg object.
 
virtual void setup (const WxCryptSet &wxc)
 Setup object using supplied crypset.
 
virtual void init ()
 Initialize the object.
 
virtual void finishBuild ()
 Finish building the object.
 
virtual void load (WxIoBase &io, const WxIoNodeType &grpNode)
 Load object from file.
 
virtual void dump (WxIoBase &io, WxIoNodeType &grpNode) const
 Dump object to file.
 
virtual std::string name () const
 Get name of object.
 
void setName (const std::string &nm)
 Set object's name.
 

Additional Inherited Members

- Protected Member Functions inherited from WxObject
 WxObject ()
 Create object, that will be initialized subsequently.
 
 WxObject (const std::string &name)
 Create object with given name bypassing object setup phase Protected because there is no reason to have a WxObject directly, as it is meant to be a parent class.
 

Constructor & Destructor Documentation

◆ WxLogRecordHandler()

WxLogRecordHandler::WxLogRecordHandler ( )
inline

Create new handler and attach std::cout to it.

◆ ~WxLogRecordHandler()

virtual WxLogRecordHandler::~WxLogRecordHandler ( )
inlinevirtual

Member Function Documentation

◆ owns()

bool WxLogRecordHandler::owns ( ) const
inline

Returns true if handler owns the stream and false otherwise.

◆ setOwns()

void WxLogRecordHandler::setOwns ( bool  handlerOwns)
inline

Set if the stream to which data is being written is owned by the handler.

Parameters
handlerOwnsTrue if handler owns the stream and false if caller owns the stream.

◆ setStream()

void WxLogRecordHandler::setStream ( std::ostream *  stream)
inline

Set the output stream to one specified.

Note that by default the caller of this method owns the stream and is hence responsible for closing it.

◆ write()

void WxLogRecordHandler::write ( const std::string &  msg)
inline

Write message 'msg' to the output stream.


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