Commit c0b29a0b authored by Paul Asmuth's avatar Paul Asmuth
Browse files

delete obsolete code

parent 1d504da3
Loading
Loading
Loading
Loading
+2 −64
Original line number Diff line number Diff line
@@ -27,8 +27,7 @@
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef _libstx_DOMAIN_H
#define _libstx_DOMAIN_H
#pragma once
#include <algorithm>
#include <math.h>
#include <stdlib.h>
@@ -36,7 +35,6 @@
#include <string>
#include <optional>

// FIXPAUL too many copies T val...
namespace plotfx {

enum class DomainKind {
@@ -58,65 +56,5 @@ double domain_translate(const DomainConfig& domain, double v);

double domain_untranslate(const DomainConfig& domain, double v);

namespace chart {
} // namespace plotfx
/**
 * Untyped domain base class
 */
class AnyDomain {
public:
  static const char kDimensionLetters[];

  // FIXPAUL make this configurable
  static const int kDefaultNumTicks;
  static const double kDefaultDomainPadding;

  enum kDimension {
    DIM_X = 0,
    DIM_Y = 1,
    DIM_Z = 2
  };

  virtual ~AnyDomain() {}

  virtual const std::vector<double> getTicks() const = 0;

  virtual const std::vector<std::pair<double, std::string>> getLabels()
      const = 0;

  virtual void setInverted(bool inverted) = 0;

  virtual void build() = 0;

};

/**
 * Polymorphic domain
 */
template <typename T>
class Domain : public AnyDomain {
public:
  virtual ~Domain() {}

  static Domain<T>* mkDomain();

  /**
   * Returns the label at the specified index
   *
   * @param index the index
   */
  virtual std::string label(T value) const = 0;

  virtual double scale(T value) const = 0;

  virtual std::pair<double, double> scaleRange(T value) const = 0;

  virtual void addValue(const T& value) = 0;

  virtual bool contains(T value) const = 0;

};

}
}
#endif