Rcpp Version 0.10.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
Module.cpp File Reference
#include <Rcpp.h>
#include "internal.h"
Include dependency graph for Module.cpp:

Go to the source code of this file.

Namespaces

namespace  Rcpp
 Rcpp API.
namespace  Rcpp::internal
 internal implementation details

Macros

#define MAX_ARGS   65
#define UNPACK_EXTERNAL_ARGS(__CARGS__, __P__)
#define CHECK_DUMMY_OBJ(p)   if(p == rcpp_dummy_pointer) forward_exception_to_r ( Rcpp::not_initialized())

Typedefs

typedef Rcpp::XPtr< Rcpp::Module > XP_Module
typedef Rcpp::XPtr
< Rcpp::class_Base > 
XP_Class
typedef Rcpp::XPtr
< Rcpp::CppFunction > 
XP_Function

Functions

 RCPP_FUNCTION_1 (bool, Class__has_default_constructor, XP_Class cl)
 RCPP_FUNCTION_2 (SEXP, Module__get_function, XP_Module module, std::string fun)
 RCPP_FUNCTION_2 (bool, Class__has_method, XP_Class cl, std::string m)
 RCPP_FUNCTION_2 (bool, Class__has_property, XP_Class cl, std::string m)
 RCPP_FUNCTION_1 (std::string, Class__name, XP_Class cl)
 RCPP_FUNCTION_2 (bool, Module__has_function, XP_Module module, std::string met)
 RCPP_FUNCTION_2 (bool, Module__has_class, XP_Module module, std::string cl)
 RCPP_FUNCTION_2 (Rcpp::CppClass, Module__get_class, XP_Module module, std::string cl)
 RCPP_FUNCTION_1 (bool, CppObject__needs_init, SEXP xp)
 RCPP_FUNCTION_1 (Rcpp::CharacterVector, CppClass__methods, XP_Class cl)
 RCPP_FUNCTION_1 (Rcpp::CharacterVector, CppClass__properties, XP_Class cl)
 RCPP_FUNCTION_1 (Rcpp::List, CppClass__property_classes, XP_Class cl)
 RCPP_FUNCTION_1 (Rcpp::IntegerVector, CppClass__methods_arity, XP_Class cl)
 RCPP_FUNCTION_1 (Rcpp::LogicalVector, CppClass__methods_voidness, XP_Class cl)
 RCPP_FUNCTION_2 (bool, CppClass__property_is_readonly, XP_Class cl, std::string p)
 RCPP_FUNCTION_2 (std::string, CppClass__property_class, XP_Class cl, std::string p)
 RCPP_FUNCTION_1 (Rcpp::IntegerVector, Module__functions_arity, XP_Module module)
 RCPP_FUNCTION_1 (Rcpp::CharacterVector, Module__functions_names, XP_Module module)
 RCPP_FUNCTION_1 (std::string, Module__name, XP_Module module)
 RCPP_FUNCTION_1 (Rcpp::List, Module__classes_info, XP_Module module)
 RCPP_FUNCTION_1 (Rcpp::CharacterVector, Module__complete, XP_Module module)
 RCPP_FUNCTION_1 (Rcpp::CharacterVector, CppClass__complete, XP_Class cl)
 RCPP_FUNCTION_3 (SEXP, CppField__get, XP_Class cl, SEXP field_xp, SEXP obj)
 RCPP_FUNCTION_4 (SEXP, CppField__set, XP_Class cl, SEXP field_xp, SEXP obj, SEXP value)
 RCPP_FUNCTION_2 (SEXP, CppObject__finalize, XP_Class cl, SEXP obj)
SEXP InternalFunction_invoke (SEXP args)
SEXP Module__invoke (SEXP args)
SEXP class__newInstance (SEXP args)
SEXP class__dummyInstance (SEXP args)
SEXP CppMethod__invoke (SEXP args)
SEXP CppMethod__invoke_void (SEXP args)
SEXP CppMethod__invoke_notvoid (SEXP args)
Rcpp::Module * getCurrentScope ()
void setCurrentScope (Rcpp::Module *scope)
void R_init_Rcpp (DllInfo *info)
void * Rcpp::internal::as_module_object_internal (SEXP)
FunctionProxy Rcpp::GetCppCallable (const std::string &pkg, const std::string &mod, const std::string &fun)

Variables

SEXP rcpp_dummy_pointer = R_NilValue
static ModuleRcpp::current_scope

Macro Definition Documentation

#define CHECK_DUMMY_OBJ (   p)    if(p == rcpp_dummy_pointer) forward_exception_to_r ( Rcpp::not_initialized())
#define MAX_ARGS   65

Definition at line 25 of file Module.cpp.

#define UNPACK_EXTERNAL_ARGS (   __CARGS__,
  __P__ 
)
Value:
SEXP __CARGS__[MAX_ARGS] ; \
int nargs = 0 ; \
for(; nargs<MAX_ARGS; nargs++){ \
if( p == R_NilValue ) break ; \
__CARGS__[nargs] = CAR(__P__) ; \
__P__ = CDR(__P__) ; \
}

Definition at line 27 of file Module.cpp.

Referenced by class__newInstance(), CppMethod__invoke(), CppMethod__invoke_notvoid(), CppMethod__invoke_void(), InternalFunction_invoke(), and Module__invoke().

Typedef Documentation

typedef Rcpp::XPtr<Rcpp::class_Base> XP_Class

Definition at line 37 of file Module.cpp.

typedef Rcpp::XPtr<Rcpp::CppFunction> XP_Function

Definition at line 38 of file Module.cpp.

typedef Rcpp::XPtr<Rcpp::Module> XP_Module

Definition at line 36 of file Module.cpp.

Function Documentation

SEXP class__dummyInstance ( SEXP  args)

