S3FC project page S3FC home page

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

s3_periodic_notifier::event_loop Class Reference

Helper class that implements the timing loop for all s3_periodic_notifier s in a process space (clients). More...

#include <s3_periodic_notifier.h>

Inheritance diagram for s3_periodic_notifier::event_loop:

Inheritance graph
[legend]
Collaboration diagram for s3_periodic_notifier::event_loop:

Collaboration graph
[legend]
List of all members.

Public Methods

 event_loop ()
 ~event_loop ()
void add_client (s3_periodic_notifier *n_id)
void remove_client (s3_periodic_notifier *n_id)
void set_period (s3_periodic_notifier *id, const period_t &n_period)
bool clients () const

Private Types

typedef s3_periodic_notifiernotifier_id_t
typedef std::map< s3_periodic_notifier *,
period_t
list_t

Private Methods

bool is_client (s3_periodic_notifier *n_id)
virtual void main_loop ()
 Function that is invoked as the main loop in its own thread. More...


Private Attributes

std::map< s3_periodic_notifier *,
period_t
client_list
s3_mutex state_lock
 State lock mutex. More...


Detailed Description

Helper class that implements the timing loop for all s3_periodic_notifier s in a process space (clients).

Definition at line 98 of file s3_periodic_notifier.h.


Member Typedef Documentation

typedef std::map<s3_periodic_notifier*, period_t> s3_periodic_notifier::event_loop::list_t [private]
 

Definition at line 102 of file s3_periodic_notifier.h.

typedef s3_periodic_notifier* s3_periodic_notifier::event_loop::notifier_id_t [private]
 

Definition at line 101 of file s3_periodic_notifier.h.


Constructor & Destructor Documentation

s3_periodic_notifier::event_loop::event_loop  
 

Definition at line 50 of file s3_periodic_notifier.cc.

References s3_thread_base::start.

s3_periodic_notifier::event_loop::~event_loop  
 

Definition at line 57 of file s3_periodic_notifier.cc.

References s3_thread_base::request_terminate, and s3_thread_base::wait_on_exit.


Member Function Documentation

void s3_periodic_notifier::event_loop::add_client s3_periodic_notifier   n_id
 

Definition at line 65 of file s3_periodic_notifier.cc.

References client_list, is_client, s3_mutex::lock, state_lock, and s3_mutex::unlock.

Referenced by s3_periodic_notifier::s3_periodic_notifier.

bool s3_periodic_notifier::event_loop::clients   const
 

Definition at line 123 of file s3_periodic_notifier.cc.

References client_list, s3_mutex::lock, state_lock, and s3_mutex::unlock.

Referenced by s3_periodic_notifier::~s3_periodic_notifier.

bool s3_periodic_notifier::event_loop::is_client s3_periodic_notifier   n_id [private]
 

Definition at line 134 of file s3_periodic_notifier.cc.

References client_list.

Referenced by add_client, remove_client, and set_period.

void s3_periodic_notifier::event_loop::main_loop   [private, virtual]
 

Function that is invoked as the main loop in its own thread.

Override this in derived class.

Note:
This is to become pure virtual once the older void* main_loop(void*) is dropped entirely.

Implements s3_thread_base.

Definition at line 140 of file s3_periodic_notifier.cc.

References client_list, s3_mutex::lock, state_lock, s3_thread_base::test_terminate, and s3_mutex::unlock.

void s3_periodic_notifier::event_loop::remove_client s3_periodic_notifier   n_id
 

Definition at line 84 of file s3_periodic_notifier.cc.

References client_list, is_client, s3_mutex::lock, state_lock, and s3_mutex::unlock.

Referenced by s3_periodic_notifier::~s3_periodic_notifier.

void s3_periodic_notifier::event_loop::set_period s3_periodic_notifier   id,
const period_t   n_period
 

Definition at line 103 of file s3_periodic_notifier.cc.

References client_list, is_client, s3_mutex::lock, s3_periodic_notifier::period_t, state_lock, and s3_mutex::unlock.

Referenced by s3_periodic_notifier::s3_periodic_notifier, and s3_periodic_notifier::set_period.


Member Data Documentation

std::map<s3_periodic_notifier*, period_t> s3_periodic_notifier::event_loop::client_list [private]
 

Definition at line 104 of file s3_periodic_notifier.h.

Referenced by add_client, clients, is_client, main_loop, remove_client, and set_period.

s3_mutex s3_periodic_notifier::event_loop::state_lock [private]
 

State lock mutex.

Reimplemented from s3_thread_base.

Definition at line 105 of file s3_periodic_notifier.h.

Referenced by add_client, clients, main_loop, remove_client, and set_period.


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