MyGUI 3.4.1
Enumerator

Class for comfortable using of vectors with small while loop instead iterators. Performance is same as with iterators. Enumerator usage

typedef std::vector<std::string> VectorString;
typedef Enumerator<VectorString> EnumeratorVectorString;
vec.push_back("value");
//EnumeratorVectorString enum_vec(vec.begin(), vec.end());
EnumeratorVectorString enum_vec(vec);
while (enum_vec.next())
{
std::string value = enum_vec.current();
}
typedef std::pair<std::string, std::string> PairString;
typedef std::map<PairString> MapString;
map["key"] = "value";
//EnumeratorMapString enum_map(map.begin(), map.end());
EnumeratorMapString enum_map(map);
while (enum_map.next())
{
std::string key = enum_map.current().first;
std::string value = enum_map.current().second;
}
std::map< std::string, std::string > MapString
Definition: MyGUI_Types.h:39
std::pair< std::string, std::string > PairString
Definition: MyGUI_Types.h:41
std::vector< std::string > VectorString
Definition: MyGUI_Types.h:40