Definition at line 161 of file Module.cpp.

References p, R_NilValue, and rcpp_dummy_pointer.

SEXP class__newInstance ( SEXP  args)

Definition at line 146 of file Module.cpp.

References p, and UNPACK_EXTERNAL_ARGS.

SEXP CppMethod__invoke ( SEXP  args)

Definition at line 173 of file Module.cpp.

References CHECK_DUMMY_OBJ, p, and UNPACK_EXTERNAL_ARGS.

SEXP CppMethod__invoke_notvoid ( SEXP  args)

Definition at line 211 of file Module.cpp.

References CHECK_DUMMY_OBJ, p, and UNPACK_EXTERNAL_ARGS.

SEXP CppMethod__invoke_void ( SEXP  args)

Definition at line 192 of file Module.cpp.

References CHECK_DUMMY_OBJ, p, R_NilValue, and UNPACK_EXTERNAL_ARGS.

Rcpp::Module* getCurrentScope ( )
SEXP InternalFunction_invoke ( SEXP  args)

Definition at line 126 of file Module.cpp.

References BEGIN_RCPP, END_RCPP, p, and UNPACK_EXTERNAL_ARGS.

SEXP Module__invoke ( SEXP  args)

Definition at line 135 of file Module.cpp.

References BEGIN_RCPP, END_RCPP, p, and UNPACK_EXTERNAL_ARGS.

void R_init_Rcpp ( DllInfo *  info)

Definition at line 237 of file Module.cpp.

References Rcpp::current_scope, init_Rcpp_cache(), and init_Rcpp_routines().

Here is the call graph for this function:

RCPP_FUNCTION_1 ( bool  ,
Class__has_default_constructor  ,
XP_Class  cl 
)

Definition at line 40 of file Module.cpp.

RCPP_FUNCTION_1 ( std::string  ,
Class__name  ,
XP_Class  cl 
)

Definition at line 52 of file Module.cpp.

RCPP_FUNCTION_1 ( bool  ,
CppObject__needs_init  ,
SEXP  xp 
)

Definition at line 64 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::CharacterVector  ,
CppClass__methods  ,
XP_Class  cl 
)

Definition at line 67 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::CharacterVector  ,
CppClass__properties  ,
XP_Class  cl 
)

Definition at line 70 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::List  ,
CppClass__property_classes  ,
XP_Class  cl 
)

Definition at line 73 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::IntegerVector  ,
CppClass__methods_arity  ,
XP_Class  cl 
)

Definition at line 77 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::LogicalVector  ,
CppClass__methods_voidness  ,
XP_Class  cl 
)

Definition at line 80 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::IntegerVector  ,
Module__functions_arity  ,
XP_Module  module 
)

Definition at line 92 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::CharacterVector  ,
Module__functions_names  ,
XP_Module  module 
)

Definition at line 95 of file Module.cpp.

RCPP_FUNCTION_1 ( std::string  ,
Module__name  ,
XP_Module  module 
)

Definition at line 98 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::List  ,
Module__classes_info  ,
XP_Module  module 
)

Definition at line 101 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::CharacterVector  ,
Module__complete  ,
XP_Module  module 
)

Definition at line 104 of file Module.cpp.

RCPP_FUNCTION_1 ( Rcpp::CharacterVector  ,
CppClass__complete  ,
XP_Class  cl 
)

Definition at line 107 of file Module.cpp.

RCPP_FUNCTION_2 ( SEXP  ,
Module__get_function  ,
XP_Module  module,
std::string  fun 
)

Definition at line 43 of file Module.cpp.

RCPP_FUNCTION_2 ( bool  ,
Class__has_method  ,
XP_Class  cl,
std::string  m 
)

Definition at line 46 of file Module.cpp.

RCPP_FUNCTION_2 ( bool  ,
Class__has_property  ,
XP_Class  cl,
std::string  m 
)

Definition at line 49 of file Module.cpp.

RCPP_FUNCTION_2 ( bool  ,
Module__has_function  ,
XP_Module  module,
std::string  met 
)

Definition at line 55 of file Module.cpp.

RCPP_FUNCTION_2 ( bool  ,
Module__has_class  ,
XP_Module  module,
std::string  cl 
)

Definition at line 58 of file Module.cpp.

RCPP_FUNCTION_2 ( Rcpp::CppClass  ,
Module__get_class  ,
XP_Module  module,
std::string  cl 
)

Definition at line 61 of file Module.cpp.

RCPP_FUNCTION_2 ( bool  ,
CppClass__property_is_readonly  ,
XP_Class  cl,
std::string  p 
)

Definition at line 85 of file Module.cpp.

RCPP_FUNCTION_2 ( std::string  ,
CppClass__property_class  ,
XP_Class  cl,
std::string  p 
)

Definition at line 88 of file Module.cpp.

RCPP_FUNCTION_2 ( SEXP  ,
CppObject__finalize  ,
XP_Class  cl,
SEXP  obj 
)

Definition at line 120 of file Module.cpp.

References R_NilValue.

RCPP_FUNCTION_3 ( SEXP  ,
CppField__get  ,
XP_Class  cl,
SEXP  field_xp,
SEXP  obj 
)

Definition at line 113 of file Module.cpp.

RCPP_FUNCTION_4 ( SEXP  ,
CppField__set  ,
XP_Class  cl,
SEXP  field_xp,
SEXP  obj,
SEXP  value 
)

Definition at line 116 of file Module.cpp.

References R_NilValue.

void setCurrentScope ( Rcpp::Module *  scope)

Definition at line 236 of file Module.cpp.

References Rcpp::current_scope, and scope.

Variable Documentation

SEXP rcpp_dummy_pointer = R_NilValue

Definition at line 155 of file Module.cpp.

Referenced by class__dummyInstance().