Rcpp Version 0.12.12
class_< Class > Class Template Reference

#include <class.h>

Inheritance diagram for class_< Class >:
Collaboration diagram for class_< Class >:

Public Types

typedef class_< Class > self
 
typedef CppMethod< Class > method_class
 
typedef SignedMethod< Class > signed_method_class
 
typedef std::vector< signed_method_class * > vec_signed_method
 
typedef std::map< std::string, vec_signed_method * > map_vec_signed_method
 
typedef std::pair< std::string, vec_signed_method * > vec_signed_method_pair
 
typedef std::map< std::string, method_class * > METHOD_MAP
 
typedef std::pair< const std::string, method_class * > PAIR
 
typedef Rcpp::XPtr< Class > XP
 
typedef CppFinalizer< Class > finalizer_class
 
typedef Constructor_Base< Class > constructor_class
 
typedef SignedConstructor< Class > signed_constructor_class
 
typedef std::vector< signed_constructor_class * > vec_signed_constructor
 
typedef Factory_Base< Class > factory_class
 
typedef SignedFactory< Class > signed_factory_class
 
typedef std::vector< signed_factory_class * > vec_signed_factory
 
typedef CppProperty< Class > prop_class
 
typedef std::map< std::string, prop_class * > PROPERTY_MAP
 
typedef std::pair< const std::string, prop_class * > PROP_PAIR
 

Public Member Functions

 class_ (const char *name_, const char *doc=0)
 
 ~class_ ()
 
selfAddConstructor (constructor_class *ctor, ValidConstructor valid, const char *docstring=0)
 
selfAddFactory (factory_class *fact, ValidConstructor valid, const char *docstring=0)
 
selfdefault_constructor (const char *docstring=0, ValidConstructor valid=&yes_arity< 0 >)
 
std::string get_typeinfo_name ()
 
SEXP newInstance (SEXP *args, int nargs)
 
bool has_default_constructor ()
 
SEXP invoke (SEXP method_xp, SEXP object, SEXP *args, int nargs)
 
SEXP invoke_void (SEXP method_xp, SEXP object, SEXP *args, int nargs)
 
SEXP invoke_notvoid (SEXP method_xp, SEXP object, SEXP *args, int nargs)
 
selfAddMethod (const char *name_, method_class *m, ValidMethod valid=&yes, const char *docstring=0)
 
selfAddProperty (const char *name_, prop_class *p)
 
bool has_method (const std::string &m)
 
bool has_property (const std::string &m)
 
bool property_is_readonly (const std::string &p)
 
std::string property_class (const std::string &p)
 
Rcpp::CharacterVector method_names ()
 
Rcpp::IntegerVector methods_arity ()
 
Rcpp::LogicalVector methods_voidness ()
 
Rcpp::CharacterVector property_names ()
 
Rcpp::List property_classes ()
 
Rcpp::CharacterVector complete ()
 
SEXP getProperty (SEXP field_xp, SEXP object)
 
void setProperty (SEXP field_xp, SEXP object, SEXP value)
 
Rcpp::List fields (const XP_Class &class_xp)
 
Rcpp::List getMethods (const XP_Class &class_xp, std::string &buffer)
 
Rcpp::List getConstructors (const XP_Class &class_xp, std::string &buffer)
 
selffinalizer (void(*f)(Class *))
 
virtual void run_finalizer (SEXP object)
 
void SetFinalizer (finalizer_class *f)
 
 class_ ()
 
template<typename PARENT >
selfderives (const char *parent)
 

Public Attributes

map_vec_signed_method vec_methods
 
PROPERTY_MAP properties
 
finalizer_classfinalizer_pointer
 
int specials
 
vec_signed_constructor constructors
 
vec_signed_factory factories
 
selfclass_pointer
 
std::string typeinfo_name
 

Private Member Functions

selfget_instance ()
 

Detailed Description

template<typename Class>
class class_< Class >

Definition at line 26 of file class.h.

Member Typedef Documentation

template<typename Class >
typedef Constructor_Base<Class> class_< Class >::constructor_class

Definition at line 42 of file class.h.

template<typename Class >
typedef Factory_Base<Class> class_< Class >::factory_class

Definition at line 46 of file class.h.

template<typename Class >
typedef CppFinalizer<Class> class_< Class >::finalizer_class

Definition at line 40 of file class.h.

template<typename Class >
typedef std::map<std::string,vec_signed_method*> class_< Class >::map_vec_signed_method

Definition at line 33 of file class.h.

template<typename Class >
typedef CppMethod<Class> class_< Class >::method_class

Definition at line 29 of file class.h.

template<typename Class >
typedef std::map<std::string,method_class*> class_< Class >::METHOD_MAP

Definition at line 36 of file class.h.

template<typename Class >
typedef std::pair<const std::string,method_class*> class_< Class >::PAIR

