18 #ifndef Rcpp_proxy_AttributeProxy_h
19 #define Rcpp_proxy_AttributeProxy_h
23 template <
typename CLASS>
34 if(
this != &rhs )
set( rhs.
get() ) ;
40 template <
typename T>
operator T()
const;
42 inline operator SEXP()
const;
61 template <
typename T>
operator T()
const;
62 inline operator SEXP()
const;
81 std::vector<std::string> v ;
82 SEXP attrs = ATTRIB(
static_cast<const CLASS&
>(*this).get__());
83 while( attrs != R_NilValue ){
84 v.push_back( std::string(CHAR(PRINTNAME(TAG(attrs)))) ) ;
85 attrs = CDR( attrs ) ;
91 SEXP attrs = ATTRIB(
static_cast<const CLASS&
>(*this).get__());
92 while( attrs != R_NilValue ){
93 if(
attr == CHAR(PRINTNAME(TAG(attrs))) ){
96 attrs = CDR( attrs ) ;
AttributeProxy & operator=(const T &rhs)
AttributeProxy & operator=(const AttributeProxy &rhs)
AttributeProxy(CLASS &v, const std::string &name)
const_AttributeProxy(const CLASS &v, const std::string &name)
AttributeProxy attr(const std::string &name)
bool hasAttribute(const std::string &attr) const
const_AttributeProxy attr(const std::string &name) const
std::vector< std::string > attributeNames() const