DUNE: Uniform Navigational Environment
2016.05.0
|
Classes | |
struct | Entity |
struct | InvalidId |
struct | InvalidLabel |
struct | NonexistentLabel |
struct | ReservedUnique |
Public Member Functions | |
EntityDataBase (void) | |
~EntityDataBase (void) | |
bool | labelExists (const std::string &name) |
bool | idExists (unsigned int id) |
unsigned int | reserve (const std::string &label, const std::string &task_name) |
unsigned int | resolve (const std::string &label) |
std::string | resolveTaskName (const std::string &label) |
const std::string & | resolve (unsigned int id) |
void | contents (std::vector< Entity * > &devs) |
std::map< unsigned, std::string > | entries (void) |
|
inline |
Constructor.
|
inline |
Destructor.
|
inline |
Fill a vector with pointers to the existing Entity records.
[out] | devs | vector to be filled. |
Referenced by DUNE::Daemon::consume(), Monitors::Entities::Task::onEntityResolution(), and Transports::LoggingDigest::Task::startLog().
|
inline |
Produce a map between the existing numeric entity ids and the entity labels.
|
inline |
Determine if an entity identified by a given numeric id exists in the database.
[in] | id | numeric id to use. |
|
inline |
Determine if an entity identified by a given label exists in the database.
[in] | name | entity label to use. |
|
inline |
Add an entity to the database, identified by a unique label, and retrieve the reserved numerical id.
[in] | label | the desired entity label. |
[in] | task_name | the name of the task owning the entity. |
References DUNE::Entities::EntityDataBase::Entity::id, DUNE::Entities::EntityDataBase::Entity::label, and DUNE::Entities::EntityDataBase::Entity::task_name.
Referenced by DUNE::Tasks::Task::reserveEntities(), and DUNE::Tasks::Task::reserveEntity().
|
inline |
Get the numeric id for the entity identified by the given label The NonexistentLabel exception is thrown if there is no matching entity in the database.
Referenced by DUNE::Tasks::Task::resolveEntity(), and DUNE::Entities::BasicEntity::setLabel().
|
inline |
Get the label for the entity identified by the given numeric id.
The InvalidId exception is thrown if there is no matching entity in the database.
|
inline |
Get the task name for the entity identified by the given label The NonexistentLabel exception is thrown if there is no matching entity in the database.
Referenced by DUNE::Daemon::consume().