|
OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <SchemePrimitive.h>
Inheritance diagram for opencog::SchemePrimitive< T >:
Collaboration diagram for opencog::SchemePrimitive< T >:Public Member Functions | |
| DECLARE_CONSTR_2 (S_SS, s_ss, const std::string &, const std::string &, const std::string &) DECLARE_CONSTR_3(S_SSS | |
| const std::string const std::string const std::string const std::string & | DECLARE_CONSTR_2 (V_SS, v_ss, void, const std::string &, const std::string &) DECLARE_CONSTR_3(V_SSS |
| const std::string const std::string const std::string const std::string const std::string const std::string const std::string & | DECLARE_CONSTR_0 (V_V, v_v, void) |
Public Attributes | |
| s_sss | |
| const std::string const std::string const std::string const std::string | v_sss |
| const std::string const std::string const std::string const std::string | void |
| bool(T::* | b_hi )(Handle, int) |
| bool(T::* | b_hh )(Handle, Handle) |
| double(T::* | d_hht )(Handle, Handle, Type) |
| double(T::* | d_hhtb )(Handle, Handle, Type, bool) |
| Handle(T::* | h_h )(Handle) |
| Handle(T::* | h_hi )(Handle, int) |
| Handle(T::* | h_hh )(Handle, Handle) |
| Handle(T::* | h_hs )(Handle, const std::string &) |
| Handle(T::* | h_htq )(Handle, Type, const HandleSeq &) |
| Handle(T::* | h_sq )(const std::string &, const HandleSeq &) |
| Handle(T::* | h_sqq )(const std::string &, const HandleSeq &, const HandleSeq &) |
| HandleSeq(T::* | q_h )(Handle) |
| HandleSeq(T::* | q_hti )(Handle, Type, int) |
| HandleSeq(T::* | q_htib )(Handle, Type, int, bool) |
| HandleSeqSeq(T::* | k_h )(Handle) |
| HandleSeqSeq(T::* | k_hi )(Handle, int) |
| const std::string &(T::* | s_s )(const std::string &) |
| const std::string &(T::* | s_ss )(const std::string &, const std::string &) |
| const std::string &(T::* | s_sss )(const std::string &, const std::string &, const std::string &) |
| const std::string &(T::* | s_v )(void) |
| TruthValuePtr(T::* | p_h )(Handle) |
| void(T::* | v_h )(Handle) |
| void(T::* | v_s )(const std::string &) |
| void(T::* | v_ss )(const std::string &, const std::string &) |
| void(T::* | v_sss )(const std::string &, const std::string &, const std::string &) |
| void(T::* | v_t )(Type) |
| void(T::* | v_ti )(Type, int) |
| void(T::* | v_tidi )(Type, int, double, int) |
| void(T::* | v_v )(void) |
Protected Member Functions | |
| virtual const char * | get_name (void) |
| virtual const char * | get_module (void) |
| virtual size_t | get_size (void) |
Protected Member Functions inherited from opencog::PrimitiveEnviron | |
| void | do_register (const char *, const char *, int) |
| virtual | ~PrimitiveEnviron () |
Private Types | |
| enum | { B_HI, B_HH, D_HHT, D_HHTB, H_H, H_HI, H_HH, H_HS, H_HTQ, H_SQ, H_SQQ, Q_H, Q_HTI, Q_HTIB, K_H, K_HI, S_S, S_SS, S_SSS, S_V, P_H, V_H, V_S, V_SS, V_SSS, V_T, V_TI, V_TIDI, V_V } |
Private Member Functions | |
| virtual SCM | invoke (SCM args) |
Private Attributes | |
| union { | |
| bool(T::* b_hi )(Handle, int) | |
| bool(T::* b_hh )(Handle, Handle) | |
| double(T::* d_hht )(Handle, Handle, Type) | |
| double(T::* d_hhtb )(Handle, Handle, Type, bool) | |
| Handle(T::* h_h )(Handle) | |
| Handle(T::* h_hi )(Handle, int) | |
| Handle(T::* h_hh )(Handle, Handle) | |
| Handle(T::* h_hs )(Handle, const std::string &) | |
| Handle(T::* h_htq )(Handle, Type, const HandleSeq &) | |
| Handle(T::* h_sq )(const std::string &, const HandleSeq &) | |
| Handle(T::* h_sqq )(const std::string &, const HandleSeq &, const HandleSeq &) | |
| HandleSeq(T::* q_h )(Handle) | |
| HandleSeq(T::* q_hti )(Handle, Type, int) | |
| HandleSeq(T::* q_htib )(Handle, Type, int, bool) | |
| HandleSeqSeq(T::* k_h )(Handle) | |
| HandleSeqSeq(T::* k_hi )(Handle, int) | |
| const std::string &(T::* s_s )(const std::string &) | |
| const std::string &(T::* s_ss )(const std::string &, const std::string &) | |
| const std::string &(T::* s_sss )(const std::string &, const std::string &, const std::string &) | |
| const std::string &(T::* s_v )(void) | |
| TruthValuePtr(T::* p_h )(Handle) | |
| void(T::* v_h )(Handle) | |
| void(T::* v_s )(const std::string &) | |
| void(T::* v_ss )(const std::string &, const std::string &) | |
| void(T::* v_sss )(const std::string &, const std::string &, const std::string &) | |
| void(T::* v_t )(Type) | |
| void(T::* v_ti )(Type, int) | |
| void(T::* v_tidi )(Type, int, double, int) | |
| void(T::* v_v )(void) | |
| } | method |
| T * | that |
| const char * | scheme_module |
| const char * | scheme_name |
| enum opencog::SchemePrimitive:: { ... } | signature |
SchemePrimitive – template class used for defining a new primitve
This template may be used to wrap a C++ object in such a way that it can be invoked from scheme code. The file "PrimitiveExample.cc" provides a detailed example of how to do this, and how to invoke the resulting primitive.
This template has a handful of pre-defined signatures. If you cannot find the signature that you need, you will need to extend this template a bit to add the needed signature. This shouldn't be hard; just work from the existing examples; please keep things in alphabetical order.
Definition at line 70 of file SchemePrimitive.h.
|
private |
| Enumerator | |
|---|---|
| B_HI | |
| B_HH | |
| D_HHT | |
| D_HHTB | |
| H_H | |
| H_HI | |
| H_HH | |
| H_HS | |
| H_HTQ | |
| H_SQ | |
| H_SQQ | |
| Q_H | |
| Q_HTI | |
| Q_HTIB | |
| K_H | |
| K_HI | |
| S_S | |
| S_SS | |
| S_SSS | |
| S_V | |
| P_H | |
| V_H | |
| V_S | |
| V_SS | |
| V_SSS | |
| V_T | |
| V_TI | |
| V_TIDI | |
| V_V | |
Definition at line 130 of file SchemePrimitive.h.
| const std::string const std::string const std::string const std::string const std::string const std::string const std::string& opencog::SchemePrimitive< T >::DECLARE_CONSTR_0 | ( | V_V | , |
| v_v | , | ||
| void | |||
| ) |
| opencog::SchemePrimitive< T >::DECLARE_CONSTR_2 | ( | S_SS | , |
| s_ss | , | ||
| const std::string & | , | ||
| const std::string & | , | ||
| const std::string & | |||
| ) |
| const std::string const std::string const std::string const std::string& opencog::SchemePrimitive< T >::DECLARE_CONSTR_2 | ( | V_SS | , |
| v_ss | , | ||
| void | , | ||
| const std::string & | , | ||
| const std::string & | |||
| ) |
|
inlineprotectedvirtual |
Implements opencog::PrimitiveEnviron.
Definition at line 538 of file SchemePrimitive.h.
References opencog::SchemePrimitive< T >::scheme_module.
|
inlineprotectedvirtual |
Implements opencog::PrimitiveEnviron.
Definition at line 537 of file SchemePrimitive.h.
References opencog::SchemePrimitive< T >::scheme_name.
|
inlineprotectedvirtual |
Implements opencog::PrimitiveEnviron.
Definition at line 539 of file SchemePrimitive.h.
|
inlineprivatevirtual |
Implements opencog::PrimitiveEnviron.
Definition at line 163 of file SchemePrimitive.h.
References opencog::SchemePrimitive< T >::B_HH, opencog::SchemePrimitive< T >::B_HI, opencog::classserver(), opencog::SchemePrimitive< T >::D_HHT, opencog::SchemePrimitive< T >::D_HHTB, opencog::ClassServer::getType(), opencog::SchemePrimitive< T >::H_H, opencog::SchemePrimitive< T >::H_HH, opencog::SchemePrimitive< T >::H_HI, opencog::SchemePrimitive< T >::H_HS, opencog::SchemePrimitive< T >::H_HTQ, opencog::SchemePrimitive< T >::H_SQ, opencog::SchemePrimitive< T >::H_SQQ, opencog::SchemeSmob::handle_to_scm(), opencog::SchemePrimitive< T >::K_H, opencog::SchemePrimitive< T >::K_HI, opencog::SchemePrimitive< T >::method, opencog::SchemePrimitive< T >::P_H, opencog::SchemePrimitive< T >::Q_H, opencog::SchemePrimitive< T >::Q_HTI, opencog::SchemePrimitive< T >::Q_HTIB, opencog::SchemePrimitive< T >::S_S, opencog::SchemePrimitive< T >::S_SS, opencog::SchemePrimitive< T >::S_SSS, opencog::SchemePrimitive< T >::S_V, opencog::SchemePrimitive< T >::scheme_name, opencog::SchemePrimitive< T >::signature, python.undocumented.blocksworld::t, opencog::SchemePrimitive< T >::that, tv, opencog::SchemeSmob::tv_to_scm(), opencog::SchemePrimitive< T >::V_H, opencog::SchemePrimitive< T >::V_S, opencog::SchemePrimitive< T >::V_SS, opencog::SchemePrimitive< T >::V_SSS, opencog::SchemePrimitive< T >::V_T, opencog::SchemePrimitive< T >::V_TI, opencog::SchemePrimitive< T >::V_TIDI, opencog::SchemePrimitive< T >::V_V, opencog::SchemeSmob::verify_atom_type(), opencog::SchemeSmob::verify_handle(), opencog::SchemeSmob::verify_handle_list(), opencog::SchemeSmob::verify_int(), and opencog::SchemeSmob::verify_string().
| bool(T::* opencog::SchemePrimitive< T >::b_hh)(Handle, Handle) |
Definition at line 91 of file SchemePrimitive.h.
| bool(T::* opencog::SchemePrimitive< T >::b_hi)(Handle, int) |
Definition at line 90 of file SchemePrimitive.h.
| double(T::* opencog::SchemePrimitive< T >::d_hht)(Handle, Handle, Type) |
Definition at line 92 of file SchemePrimitive.h.
| double(T::* opencog::SchemePrimitive< T >::d_hhtb)(Handle, Handle, Type, bool) |
Definition at line 93 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_h)(Handle) |
Definition at line 94 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_hh)(Handle, Handle) |
Definition at line 96 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_hi)(Handle, int) |
Definition at line 95 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_hs)(Handle, const std::string &) |
Definition at line 97 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_htq)(Handle, Type, const HandleSeq &) |
Definition at line 98 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_sq)(const std::string &, const HandleSeq &) |
Definition at line 99 of file SchemePrimitive.h.
| Handle(T::* opencog::SchemePrimitive< T >::h_sqq)(const std::string &, const HandleSeq &, const HandleSeq &) |
Definition at line 100 of file SchemePrimitive.h.
| HandleSeqSeq(T::* opencog::SchemePrimitive< T >::k_h)(Handle) |
Definition at line 105 of file SchemePrimitive.h.
| HandleSeqSeq(T::* opencog::SchemePrimitive< T >::k_hi)(Handle, int) |
Definition at line 106 of file SchemePrimitive.h.
| union { ... } opencog::SchemePrimitive< T >::method |
| TruthValuePtr(T::* opencog::SchemePrimitive< T >::p_h)(Handle) |
Definition at line 114 of file SchemePrimitive.h.
| HandleSeq(T::* opencog::SchemePrimitive< T >::q_h)(Handle) |
Definition at line 102 of file SchemePrimitive.h.
| HandleSeq(T::* opencog::SchemePrimitive< T >::q_hti)(Handle, Type, int) |
Definition at line 103 of file SchemePrimitive.h.
| HandleSeq(T::* opencog::SchemePrimitive< T >::q_htib)(Handle, Type, int, bool) |
Definition at line 104 of file SchemePrimitive.h.
| const std::string&(T::* opencog::SchemePrimitive< T >::s_s)(const std::string &) |
Definition at line 107 of file SchemePrimitive.h.
| const std::string&(T::* opencog::SchemePrimitive< T >::s_ss)(const std::string &, const std::string &) |
Definition at line 108 of file SchemePrimitive.h.
| const std::string&(T::* opencog::SchemePrimitive< T >::s_sss)(const std::string &, const std::string &, const std::string &) |
Definition at line 110 of file SchemePrimitive.h.
| opencog::SchemePrimitive< T >::s_sss |
Definition at line 622 of file SchemePrimitive.h.
| const std::string&(T::* opencog::SchemePrimitive< T >::s_v)(void) |
Definition at line 113 of file SchemePrimitive.h.
|
private |
Definition at line 128 of file SchemePrimitive.h.
|
private |
Definition at line 129 of file SchemePrimitive.h.
| enum { ... } opencog::SchemePrimitive< T >::signature |
|
private |
Definition at line 127 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_h)(Handle) |
Definition at line 115 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_s)(const std::string &) |
Definition at line 116 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_ss)(const std::string &, const std::string &) |
Definition at line 117 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_sss)(const std::string &, const std::string &, const std::string &) |
Definition at line 119 of file SchemePrimitive.h.
| const std::string const std::string const std::string const std::string opencog::SchemePrimitive< T >::v_sss |
Definition at line 630 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_t)(Type) |
Definition at line 122 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_ti)(Type, int) |
Definition at line 123 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_tidi)(Type, int, double, int) |
Definition at line 124 of file SchemePrimitive.h.
| void(T::* opencog::SchemePrimitive< T >::v_v)(void) |
Definition at line 125 of file SchemePrimitive.h.
| const std::string const std::string const std::string const std::string opencog::SchemePrimitive< T >::void |
Definition at line 630 of file SchemePrimitive.h.