| 178 | VECTOR& parent ; |
| 179 | std::string name; |
| 180 | void set( SEXP rhs ){ |
| 181 | R_xlen_t index = 0 ; |
| 182 | try{ |
| 183 | index = parent.offset(name) ; |
| 184 | parent[ index ] = rhs ; // #nocov |
| 185 | } catch( const index_out_of_bounds& ex ){ |
| 186 | parent.push_back( rhs, name ); |
| 187 | } |
| 188 | } |
| 189 | SEXP get() const { |
| 190 | return parent[ parent.offset(name) ]; |
| 191 | } |