#include <TokenMap.h>
Public Types | |
| typedef std::map< std::string, std::string > | map_type |
| typedef map_type::key_type | key_type |
| typedef std::string | data_type |
| typedef map_type::value_type | value_type |
| typedef map_type::iterator | iterator |
| typedef map_type::const_iterator | const_iterator |
| typedef map_type::reverse_iterator | reverse_iterator |
| typedef map_type::const_reverse_iterator | const_reverse_iterator |
| typedef map_type::reference | reference |
| typedef map_type::const_reference | const_reference |
Public Member Functions | |
| TokenMap () | |
| Default constructor Map is initialized with no entries. Values can be added using The set and setUnique member functions. | |
| TokenMap (const std::string &config, char pairSeparator= ';', char assignSeparator= '=', bool unique=false, bool quiet=true) | |
| Explicit constructor Map is initialized from given string, using the delimiter scheme as presented. If the 'unique' bool is 'true', it will use the setUnique function, obeying the 'quiet' bool accordingly. Otherwise it will use the set function. | |
| void | set (const std::string &config, char pairSeparator= ';', char assignSeparator= '=') |
| This function sets the token/value pairs in the map by deserializing them from a doubly-delimited string. | |
| void | setUnique (const std::string &config, char pairSeparator= ';', char assignSeparator= '=', bool quiet=true) |
| This function sets only unique (not already stored) token/value pairs by deserializing them from a doubly-delimited string. | |
| std::string | get (char pairSeparator= ';', char assignSeparator= '=', bool check=false) const |
| This function turns the map back into a doubly-tokenized string. | |
| void | clear () |
| size_t | size () const |
| This function returns the number of pairs. ... | |
| bool | tokenExists (const std::string &token) const |
| This function returns whether the map contains an entry for a particular token. | |
| std::string | value (const std::string &token) const |
| This function returns the string value associated with a particular token, or the empty string "" if the map does not contain this token-value pair. | |
| std::string | operator[] (const std::string &token) const |
| This function is a shorthand for value It will not return a modifiable entry. To modify, setValue must be used. | |
| void | setValue (const std::string &token, const std::string &value) |
| This function sets the value of a token. It will either add a new token-value pair if the map does not already contain this token, or it will overwrite the value for this token if it already exists. You can use the tokenExists function to manage uniqueness guarantees. | |
| iterator | begin () |
| same as std::map begin Returns an iterator corresponding to the beginning of the map or the end of the map if the map is empty. | |
| const_iterator | begin () const |
| same as std::map begin const Returns a const_iterator corresponding to the beginning of the map or the end of the map if the map is empty. | |
| iterator | end () |
| same as std::map end Returns an iterator corresponding to the end of the map. | |
| const_iterator | end () const |
| same as std::map end const Returns an const_iterator corresponding to the end of the map. | |
| reverse_iterator | rbegin () |
| same as std::map rbegin Returns an reverse_iterator corresponding to the reverse_beginning of the map or the reverse_end of the map if the map is empty. | |
| const_reverse_iterator | rbegin () const |
| same as std::map rbegin const Returns a const_reverse_iterator corresponding to the beginning of the map or the end of the map if the map is empty. | |
| reverse_iterator | rend () |
| same as std::map rend Returns an reverse_iterator corresponding to the reverse end of the map. | |
| const_reverse_iterator | rend () const |
| same as std::map rend const Returns an const_reverse_iterator corresponding to the end of the map. | |
| bool | exactMatch (const TokenMap &iOther) const |
Protected Attributes | |
| map_type | m_map |
Definition at line 58 of file TokenMap.h.
| typedef map_type::const_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::const_iterator |
const_iterator promoted from map_type::iterator ...
Definition at line 87 of file TokenMap.h.
| typedef map_type::const_reference Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::const_reference |
const_reference promoted from map_type::const_reference ...
Definition at line 103 of file TokenMap.h.
| typedef map_type::const_reverse_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::const_reverse_iterator |
const_reverse_iterator promoted from map_type::const_reverse_iterator ...
Definition at line 95 of file TokenMap.h.
data_type promoted from map_type::data_type, which is std::string ...
Definition at line 75 of file TokenMap.h.
| typedef map_type::iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::iterator |
iterator promoted from map_type::iterator ...
Definition at line 83 of file TokenMap.h.
| typedef map_type::key_type Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::key_type |
key_type promoted from map_type::key_type, which is std::string ...
Definition at line 70 of file TokenMap.h.
| typedef std::map<std::string,std::string> Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::map_type |
The map_type is std::map<std::string,std::string> ...
Definition at line 66 of file TokenMap.h.
| typedef map_type::reference Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::reference |
reference promoted from map_type::reference ...
Definition at line 99 of file TokenMap.h.
| typedef map_type::reverse_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::reverse_iterator |
reverse_iterator promoted from map_type::reverse_iterator ...
Definition at line 91 of file TokenMap.h.
| typedef map_type::value_type Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::value_type |
value_type promoted from map_type::value_type, which is std::pair<std::string, std::string>
Definition at line 79 of file TokenMap.h.
| Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::TokenMap | ( | ) | [inline] |
Default constructor Map is initialized with no entries. Values can be added using The set and setUnique member functions.
Definition at line 111 of file TokenMap.h.
| Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::TokenMap | ( | const std::string & | config, | |
| char | pairSeparator = ';', |
|||
| char | assignSeparator = '=', |
|||
| bool | unique = false, |
|||
| bool | quiet = true | |||
| ) | [inline, explicit] |
Explicit constructor Map is initialized from given string, using the delimiter scheme as presented. If the 'unique' bool is 'true', it will use the setUnique function, obeying the 'quiet' bool accordingly. Otherwise it will use the set function.
Definition at line 119 of file TokenMap.h.
| const_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::begin | ( | ) | const [inline] |
same as std::map begin const Returns a const_iterator corresponding to the beginning of the map or the end of the map if the map is empty.
Definition at line 255 of file TokenMap.h.
| iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::begin | ( | ) | [inline] |
same as std::map begin Returns an iterator corresponding to the beginning of the map or the end of the map if the map is empty.
Definition at line 250 of file TokenMap.h.
| void Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::clear | ( | ) | [inline] |
Definition at line 191 of file TokenMap.h.
| const_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::end | ( | ) | const [inline] |
same as std::map end const Returns an const_iterator corresponding to the end of the map.
Definition at line 263 of file TokenMap.h.
| iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::end | ( | ) | [inline] |
same as std::map end Returns an iterator corresponding to the end of the map.
Definition at line 259 of file TokenMap.h.
| bool Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::exactMatch | ( | const TokenMap & | iOther | ) | const [inline] |
Return an exact match ...
Definition at line 296 of file TokenMap.h.
| std::string Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::get | ( | char | pairSeparator = ';', |
|
| char | assignSeparator = '=', |
|||
| bool | check = false | |||
| ) | const |
This function turns the map back into a doubly-tokenized string.
The passed delimiters are used to delimit the string, and they have default values. Checking is optionally performed (based on the 'check' bool) to make sure neither the tokens nor values contain the delimiter characters, and an Alembic::Util::Exception is thrown if a conflict is detected.
| std::string Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::operator[] | ( | const std::string & | token | ) | const [inline] |
This function is a shorthand for value It will not return a modifiable entry. To modify, setValue must be used.
Definition at line 227 of file TokenMap.h.
| const_reverse_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::rbegin | ( | ) | const [inline] |
same as std::map rbegin const Returns a const_reverse_iterator corresponding to the beginning of the map or the end of the map if the map is empty.
Definition at line 278 of file TokenMap.h.
| reverse_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::rbegin | ( | ) | [inline] |
same as std::map rbegin Returns an reverse_iterator corresponding to the reverse_beginning of the map or the reverse_end of the map if the map is empty.
Definition at line 273 of file TokenMap.h.
| const_reverse_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::rend | ( | ) | const [inline] |
same as std::map rend const Returns an const_reverse_iterator corresponding to the end of the map.
Definition at line 288 of file TokenMap.h.
| reverse_iterator Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::rend | ( | ) | [inline] |
same as std::map rend Returns an reverse_iterator corresponding to the reverse end of the map.
Definition at line 283 of file TokenMap.h.
| void Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::set | ( | const std::string & | config, | |
| char | pairSeparator = ';', |
|||
| char | assignSeparator = '=' | |||
| ) |
This function sets the token/value pairs in the map by deserializing them from a doubly-delimited string.
Using default copy constructor ... Using default assignment operator. ... The delimiter scheme defaults to: "token=value;token=value;token=value" but may be overridden using the optional separator arguments. Values are added to the map one-by-one, overwriting any values that were there before. To avoid overwriting, use the setUnique function, which can silently or rigidly deal with conflicts
| void Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::setUnique | ( | const std::string & | config, | |
| char | pairSeparator = ';', |
|||
| char | assignSeparator = '=', |
|||
| bool | quiet = true | |||
| ) |
This function sets only unique (not already stored) token/value pairs by deserializing them from a doubly-delimited string.
The delimiter scheme and rules are the same as set , the main difference here is that the class will not overwrite values that already exist. If the function is called with the default value of 'true' for the 'quiet' parameter, it will simply not write those values. Otherwise, it will throw a Alembic::Util::Exception
| void Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::setValue | ( | const std::string & | token, | |
| const std::string & | value | |||
| ) | [inline] |
This function sets the value of a token. It will either add a new token-value pair if the map does not already contain this token, or it will overwrite the value for this token if it already exists. You can use the tokenExists function to manage uniqueness guarantees.
Definition at line 237 of file TokenMap.h.
| size_t Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::size | ( | ) | const [inline] |
| bool Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::tokenExists | ( | const std::string & | token | ) | const [inline] |
This function returns whether the map contains an entry for a particular token.
Definition at line 203 of file TokenMap.h.
| std::string Alembic::Util::ALEMBIC_VERSION_NS::TokenMap::value | ( | const std::string & | token | ) | const [inline] |
This function returns the string value associated with a particular token, or the empty string "" if the map does not contain this token-value pair.
Definition at line 211 of file TokenMap.h.
Definition at line 302 of file TokenMap.h.
1.5.9