|
fipa_services
|
Class to describe FIPA service directory. More...
#include <ServiceDirectory.hpp>
Public Types | |
| typedef boost::shared_ptr< ServiceDirectory > | Ptr |
Public Member Functions | |
| ServiceDirectory () | |
| virtual | ~ServiceDirectory () |
| virtual void | registerService (const ServiceDirectoryEntry &entry) |
| void | deregisterService (const ServiceDirectoryEntry &entry) |
| virtual void | deregisterService (const std::string ®ex, ServiceDirectoryEntry::Field field=ServiceDirectoryEntry::NAME) |
| ServiceDirectoryList | search (const ServiceDirectoryEntry &entry) const |
| virtual ServiceDirectoryList | search (const std::string ®ex, ServiceDirectoryEntry::Field field=ServiceDirectoryEntry::NAME, bool doThrow=true) const |
| void | modify (const ServiceDirectoryEntry &entry) |
| void | updateTimestamp () |
| base::Time | getTimestamp () const |
| ServiceDirectoryList | getAll () const |
| virtual void | mergeSelectively (const ServiceDirectoryList &updateList, ServiceDirectoryEntry::Field selectiveMerge) |
Protected Attributes | |
| boost::mutex | mMutex |
Class to describe FIPA service directory.
| typedef boost::shared_ptr<ServiceDirectory> fipa::services::ServiceDirectory::Ptr |
| fipa::services::ServiceDirectory::ServiceDirectory | ( | ) |
|
inlinevirtual |
| void fipa::services::ServiceDirectory::deregisterService | ( | const ServiceDirectoryEntry & | entry | ) |
Deregister service
| entry | (only the name is relevant for deregistration) |
| NotFound |
|
virtual |
Remove a service by name
| regex | regular expression |
| field | field to apply the regular expression on, default is name of the entry |
Reimplemented in fipa::services::DistributedServiceDirectory.
| ServiceDirectoryList fipa::services::ServiceDirectory::getAll | ( | ) | const |
Retrieve all registered services
|
inline |
Get timestamp
|
virtual |
Merge the existing service directory list with the existing.
Uses each unique value to update corresponding field, e.g., when locator is set as field for the selective merge then all instances with the same locator are removed from the service directory and are thus overriden by the updatelist
| updateList | list of services selected to update the existing one |
| selectiveMerge | Field by which entries are identified for removal |
| void fipa::services::ServiceDirectory::modify | ( | const ServiceDirectoryEntry & | entry | ) |
Modify an existing entry – an entry will be identified by the same name
| entry | Entry that updates the existing one |
| NotFound | if entry does not exist |
|
virtual |
Register service
| entry | description object to add |
| DuplicateEntry |
Reimplemented in fipa::services::DistributedServiceDirectory.
| ServiceDirectoryList fipa::services::ServiceDirectory::search | ( | const ServiceDirectoryEntry & | entry | ) | const |
Search for a service matching the given name
| entry | Entry to be searched for |
|
virtual |
Search for a service with a name matching the given regular expression
| regex | Regular expression to match |
| field | Field name to apply the regex to |
| doThrow | Flag to control the throw behaviour, i.e. to throw an exception when no result has been found |
| NotFound |
Reimplemented in fipa::services::DistributedServiceDirectory.
|
inline |
Update modification time
|
protected |
1.8.11