19 # include "rrLogger.h"
20 # include "rrOSSpecifics.h"
21 # include "Dictionary.h"
22 # include "rrException.h"
24 # include "tr1proxy/rr_memory.h"
25 # include "tr1proxy/rr_unordered_map.h"
197 const std::string&
getHint(std::string key)
const;
236 typedef std::vector<std::string> SettingsList;
237 typedef RR_UNORDERED_MAP <std::string, Variant> SettingsMap;
238 typedef RR_UNORDERED_MAP <std::string, std::string> DisplayNameMap;
239 typedef RR_UNORDERED_MAP <std::string, std::string> HintMap;
240 typedef RR_UNORDERED_MAP <std::string, std::string> DescriptionMap;
242 SettingsList sorted_settings;
243 SettingsMap settings;
244 DisplayNameMap display_names_;
246 DescriptionMap descriptions;
248 void addSetting(std::string name,
Variant val,
string display_name, std::string hint, std::string description);
Base class for all integrators and steady state solvers.
Definition: Solver.h:37
virtual unsigned char getValueAsUChar(std::string key)
Wrapper for getValue which converts output to a specific type.
const std::string & getDisplayName(std::string key) const
Gets the hint associated with a given key.
virtual void resetSettings()
Reset all settings to their respective default values.
virtual long getValueAsLong(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual size_t getNumParams() const
Get the number of parameters.
const Variant::TypeId getType(std::string key)
Gets the type associated with a given key.
std::string settingsPyDictRepr() const
Python dictionary-style string representation of settings.
std::string getSettingsRepr() const
Get the solver settings as a string.
virtual std::string getName() const =0
Get the name of this solver.
virtual std::string getParamDesc(int n) const
Get the description of the parameter at index n.
const std::string & getHint(std::string key) const
Gets the hint associated with a given key.
virtual unsigned long getValueAsULong(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual Variant getValue(std::string key) const
Get the value of an integrator setting.
virtual std::string toRepr() const
Return string representation a la Python repr method.
virtual char getValueAsChar(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual float getValueAsFloat(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual std::string getDescription() const =0
Get the description of this solver.
const std::string & getDescription(std::string key) const
Gets the description associated with a given key.
virtual std::string getValueAsString(std::string key)
Wrapper for getValue which converts output to a specific type.
std::vector< std::string > getSettings() const
Get a list of all settings for this solver.
virtual Variant hasValue(std::string key) const
Return true if this setting is supported by the integrator.
virtual bool getValueAsBool(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual std::string getParamHint(int n) const
Get the hint of the parameter at index n.
virtual int getValueAsInt(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual std::string getParamDisplayName(int n) const
Get the display name of the parameter at index n.
virtual unsigned int getValueAsUInt(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual std::string getParamName(size_t n) const
Get the name of the parameter at index n.
virtual std::vector< double > getValueAsDoubleVector(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual double getValueAsDouble(std::string key)
Wrapper for getValue which converts output to a specific type.
virtual std::string getHint() const =0
Get a (user-readable) hint for this solver.
virtual std::string toString() const
Return a string representation of the solver.
TypeId
Definition: Variant.h:82
C_DECL_SPEC bool rrcCallConv setValue(RRHandle handle, const char *symbolId, const double value)
Set the value for a given symbol, use getAvailableTimeCourseSymbols(void) for a list of symbols.