18 #define sLinScaler "Linear" 19 #define sLogScaler "Logarithmic" 20 #define sExpScaler "Exponential" 21 #define sAsymptScaler "Asymptotic" 34 static Scaler*
get(
const char*);
36 void put(
char*)
const;
38 virtual bool isEmpty()
const {
return false; }
39 virtual Scaler* clone()
const = 0;
40 virtual Scaler*
inverse()
const {
return 0; }
41 virtual const char* type()
const = 0;
43 virtual double scale(
double)
const = 0;
45 virtual const char*
toString()
const = 0;
46 virtual void fromString(
const char*) = 0;
59 : constant_(c), factor_(f) {}
60 LinScaler(
double x0,
double y0,
double x1,
double y1 );
61 void set(
double x0,
double y0,
double x1,
double y1 );
63 {
return new LinScaler(constant_,factor_); }
69 double scale(
double)
const;
70 double unScale(
double)
const;
72 void fromString(
const char*);
100 virtual Scaler*
inverse()
const;
102 double scale(
double)
const;
107 {
return ten_==oth.
ten_; }
125 virtual Scaler*
inverse()
const;
127 double scale(
double)
const;
133 {
return ten_==oth.
ten_; }
155 : center_(c), width_(w), linedge_(l),
factor_(1)
161 double scale(
double)
const;
167 {
return center_ == oth.
center_ 171 void set(double,double,double);
172 inline double center()
const {
return center_; }
173 inline double width()
const {
return width_; }
174 inline double linedge()
const {
return linedge_; }
#define mExpClass(module)
Definition: commondefs.h:157
double center() const
Definition: scaler.h:172
double unScale(double) const
bool operator==(const LinScaler &oth) const
Definition: scaler.h:74
virtual LinScaler * clone() const
Definition: scaler.h:62
double linedge_
Definition: scaler.h:180
ExpScaler(bool powerof10=true)
Definition: scaler.h:120
Exponential scaling, base e or ten.
Definition: scaler.h:117
virtual LogScaler * clone() const
Definition: scaler.h:98
const char * type() const
Definition: scaler.h:97
#define sLinScaler
Definition: scaler.h:18
AsymptScaler(double c=0, double w=1, double l=0.95)
Definition: scaler.h:154
double scale(double) const
double width_
Definition: scaler.h:179
#define sAsymptScaler
Definition: scaler.h:21
const char * toString() const
bool isEmpty() const
Definition: scaler.h:84
const char * type() const
Definition: scaler.h:67
bool operator==(const ExpScaler &oth) const
Definition: scaler.h:132
double factor_
Definition: scaler.h:182
virtual LinScaler * inverse() const
virtual ~Scaler()
Definition: scaler.h:35
virtual AsymptScaler * clone() const
Definition: scaler.h:158
#define sExpScaler
Definition: scaler.h:20
Logarithmic scaling, base e or ten.
Definition: scaler.h:92
virtual double unScale(double) const
Definition: scaler.h:44
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
double linedge() const
Definition: scaler.h:174
bool operator==(const AsymptScaler &oth) const
Definition: scaler.h:166
const char * type() const
Definition: scaler.h:157
virtual bool isEmpty() const
Definition: scaler.h:38
const char * type() const
Definition: scaler.h:122
Scaling of floating point numbers.
Definition: scaler.h:30
double factor_
Definition: scaler.h:81
BufferString toString(const DBKey &ky)
Definition: dbkey.h:115
double width() const
Definition: scaler.h:173
bool isEmpty(const char *)
bool ten_
Definition: scaler.h:109
#define sLogScaler
Definition: scaler.h:19
LinScaler(double c=0, double f=1.)
Definition: scaler.h:58
bool ten_
Definition: scaler.h:135
virtual Scaler * inverse() const
Definition: scaler.h:40
bool operator==(const LogScaler &oth) const
Definition: scaler.h:106
virtual ExpScaler * clone() const
Definition: scaler.h:123
double center_
Definition: scaler.h:178
LogScaler(bool powerof10=true)
Definition: scaler.h:95
void fromString(const char *)
Linear scaling.
Definition: scaler.h:55
double constant_
Definition: scaler.h:80
Asymptotic or 'Squeeze' scaling, with a linear (main) part.
Definition: scaler.h:151