14 #ifndef _ENUMERATION_H_
15 #define _ENUMERATION_H_
53 template <
class tval,
class tref = tval>
69 va_start(argumentPtr, valuesCount);
72 for (
unsigned int i = 1; i < valuesCount; i++)
75 valuesList.push_back(va_arg(argumentPtr, tref));
76 valuesSet.insert(valuesList.back());
88 inline unsigned int valuesCount()
const
90 return valuesList.size();
100 inline bool containsValue(tref value)
const
102 return (valuesSet.find(value) != valuesSet.end());
108 inline void startIteration()
110 valuesListIter = valuesList.begin();
124 inline bool hasNextValue()
const
126 return (valuesListIter != valuesList.end());
140 inline tref nextValue()
142 return *valuesListIter++;
148 list<tval> valuesList;
152 typename list<tval>::iterator valuesListIter;