RTT::os::StartStopManager Class Reference

This manager starts and stops all globally registered start/stop functions, without a particular order. More...

#include <StartStopManager.hpp>

List of all members.

Public Types

typedef boost::function< int(void)> start_fun
typedef boost::function< int(void)> start_fun
typedef boost::function< void(void)> stop_fun
typedef boost::function< void(void)> stop_fun

Public Member Functions

bool start ()
 Call all registered start functions.
bool start ()
 Call all registered start functions.
void startFunction (start_fun t)
 Register a start function.
void startFunction (start_fun t)
 Register a start function.
void stop ()
 Call all registered stop functions.
void stop ()
 Call all registered stop functions.
void stopFunction (stop_fun t)
 Register a stop function.
void stopFunction (stop_fun t)
 Register a stop function.

Static Public Member Functions

static StartStopManagerInstance ()
static StartStopManagerInstance ()
static void Release ()
static void Release ()

Private Member Functions

void res_collector (start_fun f)
void res_collector (start_fun f)
 StartStopManager ()
 StartStopManager ()
 ~StartStopManager ()
 ~StartStopManager ()

Static Private Member Functions

static void caller (stop_fun f)
static void caller (stop_fun f)

Private Attributes

bool res
std::vector< start_funstartv
std::vector< stop_funstopv

Static Private Attributes

static StartStopManagermt

Detailed Description

This manager starts and stops all globally registered start/stop functions, without a particular order.

This is guaranteed to work, because it uses the Singleton pattern with a global pointer. This pointer is initialised to zero at program startup, before the global constructors are called. The first time a global constructor calls this manager, it will be properly constructed.

Definition at line 61 of file install/include/rtt/os/StartStopManager.hpp.


Member Typedef Documentation

typedef boost::function<int (void)> RTT::os::StartStopManager::start_fun

Definition at line 70 of file rtt/os/StartStopManager.hpp.

typedef boost::function<int (void)> RTT::os::StartStopManager::start_fun

Definition at line 70 of file install/include/rtt/os/StartStopManager.hpp.

typedef boost::function<void (void)> RTT::os::StartStopManager::stop_fun

Definition at line 71 of file rtt/os/StartStopManager.hpp.

typedef boost::function<void (void)> RTT::os::StartStopManager::stop_fun

Definition at line 71 of file install/include/rtt/os/StartStopManager.hpp.


Constructor & Destructor Documentation

RTT::os::StartStopManager::StartStopManager (  )  [private]

Definition at line 87 of file StartStopManager.cpp.

RTT::os::StartStopManager::~StartStopManager (  )  [private]

Definition at line 89 of file StartStopManager.cpp.

RTT::os::StartStopManager::StartStopManager (  )  [private]
RTT::os::StartStopManager::~StartStopManager (  )  [private]

Member Function Documentation

static void RTT::os::StartStopManager::caller ( stop_fun  f  )  [inline, static, private]

Definition at line 107 of file rtt/os/StartStopManager.hpp.

static void RTT::os::StartStopManager::caller ( stop_fun  f  )  [inline, static, private]

Definition at line 107 of file install/include/rtt/os/StartStopManager.hpp.

static StartStopManager* RTT::os::StartStopManager::Instance (  )  [static]
StartStopManager * RTT::os::StartStopManager::Instance (  )  [static]

Definition at line 49 of file StartStopManager.cpp.

static void RTT::os::StartStopManager::Release (  )  [static]
void RTT::os::StartStopManager::Release (  )  [static]

Definition at line 56 of file StartStopManager.cpp.

void RTT::os::StartStopManager::res_collector ( start_fun  f  )  [inline, private]

Definition at line 101 of file rtt/os/StartStopManager.hpp.

void RTT::os::StartStopManager::res_collector ( start_fun  f  )  [inline, private]

Definition at line 101 of file install/include/rtt/os/StartStopManager.hpp.

bool RTT::os::StartStopManager::start (  ) 

Call all registered start functions.

Returns:
false if one or more failed.
bool RTT::os::StartStopManager::start (  ) 

Call all registered start functions.

Returns:
false if one or more failed.

Definition at line 72 of file StartStopManager.cpp.

void RTT::os::StartStopManager::startFunction ( start_fun  t  ) 

Register a start function.

void RTT::os::StartStopManager::startFunction ( start_fun  t  ) 

Register a start function.

Definition at line 62 of file StartStopManager.cpp.

void RTT::os::StartStopManager::stop (  ) 

Call all registered stop functions.

void RTT::os::StartStopManager::stop (  ) 

Call all registered stop functions.

Definition at line 82 of file StartStopManager.cpp.

void RTT::os::StartStopManager::stopFunction ( stop_fun  t  ) 

Register a stop function.

void RTT::os::StartStopManager::stopFunction ( stop_fun  t  ) 

Register a stop function.

Definition at line 67 of file StartStopManager.cpp.


Member Data Documentation

static StartStopManager * RTT::os::StartStopManager::mt [static, private]

Definition at line 63 of file install/include/rtt/os/StartStopManager.hpp.

Definition at line 112 of file install/include/rtt/os/StartStopManager.hpp.

std::vector< start_fun > RTT::os::StartStopManager::startv [private]

Definition at line 114 of file install/include/rtt/os/StartStopManager.hpp.

std::vector< stop_fun > RTT::os::StartStopManager::stopv [private]

Definition at line 115 of file install/include/rtt/os/StartStopManager.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:10 2013