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


Classes | |
| class | Binding |
Public Member Functions | |
| const Binding | operator[] (const std::string &name) const |
| Binding | operator[] (const std::string &name) |
| Environment () | |
| Environment (SEXP x) | |
| Environment (const Environment &other) | |
| Environment & | operator= (const Environment &other) |
| Environment (const std::string &name) | |
| Environment (int pos) | |
| ~Environment () | |
| SEXP | ls (bool all) const |
| SEXP | get (const std::string &name) const |
| SEXP | find (const std::string &name) const |
| bool | exists (const std::string &name) const |
| bool | assign (const std::string &name, SEXP x) const |
| template<typename WRAPPABLE > | |
| bool | assign (const std::string &name, const WRAPPABLE &x) const |
| bool | isLocked () const |
| bool | remove (const std::string &name) |
| void | lock (bool bindings) |
| void | lockBinding (const std::string &name) |
| void | unlockBinding (const std::string &name) |
| bool | bindingIsLocked (const std::string &name) const |
| bool | bindingIsActive (const std::string &name) const |
| bool | is_user_database () const |
| Environment | parent () const |
| Environment | new_child (bool hashed) |
Public Member Functions inherited from Rcpp::RObject | |
| RObject () | |
| RObject (SEXP x) | |
| RObject (const RObject &other) | |
| RObject & | operator= (const RObject &other) |
| RObject & | operator= (SEXP other) |
| virtual | ~RObject () |
| operator SEXP () const | |
| bool | inherits (const char *clazz) const |
| std::vector< std::string > | attributeNames () const |
| bool | hasAttribute (const std::string &attr) const |
| AttributeProxy | attr (const std::string &name) const |
| bool | isNULL () const |
| int | sexp_type () const |
| SEXP | asSexp () const |
| bool | isObject () const |
| bool | isS4 () const |
| bool | hasSlot (const std::string &name) const |
| SlotProxy | slot (const std::string &name) const |
Static Public Member Functions | |
| static Environment | global_env () |
| static Environment | empty_env () |
| static Environment | base_env () |
| static Environment | base_namespace () |
| static Environment | Rcpp_namespace () |
| static Environment | namespace_env (const std::string &) |
Friends | |
| class | Binding |
Additional Inherited Members | |
Protected Member Functions inherited from Rcpp::RObject | |
| void | setSEXP (SEXP x) |
Protected Attributes inherited from Rcpp::RObject | |
| SEXP | m_sexp |
Definition at line 29 of file Environment.h.
| Rcpp::Environment::Environment | ( | ) |
Definition at line 926 of file api.cpp.
Referenced by base_env(), base_namespace(), empty_env(), global_env(), namespace_env(), new_child(), and parent().
| Rcpp::Environment::Environment | ( | SEXP | x | ) |
wraps the given environment
if the SEXP is not an environment, and exception is thrown
Definition at line 928 of file api.cpp.
References Rcpp::Evaluator::run(), and Rcpp::RObject::setSEXP().

| Rcpp::Environment::Environment | ( | const Environment & | other | ) |
| Rcpp::Environment::Environment | ( | const std::string & | name | ) |
Gets the environment associated with the given name
| name | name of the environment, e.g "package:Rcpp" |
Definition at line 942 of file api.cpp.
References R_NilValue, Rcpp::Evaluator::run(), and Rcpp::RObject::setSEXP().

| Rcpp::Environment::Environment | ( | int | pos | ) |
Gets the environment in the given position of the search path
| pos | (1-based) position of the environment, e.g pos=1 gives the global environment |
Definition at line 960 of file api.cpp.
References Rcpp::Evaluator::run(), and Rcpp::RObject::setSEXP().

| Rcpp::Environment::~Environment | ( | ) |
| bool Rcpp::Environment::assign | ( | const std::string & | name, |
| SEXP | x = R_NilValue |
||
| ) | const |
Attempts to assign x to name in this environment
| name | name of the object to assign |
| x | object to assign |
| binding_is_locked | if the binding is locked |
Definition at line 1026 of file api.cpp.
References bindingIsLocked(), exists(), Rcpp::RObject::m_sexp, and x.
Referenced by assign(), and Rcpp::Environment::Binding::operator=().

| bool Rcpp::Environment::assign | ( | const std::string & | name, |
| const WRAPPABLE & | x | ||
| ) | const |
wrap and assign. If there is a wrap method taking an object of WRAPPABLE type, then it is wrapped and the corresponding SEXP is assigned in the environment
| name | name of the object to assign |
| x | wrappable object. anything that has a wrap( WRAPPABLE ) is fine |
Definition at line 28 of file Environment.h.
References assign(), and Rcpp::wrap().

|
static |
Definition at line 1099 of file api.cpp.
References Environment().
Referenced by Rcpp::attributes::SourceFileAttributesParser::attributeWarning(), Rcpp::attributes::createDirectory(), Rcpp::GetCppCallable(), Rcpp::attributes::removeFile(), and Rcpp::attributes::showWarning().

|
static |
Definition at line 1103 of file api.cpp.
References Environment().

