MIRA
|
Central instance that stores all created Authorities. More...
#include <fw/AuthorityManager.h>
Public Member Functions | |
AuthorityManager () | |
~AuthorityManager () | |
template<typename Reflector > | |
void | reflect (Reflector &r) |
Reflect method for serialization. More... | |
void | addAuthority (AbstractAuthority *authority) |
Adds an authority to the list of checked in authorities. More... | |
void | removeAuthority (AbstractAuthority *authority) |
Removes an authority. More... | |
void | start (const std::string &id) const |
Start the authority with the given id. More... | |
void | stop (const std::string &id) const |
Stops the authority with the given id. More... | |
bool | hasAuthority (const std::string &id) const |
Returns if an authority with the given global id exists. More... | |
bool | isRunning (const std::string &id) const |
Returns true if authority with given id is started. More... | |
bool | isLocal (const std::string &id) const |
Returns true if authority with given id is a local one (The instance lives in this framework/process) More... | |
bool | hasUnrecoverableFailure (const std::string &id) const |
Returns true if authority with given id has an unrecoverable error. More... | |
StatusManager::StatusMap | getStatusMap (const std::string &id) const |
Returns the status informations of the authority with given id. More... | |
AuthorityDescription | getDescription (const std::string &id) const |
Returns the description of the authority with given id. More... | |
std::set< std::string > | getPublishedChannels (const std::string &id) const |
Returns the published channels of the authority with given id. More... | |
std::set< std::string > | getSubscribedChannels (const std::string &id) const |
Returns the subscribed channels of the authority with given id. More... | |
boost::shared_ptr< PropertyNode > | getProperties (const std::string &id) const |
Returns the properties of the authority with given id. More... | |
std::set< std::string > | getAuthorities () const |
Returns a list of existing authorities. More... | |
SharedAuthority | getAuthority (const std::string &id) |
Get direct access to an authority pointer. More... | |
Central instance that stores all created Authorities.
Each Authority will automatically register and unregister here when checking in / checking out.
AuthorityManager | ( | ) |
~AuthorityManager | ( | ) |
|
inline |
Reflect method for serialization.
void addAuthority | ( | AbstractAuthority * | authority | ) |
Adds an authority to the list of checked in authorities.
XInvalidParameter | if authority already exists |
void removeAuthority | ( | AbstractAuthority * | authority | ) |
Removes an authority.
void start | ( | const std::string & | id | ) | const |
Start the authority with the given id.
void stop | ( | const std::string & | id | ) | const |
Stops the authority with the given id.
bool hasAuthority | ( | const std::string & | id | ) | const |
Returns if an authority with the given global id exists.
bool isRunning | ( | const std::string & | id | ) | const |
Returns true if authority with given id is started.
bool isLocal | ( | const std::string & | id | ) | const |
Returns true if authority with given id is a local one (The instance lives in this framework/process)
bool hasUnrecoverableFailure | ( | const std::string & | id | ) | const |
Returns true if authority with given id has an unrecoverable error.
StatusManager::StatusMap getStatusMap | ( | const std::string & | id | ) | const |
Returns the status informations of the authority with given id.
AuthorityDescription getDescription | ( | const std::string & | id | ) | const |
Returns the description of the authority with given id.
std::set<std::string> getPublishedChannels | ( | const std::string & | id | ) | const |
Returns the published channels of the authority with given id.
std::set<std::string> getSubscribedChannels | ( | const std::string & | id | ) | const |
Returns the subscribed channels of the authority with given id.
boost::shared_ptr<PropertyNode> getProperties | ( | const std::string & | id | ) | const |
Returns the properties of the authority with given id.
std::set<std::string> getAuthorities | ( | ) | const |
Returns a list of existing authorities.
SharedAuthority getAuthority | ( | const std::string & | id | ) |
Get direct access to an authority pointer.
The access is protected by a wrapper object that ensures the lifetime of the Authority as long as the wrapper exists.