16#include <OpenMS/OpenMSConfig.h>
55 static const std::string NamesOfDataType[SIZE_OF_DATATYPE];
130 operator
std::
string() const;
160 operator
long double() const;
169 operator
double() const;
178 operator
float() const;
187 operator
short int() const;
196 operator
unsigned short int() const;
206 operator
int() const;
215 operator
unsigned int() const;
224 operator
long int() const;
233 operator
unsigned long int() const;
242 operator
long long() const;
251 operator
unsigned long long() const;
268 const
char* toChar() const;
346 String toString(
bool full_precision = true) const;
349 QString toQString() const;
360 bool isEmpty() const;
372 bool hasUnit() const;
375 const int32_t & getUnit() const;
378 void setUnit(const int32_t & unit);
444 std::size_t seed = 0;
452 switch (dv.valueType())
458 double val =
static_cast<double>(dv);
460 int64_t rounded =
static_cast<int64_t
>(std::round(val * 1e6));
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition DataValue.h:34
static const DataValue EMPTY
Empty data value for comparisons.
Definition DataValue.h:39
UnitType
Supported types for DataValue.
Definition DataValue.h:59
@ MS_ONTOLOGY
ms.ontology MS
Definition DataValue.h:61
@ UNIT_ONTOLOGY
unit.ontology UO
Definition DataValue.h:60
DataValue(const DataValue &)
Copy constructor.
DataType
Supported types for DataValue.
Definition DataValue.h:43
@ DOUBLE_VALUE
double value
Definition DataValue.h:46
@ EMPTY_VALUE
empty
Definition DataValue.h:50
@ INT_LIST
integer list
Definition DataValue.h:48
@ STRING_VALUE
string value
Definition DataValue.h:44
@ STRING_LIST
string list
Definition DataValue.h:47
@ INT_VALUE
integer value
Definition DataValue.h:45
@ DOUBLE_LIST
double list
Definition DataValue.h:49
void clear_() noexcept
Clears the current state of the DataValue and release every used memory.
DataValue(DataValue &&) noexcept
Move constructor.
DataValue()
Default constructor.
Class to hold strings, numeric values, vectors of strings and vectors of numeric values using the stl...
Definition ParamValue.h:31
A more convenient string class.
Definition String.h:34
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition Types.h:104
std::vector< Int > IntList
Vector of signed integers.
Definition ListUtils.h:29
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
std::vector< double > DoubleList
Vector of double precision real types.
Definition ListUtils.h:36
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::size_t hash_int(T value) noexcept
Hash for an integer type.
Definition HashUtils.h:107
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Combine a hash value with additional data using golden ratio mixing.
Definition HashUtils.h:87
std::size_t fnv1a_hash_string(const std::string &s) noexcept
FNV-1a hash for a string.
Definition HashUtils.h:70
std::size_t operator()(const OpenMS::DataValue &dv) const noexcept
Definition DataValue.h:442