![]() |
OpenDAFF C++ API
v1.7
Directional Audio File Format
|
Metadata interface. More...
#include <DAFFMetadata.h>
Public Types | |
enum | { DAFF_BOOL =0, DAFF_INT =1, DAFF_FLOAT =2, DAFF_STRING =3 } |
Metadata types. More... | |
Public Member Functions | |
virtual | ~DAFFMetadata () |
Destructor. More... | |
virtual bool | isEmpty () const =0 |
Returns if metadata does not contain any keys. More... | |
virtual bool | hasKey (const std::string &sKey) const =0 |
Checks for existence of a key. More... | |
virtual void | getKeys (std::vector< std::string > &vsKeyList) const =0 |
Returns a list of all keys. More... | |
virtual int | getKeyType (const std::string &sKey) const =0 |
Returns the datatype of a key. More... | |
virtual std::string | getKeyString (const std::string &sKey) const =0 |
Returns the value of a string key. More... | |
virtual bool | getKeyBool (const std::string &sKey) const =0 |
Returns the value (true|false) of a boolean key. More... | |
virtual int | getKeyInt (const std::string &sKey) const =0 |
Returns the value of a integer number key. More... | |
virtual double | getKeyFloat (const std::string &sKey) const =0 |
Returns the value of a floating-point number key. More... | |
virtual std::string | toString () const =0 |
Return information on the metadata as string. More... | |
Static Public Member Functions | |
static std::string | GetKeyTypeString (int iType) |
Returns a string describing the key type. More... | |
Metadata interface.
This purely abstract class defines the interface for accessing the metadata of DAFF files. The metadata contains an arbitrary number of (key, value) pairs. Keys are indexed by their name (case-insensitive). Values are types. Valid datatypes are boolean, integer, floating-point and string.
Note: The method getKeyString can be used for each key datatype. Other methods cause errors when they are called on keys of wrong datatype. (e.g. getKeyBool for a floating-point key)
Definition at line 31 of file DAFFMetadata.h.
anonymous enum |
Metadata types.
Enumerator | |
---|---|
DAFF_BOOL | |
DAFF_INT | |
DAFF_FLOAT | |
DAFF_STRING |
Definition at line 35 of file DAFFMetadata.h.
|
inlinevirtual |
Destructor.
Definition at line 43 of file DAFFMetadata.h.
|
pure virtual |
Returns the value (true|false) of a boolean key.
Implemented in DAFFMetadataImpl.
|
pure virtual |
Returns the value of a floating-point number key.
Note: This method may also be called for INT keys
Implemented in DAFFMetadataImpl.
|
pure virtual |
Returns the value of a integer number key.
Implemented in DAFFMetadataImpl.
|
pure virtual |
Returns a list of all keys.
Implemented in DAFFMetadataImpl.
|
pure virtual |
Returns the value of a string key.
Note: This method may be called for every key, no matter what type
Implemented in DAFFMetadataImpl.
|
pure virtual |
Returns the datatype of a key.
Implemented in DAFFMetadataImpl.
|
inlinestatic |
Returns a string describing the key type.
Definition at line 46 of file DAFFMetadata.h.
|
pure virtual |
Checks for existence of a key.
Implemented in DAFFMetadataImpl.
|
pure virtual |
Returns if metadata does not contain any keys.
Implemented in DAFFMetadataImpl.
|
pure virtual |
Return information on the metadata as string.
Implemented in DAFFMetadataImpl.