Rcpp Version 0.9.10
Rcpp::Reference::FieldProxy Class Reference

#include <Reference.h>

Collaboration diagram for Rcpp::Reference::FieldProxy:

List of all members.

Public Member Functions

 FieldProxy (const Reference &v, const std::string &name)
FieldProxyoperator= (const FieldProxy &rhs)
template<typename T >
FieldProxyoperator= (const T &rhs)
template<typename T >
 operator T () const

Private Member Functions

SEXP get () const
void set (SEXP x) const

Private Attributes

const Referenceparent
std::string field_name

Detailed Description

Proxy for objects slots.

Definition at line 69 of file Reference.h.


Constructor & Destructor Documentation

Rcpp::Reference::FieldProxy::FieldProxy ( const Reference v,
const std::string &  name 
)

Creates a field proxy.

Parameters:
vparent object of which we get/set a field
namefield name

Definition at line 72 of file Reference.cpp.


Member Function Documentation

SEXP Rcpp::Reference::FieldProxy::get ( ) const [private]

Definition at line 81 of file Reference.cpp.

References Rcpp::RObject::asSexp(), PROTECT(), and Rcpp::internal::try_catch().

Referenced by operator=().

Here is the call graph for this function:

template<typename T >
Rcpp::Reference::FieldProxy::operator T ( ) const [inline]

rhs use. Retrieves the current value of the slot and structures it as a T object. This only works when as<T> makes sense

Definition at line 102 of file Reference.h.

template<typename T >
FieldProxy& Rcpp::Reference::FieldProxy::operator= ( const T &  rhs) [inline]

lhs use. Assigns the slot by wrapping the rhs object

Parameters:
rhswrappable object

Definition at line 92 of file Reference.h.

References Rcpp::wrap().

Here is the call graph for this function:

Reference::FieldProxy & Rcpp::Reference::FieldProxy::operator= ( const FieldProxy rhs)

lhs use. Assigns the target slot using the current value of another slot proxy.

Parameters:
rhsanother slot proxy

Definition at line 75 of file Reference.cpp.

References get().

Here is the call graph for this function:

void Rcpp::Reference::FieldProxy::set ( SEXP  x) const [private]

Definition at line 93 of file Reference.cpp.

References Rcpp::RObject::asSexp(), PROTECT(), and Rcpp::RObject::setSEXP().

Here is the call graph for this function:


Member Data Documentation

Definition at line 108 of file Reference.h.

Definition at line 107 of file Reference.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines