This manager starts and stops all globally registered start/stop functions, without a particular order. More...
#include <StartStopManager.hpp>
Public Types | |
| typedef int(* | start_fun )(void) |
| typedef boost::function< void(void)> | stop_fun |
Public Member Functions | |
| bool | start () |
| Call all registered start functions. | |
| void | startFunction (start_fun t) |
| Register a start function. | |
| void | stop () |
| Call all registered stop functions. | |
| void | stopFunction (stop_fun t) |
| Register a stop function. | |
Static Public Member Functions | |
| static StartStopManager * | Instance () |
| static void | Release () |
Private Member Functions | |
| void | res_collector (start_fun f) |
| StartStopManager () | |
| ~StartStopManager () | |
Static Private Member Functions | |
| static void | caller (stop_fun f) |
Private Attributes | |
| bool | res |
| std::vector< start_fun > | startv |
| std::vector< stop_fun > | stopv |
Static Private Attributes | |
| static StartStopManager * | mt |
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 StartStopManager.hpp.
| typedef int(* RTT::os::StartStopManager::start_fun)(void) |
Definition at line 70 of file StartStopManager.hpp.
| typedef boost::function<void (void)> RTT::os::StartStopManager::stop_fun |
Definition at line 71 of file StartStopManager.hpp.
| RTT::os::StartStopManager::StartStopManager | ( | ) | [private] |
Definition at line 88 of file StartStopManager.cpp.
| RTT::os::StartStopManager::~StartStopManager | ( | ) | [private] |
Definition at line 90 of file StartStopManager.cpp.
| static void RTT::os::StartStopManager::caller | ( | stop_fun | f | ) | [inline, static, private] |
Definition at line 107 of file StartStopManager.hpp.
| StartStopManager * RTT::os::StartStopManager::Instance | ( | ) | [static] |
Definition at line 49 of file StartStopManager.cpp.
| 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 StartStopManager.hpp.
| bool RTT::os::StartStopManager::start | ( | void | ) |
Call all registered start functions.
Definition at line 72 of file StartStopManager.cpp.
Register a start function.
Definition at line 62 of file StartStopManager.cpp.
| void RTT::os::StartStopManager::stop | ( | void | ) |
Call all registered stop functions.
Definition at line 83 of file StartStopManager.cpp.
Register a stop function.
Definition at line 67 of file StartStopManager.cpp.
StartStopManager * RTT::os::StartStopManager::mt [static, private] |
Definition at line 63 of file StartStopManager.hpp.
bool RTT::os::StartStopManager::res [private] |
Definition at line 113 of file StartStopManager.hpp.
std::vector<start_fun> RTT::os::StartStopManager::startv [private] |
Definition at line 115 of file StartStopManager.hpp.
std::vector<stop_fun> RTT::os::StartStopManager::stopv [private] |
Definition at line 116 of file StartStopManager.hpp.