| bool Rcpp::Environment::bindingIsActive | ( | const std::string & | name | ) | const |
| name | name of a binding |
| no_such_binding | if there is no such binding in this environment |
Definition at line 1057 of file api.cpp.
References exists(), and Rcpp::RObject::m_sexp.

| bool Rcpp::Environment::bindingIsLocked | ( | const std::string & | name | ) | const |
| name | name of a potential binding |
| no_such_binding | if there is no such binding in this environment |
Definition at line 1063 of file api.cpp.
References exists(), and Rcpp::RObject::m_sexp.
Referenced by assign(), and remove().

|
static |
Definition at line 1095 of file api.cpp.
References Environment().

| bool Rcpp::Environment::exists | ( | const std::string & | name | ) | const |
Indicates if an object called name exists in the environment
| name | name of the object |
Definition at line 1020 of file api.cpp.
References Rcpp::RObject::m_sexp.
Referenced by assign(), bindingIsActive(), bindingIsLocked(), lockBinding(), remove(), and unlockBinding().
| SEXP Rcpp::Environment::find | ( | const std::string & | name | ) | const |
Get an object from the environment or one of its parents
| name | name of the object |
Definition at line 1007 of file api.cpp.
References Rcpp::RObject::m_sexp.
| SEXP Rcpp::Environment::get | ( | const std::string & | name | ) | const |
Get an object from the environment
| name | name of the object |
Definition at line 994 of file api.cpp.
References Rcpp::RObject::m_sexp, and R_NilValue.
Referenced by Rcpp::internal::as_module_object_internal(), and Rcpp::Environment::Binding::operator=().
|
static |
Definition at line 1091 of file api.cpp.
References Environment().

| bool Rcpp::Environment::is_user_database | ( | ) | const |
Indicates if this is a user defined database.
Definition at line 1085 of file api.cpp.
References Rcpp::RObject::m_sexp.
Referenced by ls().
| bool Rcpp::Environment::isLocked | ( | ) | const |
Definition at line 1053 of file api.cpp.
References Rcpp::RObject::m_sexp.
| void Rcpp::Environment::lock | ( | bool | bindings = false | ) |
locks this environment. See ?lockEnvironment
| bindings | also lock the bindings of this environment ? |
Definition at line 1069 of file api.cpp.
References Rcpp::RObject::m_sexp.
| void Rcpp::Environment::lockBinding | ( | const std::string & | name | ) |
Locks the given binding in the environment. see ?bindingIsLocked
| no_such_binding | if there is no such binding in this environment |
Definition at line 1073 of file api.cpp.
References exists(), and Rcpp::RObject::m_sexp.

| SEXP Rcpp::Environment::ls | ( | bool | all = true | ) | const |
The list of objects in the environment
the same as calling this from R:
ls( envir = this, all = all )
| all | same meaning as in ?ls |
Definition at line 982 of file api.cpp.
References Rcpp::all(), is_user_database(), Rcpp::RObject::m_sexp, and R_NilValue.

|
static |
| name | the name of the package of which we want the namespace |
| no_such_namespace |
Definition at line 1107 of file api.cpp.
References Environment(), R_NilValue, and Rcpp::Evaluator::run().

| Environment Rcpp::Environment::new_child | ( | bool | hashed | ) |
creates a new environment whose this is the parent
Definition at line 1168 of file api.cpp.
References Environment(), Rcpp::RObject::m_sexp, and Rcpp::Evaluator::run().

| Environment & Rcpp::Environment::operator= | ( | const Environment & | other | ) |
assignment
Definition at line 973 of file api.cpp.
References Rcpp::RObject::asSexp(), and Rcpp::RObject::setSEXP().

| const Environment::Binding Rcpp::Environment::operator[] | ( | const std::string & | name | ) | const |
| Environment::Binding Rcpp::Environment::operator[] | ( | const std::string & | name | ) |
Same as above, but for a non-const Environment
Definition at line 1160 of file api.cpp.
References Binding.
| Environment Rcpp::Environment::parent | ( | ) | const |
The parent environment of this environment
Definition at line 1119 of file api.cpp.
References Environment(), and Rcpp::RObject::m_sexp.

|
static |
Definition at line 1164 of file api.cpp.
References Rcpp::internal::get_Rcpp_namespace().
Referenced by Rcpp::internal::make_new_object(), Rcpp::Evaluator::run(), and Rcpp::InternalFunction::set().

| bool Rcpp::Environment::remove | ( | const std::string & | name | ) |
remove an object from this environment
Definition at line 1033 of file api.cpp.
References bindingIsLocked(), exists(), Rcpp::RObject::m_sexp, and PROTECT().

| void Rcpp::Environment::unlockBinding | ( | const std::string & | name | ) |
unlocks the given binding see ?bindingIsLocked
| no_such_binding | if there is no such binding in this environment |
Definition at line 1079 of file api.cpp.
References exists(), and Rcpp::RObject::m_sexp.

|
friend |
Definition at line 154 of file Environment.h.
Referenced by operator[]().