/*******************************************************
 * Copyright (C) 2017-2020 CENOS Ltd vg@cenos-platform.com
 *
 * This file is part of CENOS.
 *
 * CENOS can not be copied and/or distributed without the express
 * permission of CENOS Ltd
 *******************************************************/
 /**
  *  \brief     Parameter class.
  *  \details   Parameters are used to change geometry during or before the simulation
  *  \author    vadims
  *  \date      Feb 5, 2020
  *  \copyright CENOS LLC
  */

#pragma once

#include <string>
#include <map>

class Parameter
{

public:
    Parameter(std::string, double);
    ~Parameter() { };

    void setEndValue(double);
    void setTimeStep(double);
    void setVelocity(double);
    void setEnabled(bool);

    std::string name() const;
    double startValue() const;
    double endValue() const;
    double timeStep() const;
    double velocity() const;
    bool enabled() const;
    void addParameterTimePoint(double, double);
    double getParameterValue(double time);

    std::map<double, double> timePoints();

private:
    std::string name_;
    double startValue_;
    double endValue_;
    double timeStep_;
    double velocity_;
    bool enabled_;
    // map containing time and corresponding parameter value at that time
    std::map<double, double> timePoints_;
};