ACE::Monitor_Control::Monitor_Base Class Reference

Base class from which the template monitor point class is derived. More...

#include <Monitor_Base.h>

Inheritance diagram for ACE::Monitor_Control::Monitor_Base:

Inheritance graph
[legend]
Collaboration diagram for ACE::Monitor_Control::Monitor_Base:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
Monitor_Control_Types::ConstraintList 
CONSTRAINTS
typedef CONSTRAINTS::const_iterator CONSTRAINT_ITERATOR

Public Member Functions

virtual void update (void)=0
virtual void receive (double value)
 Updates the monitor's data if it is a numeric floating point.
virtual void receive (size_t value)
 Updates the monitor's data if it is an integer size.
long add_constraint (const char *expression, Control_Action *action=0)
 Add a constraint, returns a unique constraint id.
Control_Actionremove_constraint (const long constraint_id)
CONSTRAINTSconstraints (void)
 Get all constraints.
void clear (void)
 Reset function.
void retrieve (Monitor_Control_Types::Data &data) const
 Data accessors.
void retrieve_and_clear (Monitor_Control_Types::Data &data)
void add_to_registry (const ACE_Time_Value &time=ACE_Time_Value::zero)
 Common to all monitors.
void remove_from_registry (void)
const char * name (void) const
void name (const char *new_name)
void add_ref (void)
void remove_ref (void)

Protected Member Functions

 Monitor_Base (void)
 Monitor_Base (const char *name)
virtual ~Monitor_Base (void)
virtual void clear_i (void)

Protected Attributes

Monitor_Control_Types::Data data_
ACE_SYNCH_MUTEX mutex_
CONSTRAINTS constraints_

Private Attributes

ACE_CString name_


Detailed Description

Base class from which the template monitor point class is derived.

All the operations are pure virtual so they can be implemented in the 'disabled' template specialization as no-ops.


Member Typedef Documentation


Constructor & Destructor Documentation

ACE::Monitor_Control::Monitor_Base::Monitor_Base ( void   )  [protected]

ACE::Monitor_Control::Monitor_Base::Monitor_Base ( const char *  name  )  [protected]

ACE::Monitor_Control::Monitor_Base::~Monitor_Base ( void   )  [protected, virtual]


Member Function Documentation

virtual void ACE::Monitor_Control::Monitor_Base::update ( void   )  [pure virtual]

Implemented by the most-derived class. Does the actual work of fetching the monitored value.

Implemented in ACE::Monitor_Control::Size_Monitor.

void ACE::Monitor_Control::Monitor_Base::receive ( double  value  )  [virtual]

Updates the monitor's data if it is a numeric floating point.

void ACE::Monitor_Control::Monitor_Base::receive ( size_t  value  )  [virtual]

Updates the monitor's data if it is an integer size.

long ACE::Monitor_Control::Monitor_Base::add_constraint ( const char *  expression,
Control_Action action = 0 
)

Add a constraint, returns a unique constraint id.

Thread-safe and guaranteed to be unique.

This is thread-safe on its own so we don't have to guard it here.

Since we know external key is unique, we don't check for failure.

Control_Action * ACE::Monitor_Control::Monitor_Base::remove_constraint ( const long  constraint_id  ) 

Remove a constraint and return the associated control action, which may be shared, for deletion or further use.

Monitor_Base::CONSTRAINTS & ACE::Monitor_Control::Monitor_Base::constraints ( void   ) 

Get all constraints.

void ACE::Monitor_Control::Monitor_Base::clear ( void   ) 

Reset function.

Reimplemented in ACE::Monitor_Control::Size_Monitor.

void ACE::Monitor_Control::Monitor_Base::retrieve ( Monitor_Control_Types::Data data  )  const

Data accessors.

void ACE::Monitor_Control::Monitor_Base::retrieve_and_clear ( Monitor_Control_Types::Data data  ) 

void ACE::Monitor_Control::Monitor_Base::add_to_registry ( const ACE_Time_Value time = ACE_Time_Value::zero  ) 

Common to all monitors.

void ACE::Monitor_Control::Monitor_Base::remove_from_registry ( void   ) 

ACE_INLINE const char * ACE::Monitor_Control::Monitor_Base::name ( void   )  const

ACE_INLINE void ACE::Monitor_Control::Monitor_Base::name ( const char *  new_name  ) 

void ACE::Monitor_Control::Monitor_Base::add_ref ( void   ) 

void ACE::Monitor_Control::Monitor_Base::remove_ref ( void   ) 

void ACE::Monitor_Control::Monitor_Base::clear_i ( void   )  [protected, virtual]

Overridden in some monitors (for example the OS monitors) where clearing requires monitor-specific actions.


Member Data Documentation

ACE_SYNCH_MUTEX ACE::Monitor_Control::Monitor_Base::mutex_ [mutable, protected]


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

Generated on Mon May 19 03:32:51 2008 for ACE by  doxygen 1.5.5