OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <ExecutionOutputLink.h>
Static Private Member Functions | |
static Handle | do_execute (AtomSpace *, const Handle &schema, const Handle &args) |
Definition at line 35 of file ExecutionOutputLink.h.
ExecutionOutputLink::ExecutionOutputLink | ( | const HandleSeq & | oset, |
TruthValuePtr | tv = TruthValue::NULL_TV() , |
||
AttentionValuePtr | av = AttentionValue::DEFAULT_AV() |
||
) |
Definition at line 39 of file ExecutionOutputLink.cc.
ExecutionOutputLink::ExecutionOutputLink | ( | const Handle & | schema, |
const Handle & | args, | ||
TruthValuePtr | tv = TruthValue::NULL_TV() , |
||
AttentionValuePtr | av = AttentionValue::DEFAULT_AV() |
||
) |
Definition at line 53 of file ExecutionOutputLink.cc.
References opencog::Atom::getType().
ExecutionOutputLink::ExecutionOutputLink | ( | Link & | l | ) |
Definition at line 67 of file ExecutionOutputLink.cc.
References opencog::Atom::getType().
|
staticprivate |
do_execute – execute the GroundedSchemaNode of the ExecutionOutputLink
Expects "gsn" to be a GroundedSchemaNode Expects "args" to be a ListLink Executes the GroundedSchemaNode, supplying the args as argument
Definition at line 101 of file ExecutionOutputLink.cc.
References opencog::AtomSpace::add_link(), opencog::SchemeEval::apply(), opencog::PythonEval::apply(), benchmark::args, opencog::GenericEval::eval_error(), opencog::Instantiator::execute(), opencog::SchemeEval::get_evaluator(), opencog::PythonEval::instance(), opencog::LinkCast(), and opencog::NodeCast().
execute – execute the function defined in an ExecutionOutputLink
Each ExecutionOutputLink should have the form:
ExecutionOutputLink GroundedSchemaNode "lang: func_name" ListLink SomeAtom OtherAtom
The "lang:" should be either "scm:" for scheme, or "py:" for python. This method will then invoke "func_name" on the provided ListLink of arguments to the function.
Reimplemented from opencog::FunctionLink.
Definition at line 90 of file ExecutionOutputLink.cc.
References opencog::Link::_outgoing, and do_execute().