diff --git a/eo/src/eoNonUniform.h b/eo/src/eoNonUniform.h new file mode 100644 index 000000000..2ce8bbb99 --- /dev/null +++ b/eo/src/eoNonUniform.h @@ -0,0 +1,27 @@ +//----------------------------------------------------------------------------- +// eoNonUniform.h +//----------------------------------------------------------------------------- + +#ifndef eoNonUniform_h +#define eoNonUniform_h + +//----------------------------------------------------------------------------- +// eoNonUniform: base class for non uniform operators +//----------------------------------------------------------------------------- + +template class eoNonUniform +{ +public: + eoNonUniform(const Time& _time = Time(), const Time& _max_time = Time()): + time_value(_time), max_time_value(_max_time) {} + + const Time& time() const { return time_value; } + const Time& max_time() const { return max_time_value; } + +private: + Time &time_value, &max_time_value; +}; + +//----------------------------------------------------------------------------- + +#endif eoNonUniform_h diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index b13359acd..2b0b13e30 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -201,29 +201,4 @@ public: }; //@} - -/** - eoNonUniformOperator: base class for non uniform operators -*/ - -class eoNonUniformOperator -{ -public: - eoNonUniformOperator(const unsigned _max_time = 1): - time_value(0), max_time_value(max(_max_time, 1u)) {} - - void reset() { time_value = 0; } - - unsigned time() const { return time_value; } - - unsigned max_time() const { return max_time_value; } - void max_time(const unsigned _max_time) { max_time_value = _max_time; } - - void operator++() { ++time_value; } - void operator++(int) { ++time_value; } - -private: - unsigned time_value, max_time_value; -}; - #endif