string Coll::getAttribute( const string &attrname ) const { const char *val; if( !xmmsv_coll_attribute_get_string( coll_, attrname.c_str(), &val ) ) { throw no_such_key_error( "No such attribute: " + attrname ); } return string( val ); }
Dict::Variant Dict::operator[]( const std::string& key ) const { Dict::Variant value; xmmsv_t *elem; if( !xmmsv_dict_get( value_, key.c_str(), &elem ) ) { throw no_such_key_error( "No such key: " + key ); } getValue( value, elem ); return value; }
void Coll::removeAttribute( const string &attrname ) { if( !xmmsv_coll_attribute_remove( coll_, attrname.c_str() ) ) { throw no_such_key_error( "No such attribute: " + attrname ); } }