15 #include "generalmod.h" 29 SpecVar(
const char* varnm,
const char* dispnm,
32 : varnm_(varnm), dispnm_(dispnm)
33 , hasunits_(hasuns), type_(typ) {}
35 {
return varnm_ == oth.
varnm_; }
52 int getIndexOf(
const char* varnm)
const;
54 void add(
const char* varnm,
const char* dispnm,
57 { *
this += SpecVar(varnm,dispnm,hasuns,typ); }
61 SpecVar*
find(
const char* nm )
62 {
int idx=getIndexOf(nm);
return idx<0?0:&(*this)[idx];}
63 const SpecVar*
find(
const char* nm )
const 66 {
return getIndexOf(nm) >= 0; }
68 {
return (*
this)[idx].varnm_; }
70 {
return (*
this)[idx].dispnm_; }
72 {
return (*
this)[idx].hasunits_; }
74 {
return (*
this)[idx].type_; }
#define mExpClass(module)
Definition: commondefs.h:160
const SpecVar * find(const char *nm) const
Definition: mathspecvars.h:63
const OD::String & dispName(int idx) const
Definition: mathspecvars.h:69
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
bool isPresent(const char *nm) const
Definition: mathspecvars.h:65
Set of BufferString objects.
Definition: bufstringset.h:28
Special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:25
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:47
Definition: propertyref.h:49
Set of (small) copyable elements.
Definition: commontypes.h:30
SpecVarSet()
Definition: mathspecvars.h:50
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:183
SpecVar * find(const char *nm)
Definition: mathspecvars.h:61
BufferString dispnm_
Definition: mathspecvars.h:38
PropertyRef::StdType type_
Definition: mathspecvars.h:40
bool hasunits_
Definition: mathspecvars.h:39
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
PropertyRef::StdType propType(int idx)
Definition: mathspecvars.h:73
StdType
Definition: propertyref.h:46
bool hasUnits(int idx)
Definition: mathspecvars.h:71
SpecVar(const char *varnm, const char *dispnm, bool hasuns=false, PropertyRef::StdType typ=PropertyRef::Other)
Definition: mathspecvars.h:29
void add(const char *varnm, const char *dispnm, bool hasuns=false, PropertyRef::StdType typ=PropertyRef::Other)
Definition: mathspecvars.h:54
const OD::String & varName(int idx) const
Definition: mathspecvars.h:67
BufferString varnm_
Definition: mathspecvars.h:37