|
Rcpp Version 0.9.10
|
#include <RObject.h>

Public Member Functions | |
| AttributeProxy (const RObject &v, const std::string &attr_name) | |
| AttributeProxy & | operator= (const AttributeProxy &rhs) |
| template<typename T > | |
| AttributeProxy & | operator= (const T &rhs) |
| template<typename T > | |
| operator T () const | |
Private Member Functions | |
| SEXP | get () const |
| void | set (SEXP x) const |
Private Attributes | |
| const RObject & | parent |
| std::string | attr_name |
Proxy for an object's attribute. Instances of this class are created by the attr member function of RObject.
When the proxy is used on the lhs of an assignment it forwards the object it is assigned to to the attribute, outsourcing to wrap the job of creating the SEXP from the input type
When the proxy is used on the rhs of the assignment, it retrieves the current value of the attribute and outsources to as the job of making an object of the appropriate type
| Rcpp::RObject::AttributeProxy::AttributeProxy | ( | const RObject & | v, |
| const std::string & | attr_name | ||
| ) |
| v | object of which we manipulate the attributes |
| attr_name | name of the attribute the proxy manipulates |
Definition at line 173 of file RObject.cpp.
| SEXP Rcpp::RObject::AttributeProxy::get | ( | ) | const [private] |
Definition at line 157 of file RObject.cpp.
Referenced by operator=().
| Rcpp::RObject::AttributeProxy::operator T | ( | ) | const [inline] |
| AttributeProxy& Rcpp::RObject::AttributeProxy::operator= | ( | const T & | rhs | ) | [inline] |
lhs use. assigns the target attribute by wrapping the rhs object
| rhs | wrappable object |
Definition at line 140 of file RObject.h.
References Rcpp::wrap().

| RObject::AttributeProxy & Rcpp::RObject::AttributeProxy::operator= | ( | const AttributeProxy & | rhs | ) |
lhs use. This assigns the target attribute by using the current attribute referred by another proxy
Definition at line 176 of file RObject.cpp.
References get().

| void Rcpp::RObject::AttributeProxy::set | ( | SEXP | x | ) | const [private] |
Definition at line 162 of file RObject.cpp.
References RCPP_DEBUG_1.
std::string Rcpp::RObject::AttributeProxy::attr_name [private] |
const RObject& Rcpp::RObject::AttributeProxy::parent [private] |