![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "common/advice.hpp"
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.
Public Member Functions | |
| Request (Literal bindingSpec=0) | |
| ~Request () | |
| AD const & | getAdvice () const |
| bool | isMatched () const |
| void | defineBinding (Literal topic) |
| set and possibly change the binding term used to retrieve Advice | |
Private Types | |
| typedef const ActiveProvision< AD > | AdviceProvision |
Private Member Functions | |
| AD const & | handleMissingSolution () const |
| < | |
Additional Inherited Members | |
Protected Types inherited from AdviceLink | |
| typedef void() | DeleterFunc(void *) |
Protected Member Functions inherited from AdviceLink | |
| void | publishProvision (PointOfAdvice *) |
| when the Provision actually sets advice data, this is copied into an internal buffer within the AdviceSystem. | |
| 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... | |
| void | publishRequestBindingChange (HashVal) |
| void | registerRequest () |
| void | deregisterRequest () |
| AdviceLink (Binding const &binding) | |
Protected Member Functions inherited from PointOfAdvice | |
| void | setBindingPattern (Binding const &binding) |
| define or re-define the binding, which specifically labels this attachment to the advice system. | |
| PointOfAdvice (Binding const &binding) | |
| void | setSolution (PointOfAdvice *solution=0) |
| const PointOfAdvice * | getSolution () const |
| Binding::Matcher | getMatcher () const |
Static Protected Member Functions inherited from AdviceLink | |
| static void * | getBuffer (size_t) |
| allocate raw storage for a buffer holding the actual piece of advice. | |
| static void | releaseBuffer (void *, size_t) |
| static void | manageAdviceData (PointOfAdvice *, DeleterFunc *) |
| Store a descriptor record to take ownership of the given allocation. | |
Definition at line 445 of file advice.hpp.
References AdviceLink::registerRequest().
Here is the call graph for this function:
|
inline |
Definition at line 451 of file advice.hpp.
References AdviceLink::deregisterRequest().
Here is the call graph for this function:
|
private |
Definition at line 431 of file advice.hpp.
|
inlineprivate |
<
Definition at line 437 of file advice.hpp.
References NullValue< TY >::get().
Referenced by Request< AD >::getAdvice().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 460 of file advice.hpp.
References PointOfAdvice::getSolution(), and Request< AD >::handleMissingSolution().
Referenced by steam::play::anonymous_namespace{diagnostic-output-slot.hpp}::getTestTimeGrid(), and lib::time::anonymous_namespace{common-services.cpp}::retrieveQuantiser().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
true if this request retrieves a piece of information specifically set by an Advisor, as opposed to just delivering a default fallback result. Definition at line 475 of file advice.hpp.
References PointOfAdvice::getSolution().
Here is the call graph for this function:
|
inline |
set and possibly change the binding term used to retrieve Advice
Definition at line 483 of file advice.hpp.
References PointOfAdvice::hash_value, AdviceLink::publishRequestBindingChange(), and PointOfAdvice::setBindingPattern().
Here is the call graph for this function:
Inheritance diagram for Request< AD >:
Collaboration diagram for Request< AD >: