Itasca C++ Interface
Loading...
Searching...
No Matches
imodellist.h
1#pragma once
2
3#include "base/src/variant.h"
4
5namespace itasca {
6
7 class IModelList {
8 public:
9 // Information to describe a property in a model.
10 struct PropInfo {
11 string name_;
12 base::Property::Type type_ = base::Property::Type::Double;
13 bool multiple_ = false;
14 bool advanced_ = false;
15 bool readOnly_ = false;
16 };
17 // the string signifying no model assignment
18 static const char *noModelAssigned() { return "unassigned"; }
19 // Information to describe a model.
20 struct ModelInfo {
21 string keyword_;
22 string fullName_;
23 bool creep_ = false;
24 bool liquefaction_ = false;
25 bool withOrietation_ = false;
26 bool withKGEv_ = false;
27 std::vector<PropInfo> properties_;
28 StringList states_;
29 };
30 // Used to return info about model/prop info and values in a region of the model.
32 double density_ = 0.0;
33 string keyword_; // QString() if more than one model found.
34 ModelInfo modelInfo_;
35 //std::vector<PropInfo> properties_; // empty if more than one model found.
36 std::vector<base::Property> values_; //
37
38 void clear() { density_ = 0.0; keyword_ = string(); modelInfo_.properties_.clear(); values_.clear(); }
39 };
40 virtual StringList getAllModelKeywords() const=0;
41 virtual ModelInfo getModelInfo(const string &keyword) const=0;
42 };
43
44} // namespace itasca
45// EoF
46
Definition basestring.h:89
Definition imodellist.h:7
namespace Itasca
Definition basememory.cpp:10
Definition imodellist.h:20
Definition imodellist.h:31
Definition imodellist.h:10
A simpler (and slightly faster) version of a QVariant, added for interfaces that do not use Qt.