S3FC project page S3FC home page

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

s3_msgb_log_buffer Class Reference

The streambuffer used to log messages to an S3 message box. More...

#include <s3_logger.h>

Inheritance diagram for s3_msgb_log_buffer:

Inheritance graph
[legend]
Collaboration diagram for s3_msgb_log_buffer:

Collaboration graph
[legend]
List of all members.

Public Methods

 s3_msgb_log_buffer (const std::string &my_box_name, const std::string &dst_box_name, const std::string po_ip="", const unsigned int po_port=0)
 Constructor. More...

virtual ~s3_msgb_log_buffer ()
 The destructor disconnects the message box from the Postal System. More...


Private Methods

virtual void write_to_device ()
 Necessary overload for s3_generic_streambuf::write_to_device(). More...


Private Attributes

s3_message_box msg_box
 The S3 message box associated with this thread. More...

const std::string dest_box_name
 The name of the destination message box. More...


Detailed Description

The streambuffer used to log messages to an S3 message box.

Do not use this class direcly, rather use s3_msgb_logger.

See also:
The overall operation of the S3 Logging System.
Author:
Francois Swanepoel <swanepoel@stonethree.com>

Definition at line 296 of file s3_logger.h.


Constructor & Destructor Documentation

s3_msgb_log_buffer::s3_msgb_log_buffer const std::string &    my_box_name,
const std::string &    dst_box_name,
const std::string    po_ip = "",
const unsigned int    po_port = 0
[inline]
 

Constructor.

When values other than the defaults are provided for both the Post Office switch IP and Port arguments, the message box system is initialised if it is not yet initialised. When these arguments are omitted, the message box system must be initialised prior to the instantiation of this class. If the message box connection fail for whatever reason, an s3_generic_exception will be thrown.

Parameters:
my_box_name  The name of the internal message box. If this name already exists in the postal system, it is modified slightly until a unique one is found.
dst_box_name  The message box where the messages are send to.
po_ip  The IP address of the Post Office switch.
po_port  The Post Office switch port.

Definition at line 334 of file s3_logger.h.

References s3_message_box::connect, dest_box_name, s3_message_box::init, s3_message_box::initialised, s3_message_box::set_name, and s3_conversion::to_string.

virtual s3_msgb_log_buffer::~s3_msgb_log_buffer   [inline, virtual]
 

The destructor disconnects the message box from the Postal System.

Definition at line 375 of file s3_logger.h.

References s3_message_box::disconnect, and s3_generic_streambuf::sync.


Member Function Documentation

virtual void s3_msgb_log_buffer::write_to_device   [inline, private, virtual]
 

Necessary overload for s3_generic_streambuf::write_to_device().

Implements s3_generic_streambuf.

Definition at line 301 of file s3_logger.h.

References dest_box_name, msg_box, and s3_message_box::send_msg.


Member Data Documentation

const std::string s3_msgb_log_buffer::dest_box_name [private]
 

The name of the destination message box.

Definition at line 312 of file s3_logger.h.

Referenced by s3_msgb_log_buffer, and write_to_device.

s3_message_box s3_msgb_log_buffer::msg_box [private]
 

The S3 message box associated with this thread.

Definition at line 309 of file s3_logger.h.

Referenced by write_to_device.


The documentation for this class was generated from the following file:
Send comments to: s3fc@stonethree.com SourceForge Logo