add (protected) calls to the AdviceSystem

This commit is contained in:
Fischlurch 2010-05-27 03:42:23 +02:00
parent 69af735070
commit d5ebe14d73
2 changed files with 56 additions and 6 deletions

View file

@ -116,6 +116,14 @@ namespace advice {
pattern_ = binding.buildMatcher();
}
void publishProvision();
void discardSolutions ();
void publishBindingChange();
void publishRequestBindingChange();
void registrateRequest();
void deregistrateRequest();
public:
explicit
PointOfAdvice (Binding const& binding)
@ -204,20 +212,20 @@ namespace advice {
void setAdvice (AD const& pieceOfAdvice)
{
theAdvice_ = pieceOfAdvice;
UNIMPLEMENTED ("change advice provision registration");
publishProvision (); ///////////////////////////TODO how to propagate without specific typing?
}
void retractAdvice()
{
theAdvice_ = this->handleMissingSolution();
UNIMPLEMENTED ("notify index of retracted advice");
discardSolutions ();
}
void
defineBinding (Literal topic)
{
setBindingPattern (Binding(topic).addTypeGuard<AD>());
UNIMPLEMENTED ("propagate binding change to index");
publishBindingChange();
}
};
@ -246,12 +254,12 @@ namespace advice {
Request (Literal bindingSpec =0)
: PointOfAdvice (Binding(bindingSpec).addTypeGuard<AD>())
{
UNIMPLEMENTED ("registration with the index");
registrateRequest();
}
~Request()
{
UNIMPLEMENTED ("detach from index");
deregistrateRequest();
}
@ -270,7 +278,7 @@ namespace advice {
defineBinding (Literal topic)
{
setBindingPattern (Binding(topic).addTypeGuard<AD>());
UNIMPLEMENTED ("propagate binding change to index");
publishRequestBindingChange();
}
};

View file

@ -32,6 +32,48 @@ namespace advice {
/* ohlolololohaha */
void
PointOfAdvice::publishProvision()
{
UNIMPLEMENTED ("change advice provision registration");
}
void
PointOfAdvice::discardSolutions ()
{
UNIMPLEMENTED ("notify index of retracted advice");
}
void
PointOfAdvice::publishBindingChange ()
{
UNIMPLEMENTED ("propagate binding change to index");
}
void
PointOfAdvice::publishRequestBindingChange()
{
UNIMPLEMENTED ("propagate binding change to index");
}
void
PointOfAdvice::registrateRequest()
{
UNIMPLEMENTED ("registrate request with the index");
}
void
PointOfAdvice::deregistrateRequest()
{
UNIMPLEMENTED ("detach request from index");
}