MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / const_Binding

Class const_Binding

inst/include/Rcpp/proxy/Binding.h:72–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 } ;
71
72 class const_Binding : public GenericProxy<const_Binding> {
73 public:
74 const_Binding( const EnvironmentClass& env_, const std::string& name_) :
75 env(env_), name(name_){}
76
77 inline bool active() const {
78 return env.bindingIsActive(name) ;
79 }
80 inline bool locked() const {
81 return env.bindingIsLocked(name) ;
82 }
83 inline bool exists() const {
84 return env.exists(name) ;
85 }
86 template <typename T> operator T() const;
87
88 private:
89
90 SEXP get() const {
91 return env.get( name ) ;
92 }
93
94 const EnvironmentClass& env ;
95 std::string name ;
96 } ;
97
98 const_Binding operator[]( const std::string& name) const {
99 return const_Binding( static_cast<const EnvironmentClass&>(*this), name ) ;

Callers 1

operator[]Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected