Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::sound::filters::FilterState Class Reference

A class that represents the entire serialized state of a SoundFilter instance. More...

#include <omSoundFilterState.h>

Public Member Functions

 FilterState ()
 Create a new sound filter state object with no data stored in it. More...
 
Size getSize () const
 Return the total number of key-value pairs that are stored in this filter state. More...
 
template<typename V , typename K >
V * get (const K &key)
 Get a pointer to the value stored for the specified key string. More...
 
template<typename V , typename K >
const V * get (const K &key) const
 Get a const pointer to the value stored for the specified key string. More...
 
template<typename K , typename V >
Bool set (const K &key, const V &value)
 Set the filter state to have a mapping from the specified key string to a template data value. More...
 
template<typename K >
Bool remove (const K &key)
 Remove the entry with the specified string key and return whether or not anything was removed. More...
 
void clear ()
 Clear all stored data from this filter state, resulting in an empty state object. More...
 
const DataStoregetDataStore () const
 Return a reference to the DataStore object that contains this state's data entries. More...
 
void setDataStore (const DataStore &dataStore)
 Replace this filter state's internal data store with the specified data store, copying all entries. More...
 

Detailed Description

A class that represents the entire serialized state of a SoundFilter instance.

This class is a thin wrapper of a om::data::DataStore object and is used as a dictionary to store common types of filter data (numbers, strings, bytes, and other DataStore objects).

Constructor & Destructor Documentation

om::sound::filters::FilterState::FilterState ( )
inline

Create a new sound filter state object with no data stored in it.

Member Function Documentation

Size om::sound::filters::FilterState::getSize ( ) const
inline

Return the total number of key-value pairs that are stored in this filter state.

template<typename V , typename K >
V* om::sound::filters::FilterState::get ( const K &  key)
inline

Get a pointer to the value stored for the specified key string.

The types of allowed values are: Bool, Int32, UInt32, Int64, UInt64, Float32, Float64, UTF8String, Data, and DataStore. This method is a thin wrapper around the DataStore::get() family of methods. See that class's documentation for more info. The method returns NULL if there is no value for the given key, or if the stored value has an incompatible type with the requested template type.

template<typename V , typename K >
const V* om::sound::filters::FilterState::get ( const K &  key) const
inline

Get a const pointer to the value stored for the specified key string.

The types of allowed values are: Int32, UInt32, Int64, UInt64, Float32, Float64, UTF8String, Data, and DataStore. This method is a thin wrapper around the DataStore::get() family of methods. See that class's documentation for more info. The method returns NULL if there is no value for the given key, or if the stored value has an incompatible type with the requested template type.

template<typename K , typename V >
Bool om::sound::filters::FilterState::set ( const K &  key,
const V &  value 
)
inline

Set the filter state to have a mapping from the specified key string to a template data value.

The types of allowed values are: Int32, UInt32, Int64, UInt64, Float32, Float64, UTF8String, Data, and DataStore. This method is a thin wrapper around the DataStore::set() family of methods. See that class's documentation for more info. The method returns whether or not the operation was successful.

template<typename K >
Bool om::sound::filters::FilterState::remove ( const K &  key)
inline

Remove the entry with the specified string key and return whether or not anything was removed.

void om::sound::filters::FilterState::clear ( )
inline

Clear all stored data from this filter state, resulting in an empty state object.

const DataStore& om::sound::filters::FilterState::getDataStore ( ) const
inline

Return a reference to the DataStore object that contains this state's data entries.

void om::sound::filters::FilterState::setDataStore ( const DataStore dataStore)
inline

Replace this filter state's internal data store with the specified data store, copying all entries.


The documentation for this class was generated from the following file: