/* * EpochAxis.hh * * Created on: 16 jan. 2015 * Author: AKKA */ #ifndef EPOCHAXIS_HH_ #define EPOCHAXIS_HH_ #include "TimeAxis.hh" namespace plot { /** * @brief Axis implementation for epoch time (ie relative time to a reference time) */ class EpochAxis: public plot::TimeAxis { public: EpochAxis() : TimeAxis(), _crtCenterTime(0), _normalized(false) { } EpochAxis(const EpochAxis& axis) : TimeAxis(axis), _crtCenterTime(0), _normalized(false) { } virtual ~EpochAxis() { } /* * @brief Set the center time to use with the function getComputedValues */ void setCrtCenterTime(double crtCenterTime) { _crtCenterTime = crtCenterTime; } /* * @brief Set normalize option */ void setNormalized(bool normalized) { _normalized = normalized; } /* * @brief Get if it's a normalized axis */ bool isNormalized() { return _normalized; } /** * @brief Dump axis properties */ void dump(std::ostream& out) { Axis::dump(out); } /** * @overrides Axis::getComputedValues */ virtual double* getComputedValues(double* values_, int size_, double min, double max); private : double _crtCenterTime; bool _normalized; }; inline std::ostream& operator <<(std::ostream& out, const EpochAxis& /*axis*/) { return out; } } /* namespace plot */ #endif /* EPOCHAXIS_HH_ */