2010-04-11 01:11:39 +02:00
|
|
|
/*
|
|
|
|
|
Advice - generic loosely coupled interaction guided by symbolic pattern
|
|
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2010, Hermann Vosseler <Ichthyostega@web.de>
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "lib/advice.hpp"
|
2010-04-24 17:31:01 +02:00
|
|
|
#include "lib/advice/index.hpp"
|
2010-04-11 01:11:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace lib {
|
|
|
|
|
namespace advice {
|
|
|
|
|
|
|
|
|
|
// LUMIERA_ERROR_DEFINE (MISSING_INSTANCE, "Existing ID registration without associated instance");
|
|
|
|
|
|
|
|
|
|
|
2010-05-29 01:25:14 +02:00
|
|
|
/** 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.
|
|
|
|
|
@note the special twist is the size of the buffer depending on the actual
|
|
|
|
|
advice type, which we need to erase for tracking all advice provisions
|
|
|
|
|
and advice requests through an generic index datastructure.
|
|
|
|
|
@todo rewrite to use Lumiera's block allocator / memory pool */
|
|
|
|
|
void*
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::getBuffer(size_t)
|
2010-05-29 01:25:14 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("raw allocation and de-allocation of advice holding buffer");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2010-05-27 03:42:23 +02:00
|
|
|
void
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::publishProvision (PointOfAdvice*)
|
2010-05-27 03:42:23 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("change advice provision registration");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::discardSolutions ()
|
2010-05-27 03:42:23 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("notify index of retracted advice");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::publishBindingChange ()
|
2010-05-27 03:42:23 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("propagate binding change to index");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::publishRequestBindingChange()
|
2010-05-27 03:42:23 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("propagate binding change to index");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::registerRequest()
|
2010-05-27 03:42:23 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("registrate request with the index");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-29 04:22:24 +02:00
|
|
|
AdviceLink::deregisterRequest()
|
2010-05-27 03:42:23 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("detach request from index");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2010-04-11 01:11:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}} // namespace lib::advice
|