Rcpp Version 1.0.9
|
#include <Module.h>
Public Types | |
typedef std::map< std::string, CppFunction * > | MAP |
typedef std::pair< const std::string, CppFunction * > | FUNCTION_PAIR |
typedef std::map< std::string, class_Base * > | CLASS_MAP |
typedef std::pair< const std::string, class_Base * > | CLASS_PAIR |
typedef CLASS_MAP::iterator | CLASS_ITERATOR |
Public Member Functions | |
Module () | |
Module (const char *name_) | |
SEXP | invoke (const std::string &name_, SEXP *args, int nargs) |
IntegerVector | functions_arity () |
CharacterVector | functions_names () |
CharacterVector | class_names () |
List | classes_info () |
CharacterVector | complete () |
SEXP | get_function (const std::string &name_) |
DL_FUNC | get_function_ptr (const std::string &name_) |
void | Add (const char *name_, CppFunction *ptr) |
void | AddClass (const char *name_, class_Base *cptr) |
bool | has_function (const std::string &m) |
bool | has_class (const std::string &m) |
CppClass | get_class (const std::string &cl) |
class_Base * | get_class_pointer (const std::string &cl) |
void | add_enum (const std::string &parent_class_typeinfo_name, const std::string &enum_name, const std::map< std::string, int > &value) |
Public Attributes | |
std::string | name |
Private Attributes | |
MAP | functions |
CLASS_MAP | classes |
std::string | prefix |
typedef CLASS_MAP::iterator Rcpp::Module::CLASS_ITERATOR |
typedef std::map<std::string,class_Base*> Rcpp::Module::CLASS_MAP |
typedef std::pair<const std::string,class_Base*> Rcpp::Module::CLASS_PAIR |
typedef std::pair<const std::string,CppFunction*> Rcpp::Module::FUNCTION_PAIR |
typedef std::map<std::string,CppFunction*> Rcpp::Module::MAP |
|
inline |
|
inline |
Definition at line 192 of file Module.h.
References functions, Rcpp::CppFunction::get_function_ptr(), and prefix.
|
inline |
Definition at line 219 of file Module.h.
References Rcpp::class_Base::add_enum(), and classes.
Referenced by Rcpp::enum_< Enum, Parent >::~enum_().
|
inline |
|
inline |
|
inline |
information about the classes
Definition at line 25 of file Module.h.
References classes, and Rcpp::NamesProxyPolicy< CLASS >::names().
|
inline |
|
inline |
vector of arity of all the functions exported by the module
Definition at line 72 of file Module.h.
References functions, and Rcpp::NamesProxyPolicy< CLASS >::names().
|
inline |
|
inline |
Definition at line 39 of file Module.h.
References BEGIN_RCPP, classes, and END_RCPP.
|
inline |
|
inline |
Returns a list that contains:
The R code in Module.R uses this information to create a C++Function object
Definition at line 154 of file Module.h.
References Rcpp::Vector< VECSXP >::create(), Rcpp::CppFunction::docstring, functions, Rcpp::CppFunction::get_formals(), Rcpp::CppFunction::is_void(), Rcpp::CppFunction::nargs(), Rcpp::sign(), and Rcpp::CppFunction::signature().
|
inline |
get the underlying C++ function pointer as a DL_FUNC
Definition at line 179 of file Module.h.
References functions, and Rcpp::CppFunction::get_function_ptr().
|
inline |
|
inline |
|
inline |
calls a function from that module with the specified arguments
name | the name of the function to call |
args | an array of R objects to use as arguments for the function |
nargs | number of arguments |
Definition at line 53 of file Module.h.
References Rcpp::_, Rcpp::Vector< VECSXP >::create(), functions, Rcpp::CppFunction::is_void(), and Rcpp::CppFunction::nargs().
|
private |
Definition at line 235 of file Module.h.
Referenced by add_enum(), AddClass(), class_names(), classes_info(), complete(), get_class(), get_class_pointer(), and has_class().
|
private |
Definition at line 234 of file Module.h.
Referenced by Add(), complete(), functions_arity(), functions_names(), get_function(), get_function_ptr(), has_function(), and invoke().
|
private |