File indexing completed on 2025-12-16 10:31:54
0001 #ifndef ATOOLS_Math_Axis_H
0002 #define ATOOLS_Math_Axis_H
0003
0004 #include "ATOOLS/Math/Variable.H"
0005 #include "ATOOLS/Math/Scaling.H"
0006
0007 namespace ATOOLS {
0008
0009 template <class ValueType>
0010 class Axis {
0011 public:
0012
0013 enum ScalingModeID {
0014 Reference = 1,
0015 Identical = 2,
0016 Unknown = 99
0017 };
0018
0019 public:
0020
0021 typedef ValueType Value_Type;
0022
0023 private:
0024
0025 ScalingModeID m_scalingmode;
0026
0027 Variable_Base<Value_Type> *p_variable;
0028 Scaling_Base<Value_Type> *p_scaling;
0029
0030 public:
0031
0032
0033 Axis();
0034 Axis(const Axis &ref);
0035
0036
0037 ~Axis();
0038
0039
0040 void SetScaling(const std::string &scalename);
0041 void SetVariable(const std::string &variablename);
0042
0043 void SetScaling(Scaling_Base<Value_Type> *const scaling);
0044 void SetVariable(Variable_Base<Value_Type> *const variable);
0045
0046 const Scaling_Base<Value_Type> *Scaling() const;
0047 const Variable_Base<Value_Type> *Variable() const;
0048
0049 void SetScalingMode(const ScalingModeID &scalingmode);
0050
0051 ScalingModeID ScalingMode() const;
0052
0053 Value_Type DisplayedValue(const Value_Type &realvalue,
0054 ScalingModeID tempsmode) const;
0055 Value_Type RealValue(const Value_Type &displayedvalue,
0056 ScalingModeID tempsmode) const;
0057
0058 Value_Type operator()(const Value_Type &realvalue) const;
0059 Value_Type operator[](const Value_Type &displayedvalue) const;
0060
0061 };
0062
0063 }
0064
0065 #endif