22 #ifndef Rcpp_Module_Field_h
23 #define Rcpp_Module_Field_h
26 template <
typename PROP>
36 void set(Class*
object, SEXP value) {
object->*
ptr = Rcpp::as<PROP>( value ) ; }
47 template <
typename PROP>
57 void set(Class*
object, SEXP value) {
throw std::range_error(
"read only data member") ; }
68 self&
field(
const char* name_, T Class::*ptr,
const char* docstring = 0){
76 self&
field_readonly(
const char* name_, T Class::*ptr,
const char* docstring = 0 ){
self & field_readonly(const char *name_, T Class::*ptr, const char *docstring=0)
self & field(const char *name_, T Class::*ptr, const char *docstring=0)
void set(Class *object, SEXP value)
CppProperty< Class > prop_class
CppProperty_Getter_Setter(pointer ptr_, const char *doc)
CppProperty< Class > prop_class
void set(Class *object, SEXP value)
CppProperty_Getter(pointer ptr_, const char *doc=0)
#define DEMANGLE(__TYPE__)
SEXP wrap(const Date &date)