template<class AD>
class lumiera::advice::Request< AD >
Access point for the advised entity (client).
This is the interface intended for client code to request advice of a specific type and optionally limited to a special topic (binding). Instantiating an Request<AD>
object automatically entails a registration with the AdviceSystem behind the scenes, and deleting it causes deregistration. Request objects may be instantiated and copied freely, and the binding pattern may be changed. The actual advice is accessed through the member function #getAdvice, which might return a default-constructed piece of advice data in case no specific advice has been provided yet. Accessing advice can be considered a lightweight operation, while creating/destroying advice causes an index operation and thus requires a lock.
Creating an Request and changing the binding might fail, while the dtor is protected against failure (as you'd expect). Accessing advice can also be considered safe, given the concrete advice type can be default constructed without failure in case there isn't any advice data provided yet.
Definition at line 428 of file advice.hpp.
|
typedef void() | DeleterFunc(void *) |
|
void | deregisterRequest () |
|
void | discardSolutions () |
| when advice is retracted explicitly, after removing the provision index entry we also need to re-process any requests which happen to match our binding... More...
|
|
void | publishProvision (PointOfAdvice *) |
| when the Provision actually sets advice data, this is copied into an internal buffer within the AdviceSystem. More...
|
|
void | publishRequestBindingChange (HashVal) |
|
void | registerRequest () |
|
| AdviceLink (Binding const &binding) |
|
void | setBindingPattern (Binding const &binding) |
| define or re-define the binding, which specifically labels this attachment to the advice system. More...
|
|
| PointOfAdvice (Binding const &binding) |
|
Binding::Matcher | getMatcher () const |
|
const PointOfAdvice * | getSolution () const |
|
void | setSolution (PointOfAdvice *solution=0) |
|
static void * | getBuffer (size_t) |
| allocate raw storage for a buffer holding the actual piece of advice. More...
|
|
static void | manageAdviceData (PointOfAdvice *, DeleterFunc *) |
| Store a descriptor record to take ownership of the given allocation. More...
|
|
static void | releaseBuffer (void *, size_t) |
|