Definition at line 37 of file class.h.

template<typename Class >
typedef CppProperty<Class> class_< Class >::prop_class

Definition at line 50 of file class.h.

template<typename Class >
typedef std::pair<const std::string,prop_class*> class_< Class >::PROP_PAIR

Definition at line 52 of file class.h.

template<typename Class >
typedef std::map<std::string,prop_class*> class_< Class >::PROPERTY_MAP

Definition at line 51 of file class.h.

template<typename Class >
typedef class_<Class> class_< Class >::self

Definition at line 28 of file class.h.

template<typename Class >
typedef SignedConstructor<Class> class_< Class >::signed_constructor_class

Definition at line 43 of file class.h.

template<typename Class >
typedef SignedFactory<Class> class_< Class >::signed_factory_class

Definition at line 47 of file class.h.

template<typename Class >
typedef SignedMethod<Class> class_< Class >::signed_method_class

Definition at line 31 of file class.h.

template<typename Class >
typedef std::vector<signed_constructor_class*> class_< Class >::vec_signed_constructor

Definition at line 44 of file class.h.

template<typename Class >
typedef std::vector<signed_factory_class*> class_< Class >::vec_signed_factory

Definition at line 48 of file class.h.

template<typename Class >
typedef std::vector<signed_method_class*> class_< Class >::vec_signed_method

Definition at line 32 of file class.h.

template<typename Class >
typedef std::pair<std::string,vec_signed_method*> class_< Class >::vec_signed_method_pair

Definition at line 34 of file class.h.

template<typename Class >
typedef Rcpp::XPtr<Class> class_< Class >::XP

Definition at line 39 of file class.h.

Constructor & Destructor Documentation

template<typename Class >
class_< Class >::class_ ( const char *  name_,
const char *  doc = 0 
)
inline

Definition at line 54 of file class.h.

References class_< Class >::class_pointer, and class_< Class >::get_instance().

Here is the call graph for this function:

template<typename Class >
class_< Class >::~class_ ( )
inline

Definition at line 98 of file class.h.

template<typename Class >
class_< Class >::class_ ( )
inline

Definition at line 481 of file class.h.

Member Function Documentation

template<typename Class >
self& class_< Class >::AddConstructor ( constructor_class ctor,
ValidConstructor  valid,
const char *  docstring = 0 
)
inline

Definition at line 100 of file class.h.

References class_< Class >::class_pointer, and class_< Class >::constructors.

template<typename Class >
self& class_< Class >::AddFactory ( factory_class fact,
ValidConstructor  valid,
const char *  docstring = 0 
)
inline

Definition at line 105 of file class.h.

References class_< Class >::class_pointer, and class_< Class >::factories.

template<typename Class >
self& class_< Class >::AddMethod ( const char *  name_,
method_class m,
ValidMethod  valid = &yes,
const char *  docstring = 0 
)
inline

Definition at line 239 of file class.h.

References class_< Class >::get_instance(), Rcpp::push_back(), and RCPP_DEBUG_MODULE_1.

Referenced by class_< Class >::derives().

Here is the call graph for this function:

template<typename Class >
self& class_< Class >::AddProperty ( const char *  name_,
prop_class p 
)
inline

Definition at line 251 of file class.h.

References class_< Class >::get_instance(), and class_< Class >::properties.

Referenced by class_< Class >::derives().

Here is the call graph for this function:

template<typename Class >
Rcpp::CharacterVector class_< Class >::complete ( )
inline
template<typename Class >
self& class_< Class >::default_constructor ( const char *  docstring = 0,
ValidConstructor  valid = &yes_arity<0> 
)
inline

Definition at line 110 of file class.h.

template<typename Class >
template<typename PARENT >
self& class_< Class >::derives ( const char *  parent)
inline
template<typename Class >
Rcpp::List class_< Class >::fields ( const XP_Class class_xp)
inline

Definition at line 409 of file class.h.

References Rcpp::NamesProxyPolicy< CLASS >::names(), and class_< Class >::properties.

Here is the call graph for this function:

template<typename Class >
self& class_< Class >::finalizer ( void(*)(Class *)  f)
inline

Definition at line 455 of file class.h.

References class_< Class >::SetFinalizer().

Here is the call graph for this function:

template<typename Class >
self* class_< Class >::get_instance ( )
inlineprivate
template<typename Class >
std::string class_< Class >::get_typeinfo_name ( )
inline

Definition at line 119 of file class.h.

References class_< Class >::typeinfo_name.

template<typename Class >
Rcpp::List class_< Class >::getConstructors ( const XP_Class class_xp,
std::string &  buffer 
)
inline

Definition at line 441 of file class.h.

References class_< Class >::constructors.

template<typename Class >
Rcpp::List class_< Class >::getMethods ( const XP_Class class_xp,
std::string &  buffer 
)
inline

