00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef _LogTransform_H_ 00015 #define _LogTransform_H_ 00016 00017 #include "UnaryTransform.h" 00018 00019 class AxisModelBase; 00020 class AxisTick; 00021 00028 class MDL_HIPPOPLOT_API LogTransform : public UnaryTransform 00029 { 00030 private: 00031 00034 std::vector < AxisTick > m_ticks; 00035 00036 void setFirstTick( AxisModelBase & ); 00037 void setTickStep( AxisModelBase & ); 00038 const std::vector < AxisTick > & 00039 genTicks ( AxisModelBase & ); 00040 00041 double prevStep ( double current, AxisModelBase & axis ); 00042 double nextStep ( double current, AxisModelBase & axis ); 00043 00044 const Range & adjustLogValues ( AxisModelBase & axis ); 00045 00046 public: 00047 00049 LogTransform (); 00050 00052 LogTransform ( const LogTransform & ); 00053 00055 virtual ~LogTransform(); 00056 00058 #ifdef CLONE_DEFECT 00059 virtual TransformBase * clone () const; 00060 #else 00061 virtual LogTransform * clone () const; 00062 #endif 00063 00064 virtual bool isLinear () const; 00065 00069 virtual void transform ( double & x ) const; 00070 00072 virtual void inverseTransform ( double & x ) const; 00073 00076 virtual void transform ( std::vector< double > & x ) const; 00077 00080 virtual void validate ( Range & ) const; 00081 00084 virtual const std::vector < AxisTick > & 00085 setTicks ( AxisModelBase & axis ); 00086 00090 const Range & adjustValues ( AxisModelBase & axis, const Range & limit ); 00091 00092 }; 00093 00094 #endif // _LogTransform_H_