OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BindlinkStub.cc
Go to the documentation of this file.
6 
7 #include "BindlinkStub.h"
8 
9 using namespace opencog;
10 
12 {
13  return handle;
14 }
15 
17 {
18  // XXX FIXME: the FunctionLink::do_execute should, in theory,
19  // be able to handle the ExecutionOutputLink. However, currently,
20  // it cannot, because putting this code there leads to a circular
21  // shared library dependency (PythonEval depends on
22  // ExecutionOutputLink depends on PythonEval, ad infinitum) and
23  // so cmake refused to compile. It would be great if this circular
24  // dependency of python on itself was somehow broken, but, given
25  // what ExecutionOutputLink does, its hard to see how to fix this.
26  //
27  if (EXECUTION_OUTPUT_LINK == handle->getType()) {
28  LinkPtr lp(LinkCast(handle));
30  if (NULL == eolp)
31  eolp = createExecutionOutputLink(*lp);
32  return eolp->execute(atomspace);
33  }
34 
35  return FunctionLink::do_execute(atomspace, handle);
36 }
#define createExecutionOutputLink
Type getType() const
Definition: Atom.h:197
std::shared_ptr< Link > LinkPtr
Definition: Atom.h:53
Handle do_execute(AtomSpace *, Handle)
Definition: BindlinkStub.cc:16
static LinkPtr LinkCast(const Handle &h)
Definition: Link.h:263
std::shared_ptr< ExecutionOutputLink > ExecutionOutputLinkPtr
static ExecutionOutputLinkPtr ExecutionOutputLinkCast(const Handle &h)
Handle stub_bindlink(AtomSpace *, Handle)
Definition: BindlinkStub.cc:11