OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <SchemePrimitive.h>
Protected Member Functions | |
void | do_register (const char *, const char *, int) |
virtual SCM | invoke (SCM)=0 |
virtual const char * | get_module (void)=0 |
virtual const char * | get_name (void)=0 |
virtual size_t | get_size (void)=0 |
virtual | ~PrimitiveEnviron () |
Private Member Functions | |
void | really_do_register (const char *, const char *, int) |
Static Private Member Functions | |
static void | init (void) |
static void | init_in_module (void *) |
static void * | c_wrap_register (void *) |
static SCM | do_call (SCM, SCM) |
static PrimitiveEnviron * | verify_pe (SCM, const char *) |
Private Attributes | |
const char * | tmp_module |
const char * | tmp_name |
int | tmp_nargs |
Static Private Attributes | |
static bool | is_inited = false |
Friends | |
class | SchemeEval |
class | SchemeSmob |
Definition at line 28 of file SchemePrimitive.h.
|
protectedvirtual |
Definition at line 52 of file SchemePrimitive.cc.
|
staticprivate |
Definition at line 64 of file SchemePrimitive.cc.
References really_do_register().
|
staticprivate |
Definition at line 132 of file SchemePrimitive.cc.
References get_name(), invoke(), opencog::SchemeSmob::throw_exception(), and verify_pe().
|
protected |
Definition at line 54 of file SchemePrimitive.cc.
References c_wrap_register(), tmp_module, tmp_name, and tmp_nargs.
|
protectedpure virtual |
Implemented in opencog::SchemePrimitive< T >.
|
protectedpure virtual |
|
protectedpure virtual |
|
staticprivate |
initialization code – This is currently called under a lock, from SchemeEval::init()
Definition at line 31 of file SchemePrimitive.cc.
References init_in_module(), and is_inited.
|
staticprivate |
This is called while (opencog extension) is the current module. Thus, opencog-extension is only defined in that module.
Definition at line 44 of file SchemePrimitive.cc.
|
protectedpure virtual |
|
private |
Create a new smob that will store a pointer to "this", which, in turn, holds a pointer to the C++ instance and the C++ method to be invoked, when its called from scheme. The evaluation of the scheme function will actually end up calling "opencog-extension", which passes this smob to do_call(). It will be do_call that then calls the actual C++ function.
Note that this method must be called in "guile mode".
Definition at line 82 of file SchemePrimitive.cc.
References BUFLEN, opencog::SchemeSmob::COG_EXTEND, opencog::SchemeSmob::cog_misc_tag, get_size(), and init().
|
staticprivate |
Definition at line 160 of file SchemePrimitive.cc.
References opencog::SchemeSmob::COG_EXTEND, and opencog::SchemeSmob::cog_misc_tag.
|
friend |
Definition at line 30 of file SchemePrimitive.h.
|
friend |
Definition at line 31 of file SchemePrimitive.h.
|
staticprivate |
Definition at line 33 of file SchemePrimitive.h.
|
private |
Definition at line 40 of file SchemePrimitive.h.
|
private |
Definition at line 41 of file SchemePrimitive.h.
|
private |
Definition at line 42 of file SchemePrimitive.h.