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

Public Member Functions | |
| Binding (Environment &env, const std::string &name) | |
| bool | active () const |
| bool | locked () const |
| bool | exists () const |
| void | lock () |
| void | unlock () |
| Binding & | operator= (const Binding &rhs) |
| Binding & | operator= (SEXP rhs) |
| template<typename WRAPPABLE > | |
| Binding & | operator= (const WRAPPABLE &rhs) |
| template<typename T > | |
| operator T () const | |
Private Attributes | |
| Environment & | env |
| std::string | name |
proxy class to allow read and write access to a binding in an environment
Definition at line 42 of file Environment.h.
| Rcpp::Environment::Binding::Binding | ( | Environment & | env, |
| const std::string & | name | ||
| ) |
Creates a binding
| env | environment in which the binding is |
| name | name of the binding |
Definition at line 225 of file Environment.cpp.
| bool Rcpp::Environment::Binding::active | ( | ) | const |
Is the binding an active binding
Definition at line 228 of file Environment.cpp.
| bool Rcpp::Environment::Binding::exists | ( | ) | const |
Is the binding defined
Definition at line 232 of file Environment.cpp.
| void Rcpp::Environment::Binding::lock | ( | ) |
lock the binding
Definition at line 240 of file Environment.cpp.
| bool Rcpp::Environment::Binding::locked | ( | ) | const |
Is the binding locked
Definition at line 236 of file Environment.cpp.
| Rcpp::Environment::Binding::operator T | ( | ) | const [inline] |
Retrieves the value of the binding as a T object
The requirement on the T type is that as<T> makes sense which can either mean that a specialization exists or that T has a T(SEXP) constructor
Definition at line 136 of file Environment.h.
References Rcpp::Environment::get(), and x.

| Environment::Binding & Rcpp::Environment::Binding::operator= | ( | SEXP | rhs | ) |
Assign the rhs to the binding
For example: Environment e= ... ; // get some environment e["foo"] = SclalarInteger( 10 ) ;
after this e will contain the variable "foo" with the value 10L
Definition at line 248 of file Environment.cpp.
References Rcpp::Environment::assign().

| Binding& Rcpp::Environment::Binding::operator= | ( | const WRAPPABLE & | rhs | ) | [inline] |
templated assignement. The rhs if first wrapped using one of the forms of "wrap" and then the wrapped value is assigned to the binding
For example: Environment e = ... ; e[ "foo" ] = 10 ; e[ "bar"] = "foobar" ;
vector<int> v; v.push_back(10); v.push_back(20 ); e[ "foo" ] = v ;
with GCC4.4 : e["bla" ] = { 1,2,3};
Definition at line 122 of file Environment.h.
References Rcpp::Environment::assign().

| Environment::Binding & Rcpp::Environment::Binding::operator= | ( | const Binding & | rhs | ) |
Assigning another binding to this has the effect of assigning the rhs to the environment.
For example : Environment e = ... // get an environment somehow Environment f = ... // get an environment somehow e["x"] = f["y"] ;
after this, the variable x in the environment e will contain the same variable as "y" in the environment "f"
Definition at line 253 of file Environment.cpp.
References Rcpp::Environment::assign(), env, Rcpp::Environment::get(), and name.

| void Rcpp::Environment::Binding::unlock | ( | ) |
unlock the binding
Definition at line 244 of file Environment.cpp.
Environment& Rcpp::Environment::Binding::env [private] |
Reference to the environment if the binding
Definition at line 146 of file Environment.h.
Referenced by operator=().
std::string Rcpp::Environment::Binding::name [private] |