23 #include <opencog/atomspace/atom_types.h>
32 using namespace opencog;
40 throw InvalidParamException(TRACE_INFO,
"Expecting a FunctionLink");
50 throw InvalidParamException(TRACE_INFO,
"Expecting a FunctionLink");
60 throw InvalidParamException(TRACE_INFO,
"Expecting a FunctionLink");
69 throw InvalidParamException(TRACE_INFO,
"Expecting a FunctionLink");
75 throw RuntimeException(TRACE_INFO,
"Not executable: %s\n",
85 throw RuntimeException(TRACE_INFO,
"Not executable!");
87 return flp->execute(as);
93 throw RuntimeException(TRACE_INFO,
"Not executable!");
106 if (ASSIGN_LINK == t)
109 if (DELETE_LINK == t)
112 if (INSERT_LINK == t)
118 if (REMOVE_LINK == t)
129 if (EXECUTION_OUTPUT_LINK == t)
131 throw RuntimeException(TRACE_INFO,
"Can't be a factory for this!");
133 throw RuntimeException(TRACE_INFO,
"Not executable!");
std::vector< Handle > HandleSeq
a list of handles
static LinkPtr factory(LinkPtr)
std::shared_ptr< TruthValue > TruthValuePtr
std::shared_ptr< AttentionValue > AttentionValuePtr
std::shared_ptr< Link > LinkPtr
std::shared_ptr< FunctionLink > FunctionLinkPtr
ClassServer & classserver(ClassServerFactory *=ClassServer::createInstance)
static FunctionLinkPtr FunctionLinkCast(const Handle &h)
static Handle do_execute(AtomSpace *, const Handle &)
virtual Handle execute(AtomSpace *=NULL) const
static LinkPtr LinkCast(const Handle &h)
unsigned short Type
type of Atoms, represented as short integer (16 bits)
FunctionLink(Type, const Handle &a, TruthValuePtr tv=TruthValue::NULL_TV(), AttentionValuePtr av=AttentionValue::DEFAULT_AV())