OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EvaluationLink.h
Go to the documentation of this file.
1 /*
2  * opencog/atoms/execution/EvaluationLink.h
3  *
4  * Copyright (C) 2013,2014,2015 Linas Vepstas
5  * All Rights Reserved
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License v3 as
9  * published by the Free Software Foundation and including the exceptions
10  * at http://opencog.org/wiki/Licenses
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU Affero General Public License
18  * along with this program; if not, write to:
19  * Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef _OPENCOG_EVALUTATION_LINK_H
24 #define _OPENCOG_EVALUTATION_LINK_H
25 
28 
29 namespace opencog
30 {
35 class EvaluationLink : public FreeLink
36 {
37 public:
38  EvaluationLink(const HandleSeq& oset,
41 
45 
46  EvaluationLink(Link& l);
47 
49  return do_evaluate(as, Handle(shared_from_this()));
50  }
51 
53  static TruthValuePtr do_evaluate(AtomSpace*, const HandleSeq& schema_and_args);
54  static TruthValuePtr do_evaluate(AtomSpace*, Handle schema, Handle args);
55 };
56 
57 typedef std::shared_ptr<EvaluationLink> EvaluationLinkPtr;
59  { AtomPtr a(h); return std::dynamic_pointer_cast<EvaluationLink>(a); }
61  { return std::dynamic_pointer_cast<EvaluationLink>(a); }
62 
63 // XXX temporary hack ...
64 #define createEvaluationLink std::make_shared<EvaluationLink>
65 
67 }
68 
69 #endif // _OPENCOG_EVALUTATION_LINK_H
static EvaluationLinkPtr EvaluationLinkCast(const Handle &h)
friend class Handle
Definition: Atom.h:79
std::vector< Handle > HandleSeq
a list of handles
Definition: Handle.h:246
std::shared_ptr< Atom > AtomPtr
Definition: Handle.h:48
std::shared_ptr< EvaluationLink > EvaluationLinkPtr
std::shared_ptr< TruthValue > TruthValuePtr
Definition: TruthValue.h:85
std::shared_ptr< AttentionValue > AttentionValuePtr
static TruthValuePtr NULL_TV()
Definition: TruthValue.cc:46
tuple args
Definition: benchmark.py:79
static AttentionValuePtr DEFAULT_AV()
to be used as default attention value