File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed
Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 2424
2525namespace Rcpp {
2626
27- /* *
28- * base class of all exported C++ functions. Template deduction in the
29- * Module_generated_function.h file creates an instance of a class that
30- * derives CppFunction (see Module_generated_CppFunction.h fr all the
31- * definitions
32- */
33- class CppFunction {
34- public:
35- CppFunction (const char * doc = 0 ) : docstring( doc == 0 ? " " : doc) {}
27+ /* *
28+ * base class for a callable function. This limited functionality is
29+ * just barely enough for an InternalFunction, nothing more.
30+ */
31+ class CppFunctionBase {
32+ public:
33+ CppFunctionBase () {}
34+ virtual ~CppFunctionBase (){} ;
3635
3736 /* *
3837 * modules call the function with this interface. input: an array of SEXP
@@ -41,6 +40,18 @@ namespace Rcpp {
4140 virtual SEXP operator ()(SEXP*) {
4241 return R_NilValue ;
4342 }
43+
44+ };
45+
46+ /* *
47+ * base class of all exported C++ functions. Template deduction in the
48+ * Module_generated_function.h file creates an instance of a class that
49+ * derives CppFunction (see Module_generated_CppFunction.h for all the
50+ * definitions
51+ */
52+ class CppFunction : public CppFunctionBase {
53+ public:
54+ CppFunction (const char * doc = 0 ) : docstring( doc == 0 ? " " : doc) {}
4455 virtual ~CppFunction (){} ;
4556
4657 /* *
Original file line number Diff line number Diff line change 2626
2727typedef Rcpp::XPtr<Rcpp::Module> XP_Module ;
2828typedef Rcpp::XPtr<Rcpp::class_Base> XP_Class ;
29- typedef Rcpp::XPtr<Rcpp::CppFunction > XP_Function ;
29+ typedef Rcpp::XPtr<Rcpp::CppFunctionBase > XP_Function ;
3030
3131RCPP_FUN_1 ( bool , Class__has_default_constructor, XP_Class cl ){
3232 return cl->has_default_constructor () ;
You can’t perform that action at this time.
0 commit comments