00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00033
00034 #ifndef esve_components_dimn_Valuator_hxx
00035 #define esve_components_dimn_Valuator_hxx
00036
00037 #include <esve/ui/extra/Widget.hxx>
00038 #include <esve/types/complex.hxx>
00039
00040 namespace esve { namespace components { namespace dimn {
00041
00064
00065 template< typename T_Value >
00066 class Valuator
00067 : public ui::extra::Widget
00068 {
00069 public:
00071 virtual T_Value value() const = 0 ;
00072
00078 virtual Valuator & value( const T_Value & ) = 0 ;
00079
00084 virtual Valuator & step( const T_Value & ) = 0 ;
00085
00090 virtual
00091 Valuator &
00092 range( const T_Value & min_corner,
00093 const T_Value & max_corner ) = 0 ;
00094
00095 protected:
00096 Valuator() { }
00097
00098
00099 ~Valuator() { }
00100
00101 private:
00102 Valuator( const Valuator & ) ;
00103 Valuator & operator=( const Valuator & ) ;
00104 } ;
00105
00106 template<>
00107 class Valuator<types::real>
00108 : public ui::extra::Widget
00109 {
00110 public:
00112 virtual types::real value() const = 0 ;
00113
00118 virtual Valuator & value( types::real ) = 0 ;
00119
00124 virtual Valuator & step( types::real ) = 0 ;
00125
00130 virtual
00131 Valuator &
00132 range( types::real min, types::real max ) = 0 ;
00133
00134 protected:
00135 Valuator() { }
00136
00137
00138 ~Valuator() { }
00139
00140 private:
00141 Valuator( const Valuator & ) ;
00142 Valuator & operator=( const Valuator & ) ;
00143 } ;
00144
00145 template<>
00146 class Valuator<types::complex>
00147 : public ui::extra::Widget
00148 {
00149 public:
00151 virtual types::complex value() const = 0 ;
00152
00158 virtual Valuator & value( const types::complex & ) = 0 ;
00159 virtual Valuator & value( types::real , types::real ) = 0 ;
00161
00167 virtual Valuator & step( const types::complex & ) = 0 ;
00168 virtual Valuator & step( types::real, types::real ) = 0 ;
00170
00175 virtual
00176 Valuator &
00177 range( const types::complex & lower_left_corner,
00178 const types::complex & upper_right_corner ) = 0 ;
00179
00180 protected:
00181 Valuator() { }
00182
00183
00184 ~Valuator() { }
00185
00186 private:
00187 Valuator( const Valuator & ) ;
00188 Valuator & operator=( const Valuator & ) ;
00189 } ;
00190
00191 }}}
00192
00193 #endif
00194