Exemple #1
0
	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 );
	}
Exemple #2
0
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;

}
Exemple #3
0
	void Coll::removeAttribute( const string &attrname )
	{
		if( !xmmsv_coll_attribute_remove( coll_, attrname.c_str() ) ) {
			throw no_such_key_error( "No such attribute: " + attrname );
		}
	}