$search
#include <ServiceRequester.hpp>
An object that expresses you wish to use a service. The ServiceRequester is symmetrical to the Service. Where a Service registers operations that a component can execute ('provides'), the ServiceRequester registers the methods that a caller wishes to call ('requires'). One method in a ServiceRequester maps to one operation in a Service.
Typical use is to inherit from ServiceRequester and add named OperationCaller objects to it using addOperationCaller.
Definition at line 64 of file ServiceRequester.hpp.
typedef std::vector<std::string> RTT::ServiceRequester::OperationCallerNames |
Definition at line 68 of file ServiceRequester.hpp.
typedef std::map<std::string, base::OperationCallerBaseInvoker*> RTT::ServiceRequester::OperationCallers [protected] |
Our methods.
Definition at line 146 of file ServiceRequester.hpp.
typedef std::vector<std::string> RTT::ServiceRequester::RequesterNames |
Definition at line 67 of file ServiceRequester.hpp.
typedef std::map< std::string, ServiceRequester* > RTT::ServiceRequester::Requests [protected] |
Definition at line 141 of file ServiceRequester.hpp.
RTT::ServiceRequester::ServiceRequester | ( | const std::string & | name, | |
TaskContext * | owner = 0 | |||
) |
Definition at line 54 of file ServiceRequester.cpp.
RTT::ServiceRequester::~ServiceRequester | ( | ) | [virtual] |
Definition at line 59 of file ServiceRequester.cpp.
bool RTT::ServiceRequester::addOperationCaller | ( | base::OperationCallerBaseInvoker & | mbi | ) |
Definition at line 63 of file ServiceRequester.cpp.
bool RTT::ServiceRequester::connectTo | ( | Service::shared_ptr | sp | ) |
Connects this service's methods to the operations provided by op. This method tries to match as many as possible method-operation pairs.
You may call this function with different instances of sp to 'resolve' missing functions, only the non-connected methods will be further filled in.
sp | An interface-compatible Service. |
Definition at line 92 of file ServiceRequester.cpp.
void RTT::ServiceRequester::disconnect | ( | ) |
Disconnects all methods from their implementation.
Definition at line 125 of file ServiceRequester.cpp.
OperationCallerBaseInvoker * RTT::ServiceRequester::getOperationCaller | ( | const std::string & | name | ) |
Definition at line 84 of file ServiceRequester.cpp.
std::vector< std::string > RTT::ServiceRequester::getOperationCallerNames | ( | ) | const |
Definition at line 74 of file ServiceRequester.cpp.
Service::shared_ptr RTT::ServiceRequester::getReferencedService | ( | ) |
Returns the service we're referencing. In case you used connectTo to more than one service, this returns the service which was used when connectTo first returned true.
std::vector< std::string > RTT::ServiceRequester::getRequesterNames | ( | ) | const |
Definition at line 79 of file ServiceRequester.cpp.
const std::string& RTT::ServiceRequester::getRequestName | ( | ) | const [inline] |
Definition at line 72 of file ServiceRequester.hpp.
TaskContext* RTT::ServiceRequester::getServiceOwner | ( | ) | const [inline] |
The owner is the top-level TaskContext owning this service (indirectly).
Definition at line 80 of file ServiceRequester.hpp.
bool RTT::ServiceRequester::ready | ( | ) | const |
Returns true when all methods were resolved.
Definition at line 132 of file ServiceRequester.cpp.
ServiceRequester* RTT::ServiceRequester::requires | ( | const std::string & | service_name | ) | [inline] |
Definition at line 98 of file ServiceRequester.hpp.
ServiceRequester* RTT::ServiceRequester::requires | ( | ) | [inline] |
Definition at line 96 of file ServiceRequester.hpp.
bool RTT::ServiceRequester::requiresService | ( | const std::string & | service_name | ) | [inline] |
Query if this service requires certain sub-services.
service_name |
Definition at line 112 of file ServiceRequester.hpp.
OperationCallers RTT::ServiceRequester::mmethods [protected] |
Definition at line 147 of file ServiceRequester.hpp.
Service::shared_ptr RTT::ServiceRequester::mprovider [protected] |
Definition at line 151 of file ServiceRequester.hpp.
Requests RTT::ServiceRequester::mrequests [protected] |
the services we implement.
Definition at line 143 of file ServiceRequester.hpp.
std::string RTT::ServiceRequester::mrname [protected] |
Definition at line 149 of file ServiceRequester.hpp.
TaskContext* RTT::ServiceRequester::mrowner [protected] |
Definition at line 150 of file ServiceRequester.hpp.