Lumiera
0.pre.03
»edit your freedom«
|
#include "common/advice/binding.hpp"
Conjunction of predicates to be matched against a collaboration partner for establishing an Advice connection.
The binding is defined by a textual spec in prolog-like syntax. The internal representation is immediately normalised. Typically the goal is just to create a #Matcher (Functor) to be stored for later match checks TODO type comment
Definition at line 99 of file common/advice/binding.hpp.
Public Member Functions | |
Binding () | |
create the empty binding, equivalent to true | |
Binding (Literal spec) | |
create the binding as defined by the given textual definition. More... | |
void | addPredicate (Literal spec) |
extend the definition of this binding by adding a predicate according to the given textual definition | |
template<typename TY > | |
Binding const & | addTypeGuard () |
Matcher | buildMatcher () const |
HashVal | calculateHash () const |
operator string () const | |
Classes | |
class | Atom |
single predicate as part of an advice binding pattern More... | |
class | Matcher |
Functor object for matching against another Binding. More... | |
Friends | |
bool | operator== (Binding const &, Binding const &) |
bindings are considered equivalent if, after normalisation, their respective definitions are identical. More... | |
Private Types | |
typedef std::set< Atom > | NormalisedAtoms |
Private Member Functions | |
void | parse_and_append (Literal def) |
internal: parse into atoms, and insert them | |
Private Attributes | |
NormalisedAtoms | atoms_ |
create the binding as defined by the given textual definition.
Definition at line 105 of file common/advice/binding.cpp.
bindings are considered equivalent if, after normalisation, their respective definitions are identical.
pred(X)
matches pred(u)
or any other binding of the form pred(<constant_value>)
////TICKET #615 not yet implemented Definition at line 173 of file common/advice/binding.cpp.