Lumiera
0.pre.03
»edit your freedom«
|
#include "common/advice.hpp"
Advice Collaboration partner, internally connected to the AdviceSystem.
Both advice::Request and advice::Provision are linked in this way to an internal index datastructure, which allows to carry out the actual advice exchange and collaboration.
Definition at line 194 of file advice.hpp.
Public Member Functions | |
AdviceLink (Binding const &binding) | |
Public Member Functions inherited from PointOfAdvice | |
PointOfAdvice (Binding const &binding) | |
Binding::Matcher | getMatcher () const |
const PointOfAdvice * | getSolution () const |
void | setSolution (PointOfAdvice *solution=0) |
Protected Types | |
typedef void() | DeleterFunc(void *) |
Protected Member Functions | |
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 () |
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. More... | |
Static Protected Member Functions | |
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) |
|
protected |
when the Provision actually sets advice data, this is copied into an internal buffer within the AdviceSystem.
We then use the Index to remember the presence of this advice data and to detect possible matches with existing advice::Request entries.
adviceData | pointer to the copied data, actually pointing to an ActiveProvision<AD> |
NULL
in case no old entry exists. Definition at line 322 of file advice.cpp.
References lumiera::advice::anonymous_namespace{advice.cpp}::aSys.
|
protected |
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...
Definition at line 340 of file advice.cpp.
|
staticprotected |
allocate raw storage for a buffer holding the actual piece of advice.
We need to manage this internally, as the original advice::Provision may go out of scope, while the advice information as such remains valid.
error::Fatal | on allocation failure |
Definition at line 280 of file advice.cpp.
References lumiera::advice::anonymous_namespace{advice.cpp}::aSys.
|
staticprotected |
Store a descriptor record to take ownership of the given allocation.
Problem is we need to know the exact size of the advice value holder, which information is available initially, when the advice data is copied into the system. The knowledge about the size of the allocation is embodied into the deleter function. This allows later to discard entries without needing to know their exact type.
Definition at line 301 of file advice.cpp.