Eidolon
Public Member Functions | Protected Types | Protected Attributes | List of all members
MetaType Class Reference

This base type provides facilities for maintaining name-value metadata pairs. More...

#include <RenderTypes.h>

Inheritance diagram for MetaType:
Inheritance graph
Collaboration diagram for MetaType:
Collaboration graph

Public Member Functions

bool hasMetaKey (const char *key) const
 Returns true if a key-value pair with the given key is present. More...
 
std::vector< std::string > getMetaKeys () const
 
std::string meta () const
 
const char * meta (const char *key) const
 Returns the value associated with the given key or the empty string if none is stored. More...
 
void meta (const char *key, const char *val)
 Add the given key-value pair to the metadata, or overwrite an existing if present. Does nothing if either argument is NULL. More...
 
void meta (const MetaType *m)
 Copy all the metadata from `m' to `this'. More...
 
std::string serializeMeta () const
 Turn all metadata name-value pairs into one string suitable for pickling. More...
 
void deserializeMeta (const std::string &s)
 Break a string generated by the above back into name-value pairs and store in `this'. More...
 

Protected Types

typedef std::map< std::string, std::string > metamap
 
typedef metamap::iterator iter
 
typedef metamap::const_iterator citer
 

Protected Attributes

metamap _meta
 

Detailed Description

This base type provides facilities for maintaining name-value metadata pairs.

Member Typedef Documentation

◆ citer

typedef metamap::const_iterator citer
protected

◆ iter

typedef metamap::iterator iter
protected

◆ metamap

typedef std::map<std::string,std::string> metamap
protected

Member Function Documentation

◆ deserializeMeta()

void deserializeMeta ( const std::string &  s)
inline

Break a string generated by the above back into name-value pairs and store in `this'.

◆ getMetaKeys()

std::vector<std::string> getMetaKeys ( ) const
inline

◆ hasMetaKey()

bool hasMetaKey ( const char *  key) const
inline

Returns true if a key-value pair with the given key is present.

◆ meta() [1/4]

std::string meta ( ) const
inline
Here is the caller graph for this function:

◆ meta() [2/4]

const char* meta ( const char *  key) const
inline

Returns the value associated with the given key or the empty string if none is stored.

◆ meta() [3/4]

void meta ( const char *  key,
const char *  val 
)
inline

Add the given key-value pair to the metadata, or overwrite an existing if present. Does nothing if either argument is NULL.

◆ meta() [4/4]

void meta ( const MetaType m)
inline

Copy all the metadata from `m' to `this'.

◆ serializeMeta()

std::string serializeMeta ( ) const
inline

Turn all metadata name-value pairs into one string suitable for pickling.

Member Data Documentation

◆ _meta

metamap _meta
protected

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