OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::util::AnyMap Class Reference

A data structure storing "any" by name, to reduce coupling. More...

#include <osvr/Util/AnyMap.h>

Public Member Functions

bool contains (std::string const &key) const
 Do we have data under this key?
 
bool contains (const char *key) const
 
boost::any get (std::string const &key) const
 Get the data for this key. More...
 
boost::any get (const char *key) const
 
void erase (std::string const &key)
 Clears the data for this key. More...
 
void erase (const char *key)
 
void set (std::string const &key, boost::any const &value)
 Set data for the given key. More...
 

Detailed Description

A data structure storing "any" by name, to reduce coupling.

Definition at line 42 of file AnyMap.h.

Member Function Documentation

bool osvr::util::AnyMap::contains ( const char *  key) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void osvr::util::AnyMap::set ( std::string const &  key,
boost::any const &  value 
)

Set data for the given key.

Silently overwrites existing data at that key.

boost::any osvr::util::AnyMap::get ( std::string const &  key) const

Get the data for this key.

Returns an empty boost::any if the key doesn't exist.

boost::any osvr::util::AnyMap::get ( const char *  key) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void osvr::util::AnyMap::erase ( std::string const &  key)

Clears the data for this key.

If the key doesn't exist, this method does nothing

void osvr::util::AnyMap::erase ( const char *  key)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


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