Definition at line 422 of file class.h.

References Rcpp::NamesProxyPolicy< CLASS >::names(), RCPP_DEBUG_MODULE, and class_< Class >::vec_methods.

Here is the call graph for this function:

template<typename Class >
SEXP class_< Class >::getProperty ( SEXP  field_xp,
SEXP  object 
)
inline

Definition at line 394 of file class.h.

References BEGIN_RCPP, and END_RCPP.

template<typename Class >
bool class_< Class >::has_default_constructor ( )
inline

Definition at line 151 of file class.h.

References class_< Class >::constructors, and class_< Class >::factories.

template<typename Class >
bool class_< Class >::has_method ( const std::string &  m)
inline

Definition at line 259 of file class.h.

References class_< Class >::vec_methods.

template<typename Class >
bool class_< Class >::has_property ( const std::string &  m)
inline

Definition at line 262 of file class.h.

References class_< Class >::properties.

template<typename Class >
SEXP class_< Class >::invoke ( SEXP  method_xp,
SEXP  object,
SEXP *  args,
int  nargs 
)
inline

Definition at line 167 of file class.h.

References BEGIN_RCPP, Rcpp::Vector< RTYPE, StoragePolicy >::create(), and END_RCPP.

Here is the call graph for this function:

template<typename Class >
SEXP class_< Class >::invoke_notvoid ( SEXP  method_xp,
SEXP  object,
SEXP *  args,
int  nargs 
)
inline

Definition at line 216 of file class.h.

References BEGIN_RCPP, and END_RCPP.

template<typename Class >
SEXP class_< Class >::invoke_void ( SEXP  method_xp,
SEXP  object,
SEXP *  args,
int  nargs 
)
inline

Definition at line 194 of file class.h.

References BEGIN_RCPP, and END_RCPP.

template<typename Class >
Rcpp::CharacterVector class_< Class >::method_names ( )
inline

Definition at line 276 of file class.h.

References class_< Class >::vec_methods.

template<typename Class >
Rcpp::IntegerVector class_< Class >::methods_arity ( )
inline

Definition at line 296 of file class.h.

References Rcpp::NamesProxyPolicy< CLASS >::names(), and class_< Class >::vec_methods.

Here is the call graph for this function:

template<typename Class >
Rcpp::LogicalVector class_< Class >::methods_voidness ( )
inline

Definition at line 320 of file class.h.

References Rcpp::NamesProxyPolicy< CLASS >::names(), and class_< Class >::vec_methods.

Here is the call graph for this function:

template<typename Class >
SEXP class_< Class >::newInstance ( SEXP *  args,
int  nargs 
)
inline
template<typename Class >
std::string class_< Class >::property_class ( const std::string &  p)
inline

Definition at line 270 of file class.h.

References class_< Class >::properties.

template<typename Class >
Rcpp::List class_< Class >::property_classes ( )
inline

Definition at line 355 of file class.h.

References Rcpp::NamesProxyPolicy< CLASS >::names(), and class_< Class >::properties.

Here is the call graph for this function:

template<typename Class >
bool class_< Class >::property_is_readonly ( const std::string &  p)
inline

Definition at line 265 of file class.h.

References class_< Class >::properties.

template<typename Class >
Rcpp::CharacterVector class_< Class >::property_names ( )
inline

Definition at line 345 of file class.h.

References class_< Class >::properties.

template<typename Class >
virtual void class_< Class >::run_finalizer ( SEXP  object)
inlinevirtual

Definition at line 460 of file class.h.

References class_< Class >::finalizer_pointer.

template<typename Class >
void class_< Class >::SetFinalizer ( finalizer_class f)
inline

Definition at line 464 of file class.h.

References class_< Class >::get_instance().

Referenced by class_< Class >::finalizer().

Here is the call graph for this function:

template<typename Class >
void class_< Class >::setProperty ( SEXP  field_xp,
SEXP  object,
SEXP  value 
)
inline

Definition at line 401 of file class.h.

References BEGIN_RCPP, and VOID_END_RCPP.

Member Data Documentation

template<typename Class >
self* class_< Class >::class_pointer
template<typename Class >
vec_signed_factory class_< Class >::factories
template<typename Class >
finalizer_class* class_< Class >::finalizer_pointer

Definition at line 473 of file class.h.

Referenced by class_< Class >::get_instance(), and class_< Class >::run_finalizer().

template<typename Class >
int class_< Class >::specials

Definition at line 474 of file class.h.

Referenced by class_< Class >::complete().

template<typename Class >
std::string class_< Class >::typeinfo_name

Definition at line 478 of file class.h.

Referenced by class_< Class >::get_instance(), and class_< Class >::get_typeinfo_name().


The documentation for this class was generated from the following file: