#include <NaviData.h>
Public Member Functions | |
| NaviData (const std::string &name, const std::string &queryString="") | |
| bool | ensure (const std::string &key, bool throwOnFailure=true) const |
| bool | ensure (const std::vector< std::string > &keys, bool throwOnFailure=true) const |
| std::string | getName () const |
| bool | exists (const std::string &keyName) const |
| const NaviUtilities::MultiValue & | operator[] (const std::string &keyName) const |
| NaviUtilities::MultiValue & | operator[] (const std::string &keyName) |
| int | size () const |
| std::map < std::string, std::string > | toStringMap (bool encodeVals) const |
| std::string | toQueryString () const |
| NaviData::NaviData | ( | const std::string & | name, | |
| const std::string & | queryString = "" | |||
| ) |
| bool NaviData::ensure | ( | const std::string & | key, | |
| bool | throwOnFailure = true | |||
| ) | const |
Validates whether or not this NaviData contains a certain key.
| key | The name of the key to look for. |
| throwOnFailure | Whether or not to throw a Ogre::Exception::ERR_RT_ASSERTION_FAILED on failed validation. |
| bool NaviData::ensure | ( | const std::vector< std::string > & | keys, | |
| bool | throwOnFailure = true | |||
| ) | const |
Validates whether or not this NaviData contains a series of keys.
| keys | A string vector containing the names of the keys to look for. |
It is extremely useful to use NaviUtilities::Strings with this function.
This check can be invoked alternately via the last parameter of NaviManager::bind
| throwOnFailure | Whether or not to throw a Ogre::Exception::ERR_RT_ASSERTION_FAILED on failed validation. |
| std::string NaviData::getName | ( | ) | const |
Returns the name of this NaviData.
| bool NaviData::exists | ( | const std::string & | keyName | ) | const |
Returns whether or not 'keyName' exists within the NaviData.
| const MultiValue & NaviData::operator[] | ( | const std::string & | keyName | ) | const |
This subscript operator works just like the subscript operator of a map. Returns a reference to a MultiValue object.
// Assignment: myNaviData["newKey"] = "Hello, new value."; // Value retrieval: std::string myMessage = myNaviData["newKey"].str(); // myMessage holds "Hello, new value."
| MultiValue & NaviData::operator[] | ( | const std::string & | keyName | ) |
This subscript operator works just like the subscript operator of a map. Returns a reference to a MultiValue object.
// Assignment: myNaviData["newKey"] = "Hello, new value."; // Value retrieval: std::string myMessage = myNaviData["newKey"].str(); // myMessage holds "Hello, new value."
| int NaviData::size | ( | ) | const |
Returns the number of data pairs in this NaviData.
| std::map< std::string, std::string > NaviData::toStringMap | ( | bool | encodeVals | ) | const |
| std::string NaviData::toQueryString | ( | ) | const |
1.5.3