2010-01-19 03:50:19 -06:00
|
|
|
/*
|
|
|
|
* Parameters.h
|
|
|
|
* openChams
|
|
|
|
*
|
|
|
|
* Created by damien dupuis on 18/12/09.
|
|
|
|
* Copyright 2009 UPMC / LIP6. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __OPENCHAMS_PARAMETERS_H__
|
|
|
|
#define __OPENCHAMS_PARAMETERS_H__
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include "Name.h"
|
|
|
|
|
|
|
|
namespace OpenChams {
|
|
|
|
class Parameters {
|
|
|
|
public:
|
|
|
|
Parameters() {};
|
|
|
|
|
2010-02-09 06:16:04 -06:00
|
|
|
double getValue(Name);
|
|
|
|
std::string getEqValue(Name);
|
|
|
|
void addParameter(Name, double);
|
|
|
|
void addParameter(Name, std::string);
|
2010-01-19 03:50:19 -06:00
|
|
|
|
|
|
|
// pour parcourir la map :
|
|
|
|
inline bool isEmpty();
|
2010-02-09 06:16:04 -06:00
|
|
|
inline const std::map<Name, double>& getValues();
|
|
|
|
inline const std::map<Name, std::string>& getEqValues();
|
2010-01-19 03:50:19 -06:00
|
|
|
|
|
|
|
private:
|
2010-02-09 06:16:04 -06:00
|
|
|
std::map<Name, double> _params;
|
|
|
|
std::map<Name, std::string> _paramsEq;
|
2010-01-19 03:50:19 -06:00
|
|
|
};
|
|
|
|
|
2010-02-09 06:16:04 -06:00
|
|
|
inline bool Parameters::isEmpty() { return ((_params.size() == 0)&&(_paramsEq.size() == 0))? true : false; }
|
|
|
|
inline const std::map<Name, double>& Parameters::getValues() { return _params; };
|
|
|
|
inline const std::map<Name, string>& Parameters::getEqValues() { return _paramsEq; };
|
2010-01-19 03:50:19 -06:00
|
|
|
|
|
|
|
} // namespace
|
2010-01-26 09:05:20 -06:00
|
|
|
#endif
|
|
|
|
|