Base class for all client proxies. More...

Public Member Functions | |
| PeekabotClient | get_client () const |
| Get the client associated with this proxy. | |
| bool | is_assigned () const |
| Returns true if the proxy has been assigned. | |
Protected Member Functions | |
| PEEKABOT_HIDDEN | PeekabotProxyBase (const PeekabotProxyBase &p) |
| PEEKABOT_HIDDEN void | set_client_impl (boost::shared_ptr< ClientImpl > client) |
| Set the client associated with this proxy. | |
|
PEEKABOT_HIDDEN boost::shared_ptr< ClientImpl > | unchecked_get_client_impl () const |
|
PEEKABOT_HIDDEN boost::shared_ptr< ClientImpl > | get_client_impl () const |
| PEEKABOT_HIDDEN void | dispatch_action (Action *action, Status *status) const |
| Dispatch (send) an action. | |
| PEEKABOT_HIDDEN boost::shared_ptr < OperationResult > | dispatch_get_action (Action *action, uint32_t request_id) const |
| Dispatch (send) a get-action. | |
| PEEKABOT_HIDDEN uint32_t | allocate_request_id () const |
| Allocate a request ID, used for track statuses and results. | |
Static Protected Member Functions | |
|
static boost::shared_ptr < ClientImpl > | unchecked_get_client_impl (const PeekabotProxyBase &p) |
|
static boost::shared_ptr < ClientImpl > | get_client_impl (const PeekabotProxyBase &p) |
|
static boost::shared_ptr < ClientImpl > | get_client_impl (PeekabotClient &client) |
Protected Attributes | |
| boost::recursive_mutex | m_mutex |
| Governs access to ALL members of the class. | |
Base class for all client proxies.
Provides operations common to all proxies, be it object proxies or, say, GUI-related proxies. Most notably, it provides methods for dispatching (sending) actions, including actions for "get operations".
Each client proxy has a client associated with it, which is used for dispatching actions etc. If unassigned (e.g. if default constructed) no client is associated with the proxy, and any attempts to use the client will generate an exception.
| uint32_t allocate_request_id | ( | ) | const [protected] |
Allocate a request ID, used for track statuses and results.
Each status and result request has a request ID tied to it. Such IDs can be generated by this method. For status requests allocation of request IDs is implicit, but when dealing with result requests an ID has to be allocated manually (see dispatch_get_action(Action *, uint32_t)).
| void dispatch_action | ( | Action * | action, | |
| Status * | status | |||
| ) | const [protected] |
Dispatch (send) an action.
This method simply forwards what's passed to it to PeekabotClient. Refer to PeekabotClient::dispatch_ation(Action *, Status *, bool) for documentation.
| boost::shared_ptr< OperationResult > dispatch_get_action | ( | Action * | action, | |
| uint32_t | request_id | |||
| ) | const [protected] |
Dispatch (send) a get-action.
This method simply forwards what's passed to it to PeekabotClient. Refer to PeekabotClient::dispatch_get_ation(Action *, Status *, bool) for documentation.
| PeekabotClient get_client | ( | ) | const |
Get the client associated with this proxy.
| std::logic_error | Thrown if the proxy is not associated with a client. |
boost::recursive_mutex m_mutex [mutable, protected] |
Governs access to ALL members of the class.
To keep memory consumption down, derived classes are encouraged to use the same mutex for syncrhonizing access to their members.
1.7.1