move ThemeMetricEnum into ThemeMetric.h, add default constructor

This commit is contained in:
Glenn Maynard
2005-07-14 01:47:47 +00:00
parent 0fd2a733ef
commit ae5f3eeaf9
2 changed files with 10 additions and 8 deletions
-8
View File
@@ -39,14 +39,6 @@ public:
private:
vector<StepsType> m_v;
};
template <class T>
class ThemeMetricEnum : public ThemeMetric<int>
{
public:
ThemeMetricEnum( const CString& sGroup, const CString& sName ) : ThemeMetric<int>(sGroup,sName) {}
T GetValue() const { return (T)ThemeMetric<int>::GetValue(); }
bool operator ==( T other ) const { return GetValue() == other; }
};
//
+10
View File
@@ -216,6 +216,16 @@ public:
}
};
template <class T>
class ThemeMetricEnum : public ThemeMetric<int>
{
public:
ThemeMetricEnum() : ThemeMetric<int>() {}
ThemeMetricEnum( const CString& sGroup, const CString& sName ) : ThemeMetric<int>(sGroup,sName) {}
T GetValue() const { return (T)ThemeMetric<int>::GetValue(); }
bool operator ==( T other ) const { return GetValue() == other; }
};
/* Like ThemeMetric, but evaluates Lua expressions each time. This is fast,
* since we only compile the expression once, but not as fast as ThemeMetric. */
template <class T>