Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

msg_base Class Reference

#include <msg_base.h>

Inheritance diagram for msg_base:

msg_listener msg_queue_processor msg_rpc_listener msg_sock_listener msg_communicator msg_connection msg_rpc_connection msg_sock_connection msg_user_connection

List of all members.

Public Member Functions

 msg_base (msg_communicator *communicator_)
 constructor
virtual ~msg_base ()
 destructor
void on ()
 turns on
void off ()
 turns off
bool is_on () const
 returns the current state

Protected Member Functions

void set_on (bool on)
 sets the current state
virtual void v_on ()
 action on turning on
virtual void v_off ()
 action on turning off

Protected Attributes

msg_communicator_communicator
 pointer to communicator object
mutex _mtx_res
 mutex for internal resources
bool _on
 on/off flag


Detailed Description

Definition at line 42 of file msg_base.h.


Constructor & Destructor Documentation

BEGIN_TERIMBER_NAMESPACE msg_base::msg_base ( msg_communicator communicator_  ) 

constructor

Parameters:
communicator_  communicator pointer

Definition at line 33 of file msg_base.cpp.

msg_base::~msg_base (  )  [virtual]

destructor

Definition at line 39 of file msg_base.cpp.


Member Function Documentation

void msg_base::on (  ) 

turns on

implements the base activate/deactivate functions

Definition at line 44 of file msg_base.cpp.

References is_on(), and v_on().

Referenced by msg_communicator::add_connection(), and aiomsg::start().

void msg_base::off (  ) 

turns off

Definition at line 53 of file msg_base.cpp.

References is_on(), and v_off().

Referenced by msg_communicator::shutdown_connection(), and aiomsg::stop().

void msg_base::set_on ( bool  on  )  [inline, protected]

sets the current state

Definition at line 69 of file msg_base.h.

References _mtx_res, and _on.

Referenced by v_off(), and v_on().

virtual void msg_base::v_on (  )  [inline, protected, virtual]

action on turning on

Reimplemented in msg_communicator, msg_queue_processor, msg_rpc_listener, and msg_sock_listener.

Definition at line 78 of file msg_base.h.

References set_on().

Referenced by on(), msg_sock_listener::v_on(), msg_rpc_listener::v_on(), and msg_queue_processor::v_on().

virtual void msg_base::v_off (  )  [inline, protected, virtual]


Member Data Documentation

mutex for internal resources

Definition at line 91 of file msg_base.h.

Referenced by msg_connection::is_last_activity_timeout(), is_on(), msg_connection::set_last_activity(), and set_on().

bool msg_base::_on [protected]

on/off flag

Definition at line 92 of file msg_base.h.

Referenced by is_on(), and set_on().


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


© Copyright Terimber 2003-.