Datum.hpp
A single piece of data, either a value or an String.
This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2021-2024 Michigan State University MIT Software license; see doc/LICENSE.md
DEVELOPER NOTES:
For now, using unions, but this creates complications with non-trivial constructor/destructor for strings, so could try shifting over.
Note
Status: ALPHA
Defines
-
INCLUDE_EMP_DATA_DATUM_HPP_GUARD
Functions
-
class Datum
- #include <Datum.hpp>
Public Functions
-
inline Datum()
-
inline Datum(double in)
-
inline Datum(const char *in)
-
inline ~Datum()
-
inline bool IsDouble() const
Is this natively stored as a double?
-
inline bool IsString() const
Is this natively stored as a string?
-
inline double &NativeDouble()
If we know Datum is a Double, we can request its native form.
-
inline double NativeDouble() const
-
inline double AsDouble() const
-
inline operator double() const
-
inline int CompareNumber(double rhs) const
-
inline int Compare(double rhs) const
-
inline int Compare(const char *rhs) const
-
inline Datum()