|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
An object to track a value associated with a Record. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sina/core/Datum.hpp>
Public Member Functions | |
| Datum (const std::string &value) | |
| Construct a new Datum. More... | |
| Datum (const double &value) | |
| Construct a new Datum. More... | |
| Datum (const std::vector< std::string > &value) | |
| Construct a new Datum. More... | |
| Datum (const std::vector< double > &value) | |
| Construct a new Datum. More... | |
| Datum (conduit::Node const &asNode) | |
| Construct a Datum from its Node representation. More... | |
| std::string const & | getValue () const noexcept |
| Get the string value of the Datum. More... | |
| double const & | getScalar () const noexcept |
| Get the scalar value of the Datum. More... | |
| std::vector< std::string > const & | getStringArray () const noexcept |
| Get the string array value of the Datum. More... | |
| std::vector< double > const & | getScalarArray () const noexcept |
| Get the scalar array value of the Datum. More... | |
| std::vector< std::string > const & | getTags () const noexcept |
| Get the tags of the Datum. More... | |
| void | setTags (const std::vector< std::string > &tags) |
| Set the tags of the Datum. More... | |
| std::string const & | getUnits () const noexcept |
| Get the units of the Datum. More... | |
| void | setUnits (const std::string &units) |
| Set the units of the Datum. More... | |
| ValueType | getType () const noexcept |
| Get the type of the Datum. More... | |
| conduit::Node | toNode () const |
| Convert this Datum to its conduit Node representation. More... | |
An object to track a value associated with a Record.
A Datum tracks the value and (optionally) tags and/or units of a value associated with a Record, e.g. a scalar, a piece of metadata, or an input parameter. In the Sina schema, a Datum always belongs to a Record or one of Record's inheriting types.
Every Datum must have a value; units and tags are optional.
The value of a Datum may be a string, a double, an array of strings, or an array of doubles.
| axom::sina::Datum::Datum | ( | const std::string & | value | ) |
Construct a new Datum.
| value | the string value of the datum |
| axom::sina::Datum::Datum | ( | const double & | value | ) |
Construct a new Datum.
| value | the double value of the datum |
| axom::sina::Datum::Datum | ( | const std::vector< std::string > & | value | ) |
Construct a new Datum.
| value | the string array value of the datum |
| axom::sina::Datum::Datum | ( | const std::vector< double > & | value | ) |
Construct a new Datum.
| value | the scalar array value of the datum |
|
explicit |
|
inlinenoexcept |
Get the string value of the Datum.
|
inlinenoexcept |
Get the scalar value of the Datum.
|
inlinenoexcept |
Get the string array value of the Datum.
|
inlinenoexcept |
Get the scalar array value of the Datum.
|
inlinenoexcept |
Get the tags of the Datum.
| void axom::sina::Datum::setTags | ( | const std::vector< std::string > & | tags | ) |
Set the tags of the Datum.
| tags | the tags of the value |
|
inlinenoexcept |
Get the units of the Datum.
| void axom::sina::Datum::setUnits | ( | const std::string & | units | ) |
Set the units of the Datum.
| units | the units of the value |
|
inlinenoexcept |
Get the type of the Datum.
| conduit::Node axom::sina::Datum::toNode | ( | ) | const |