Itasca C++ Interface
Loading...
Searching...
No Matches
iparameter.h
1#pragma once
2
3#include "base/src/vect.h"
5
6#include "iparametervalue.h"
7#include "shared/interface/itensordata.h"
8
9namespace fish {
10 class List;
11 class Map;
12
13 class IParameter {
14 public:
15
16 virtual ~IParameter() { }
17
18 virtual IString getName() const=0;
19
20 virtual bool getIsBool() const=0;
21 virtual bool getIsInt() const=0;
22 virtual bool getIsDouble() const=0;
23 virtual bool getIsNumber() const=0;
24 virtual bool getIsString() const=0;
25 virtual bool getIsVect2() const=0;
26 virtual bool getIsVect3() const=0;
27 virtual bool getIsTensor() const=0;
28 virtual bool getIsPoint() const=0;
29 virtual bool getIsList() const = 0;
30 virtual bool getIsMap() const = 0;
31
32 virtual bool getBool() const=0;
33 virtual int64 getInt(int64 min=limits<int64>::min(),int64 max=limits<int64>::max()) const=0;
34 virtual double getDouble(double min=-limits<double>::max(),double max=limits<double>::max()) const=0;
35 virtual IString getString() const=0;
36 virtual DVect2 getVect2() const=0;
37 virtual DVect3 getVect3() const=0;
38 virtual SymTensor getTensor() const=0;
39 virtual QVariant getQVariant() const=0;
40 virtual List getList() const = 0;
41 virtual Map getMap() const = 0;
42
43 virtual double safeToDouble(double min=-limits<double>::max(),double max=limits<double>::max()) const=0;
44 virtual DVect2 safeToVect2() const=0;
45 virtual DVect3 safeToVect3() const=0;
46 virtual SymTensor safeToTensor() const=0;
47
48 virtual IString list() const=0;
49
50 virtual void copy(const IParameter &p)=0;
51 // Sets to the value in the string, converting to the best type it can
52 virtual void fromString(const IString &s)=0;
53
54 virtual double pullDouble(const ParameterValue &pp) const = 0;
55 virtual string pullString(const ParameterValue &pp) const = 0;
56 virtual std::pair<IString,bool> encodeAsString() const=0;
57 virtual void decodeFromString(const IString &s)=0;
58 };
59} // namespace fish
60// EoF
61
Definition istring.h:14
A symmetric 2nd order tensor.
Definition symtensor.h:22
Definition iparameter.h:13
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
Definition iparametervalue.h:16
A Symmetric 2nd order tensor.
2D and 3D vector utility classes.