|
|
@ -84,10 +84,27 @@ class VarType: public vartype::VartypeUnion |
|
|
|
return "none"; |
|
|
|
return "none"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MString ShortName() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch(VT()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case(vartype::Vartype::NONE): return "none"; |
|
|
|
|
|
|
|
case(vartype::Vartype::U): return "u"; |
|
|
|
|
|
|
|
case(vartype::Vartype::V): return "v"; |
|
|
|
|
|
|
|
case(vartype::Vartype::TEMP): return "temp"; |
|
|
|
|
|
|
|
case(vartype::Vartype::SAL): return "sal"; |
|
|
|
|
|
|
|
case(vartype::Vartype::CHL): return "chl"; |
|
|
|
|
|
|
|
case(vartype::Vartype::MLD): return "mld"; |
|
|
|
|
|
|
|
case(vartype::Vartype::SSH): return "ssh"; |
|
|
|
|
|
|
|
case(vartype::Vartype::W): return "w"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return "none"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool Ok() const { return VT() != vartype::Vartype::NONE; } |
|
|
|
bool Ok() const { return VT() != vartype::Vartype::NONE; } |
|
|
|
explicit operator bool() const { return Ok(); } |
|
|
|
explicit operator bool() const { return Ok(); } |
|
|
|
bool operator==(const VarType& vt) const { return VT() == vt.VT(); } |
|
|
|
bool operator==(const VarType& vt) const { return VT() == vt.VT(); } |
|
|
|
bool operator!=(const VarType& vt) const { return VT() != vt.VT(); } |
|
|
|
auto operator<=>(const VarType& vt) const { return VT() <=> vt.VT(); } |
|
|
|
template<class Data> bool isSupported() const |
|
|
|
template<class Data> bool isSupported() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
return std::visit( |
|
|
|
return std::visit( |
|
|
|