aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Enum.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Enum.h')
-rw-r--r--lib/Enum.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Enum.h b/lib/Enum.h
index 6ecd3ab..a34b5d3 100644
--- a/lib/Enum.h
+++ b/lib/Enum.h
@@ -140,7 +140,7 @@ protected:
*/
template<typename E>
class Enum : private EnumBase {
-private:
+public:
struct sdata {
/**
* The constructor of the static data part.
@@ -259,7 +259,8 @@ public:
* XXX: throw OutOfRangeException ?
*/
static E getValueFor(const std::string &s) {
- return (E) staticData.stringRep.lookup(s.getCStr());
+// return (E) staticData.stringRep.lookup(s.getCStr());
+ return (E) staticData.stringRep.lookup(s.c_str());
}
};
@@ -297,12 +298,12 @@ public:
*
* @author Henner Zeller
*/
+/**
+ * The definition of the static variable holding the static
+ * data for this Enumeration wrapper.
+ */
#define ENUM_DEFINITION(EnumName, initWith) \
-/** \
- * The definition of the static variable holding the static \
- * data for this Enumeration wrapper. \
- */ \
-Enum<EnumName>::sdata Enum<EnumName>::staticData; \
+template < EnumName > Enum< EnumName >::sdata Enum< EnumName >::staticData; \
/** \
* actual definition of the constructor for the static data. \
* This is called implicitly by the definition above. \