![]() |
CYCLUS
|
Used to specify and send a collection of key-value pairs to the Recorder for recording.
#include <datum.h>
Public Types | |
| typedef std::pair< const char *, boost::spirit::hold_any > | Entry |
| typedef std::vector< std::string > | Fields |
| typedef std::vector< int > | Shape |
| typedef std::vector< Shape > | Shapes |
| typedef std::vector< Entry > | Vals |
Public Member Functions | |
| Datum * | AddVal (const char *field, boost::spirit::hold_any val, std::vector< int > *shape=NULL) |
| Datum * | AddVal (std::string field, boost::spirit::hold_any val, std::vector< int > *shape=NULL) |
| const Fields & | fields () |
| void | Record () |
| const Shapes & | shapes () |
| std::string | title () |
| const Vals & | vals () |
| virtual | ~Datum () |
Static Public Member Functions | |
| static void | operator delete (void *rawMemory) throw () |
| static void * | operator new (size_t size) |
| typedef std::pair<const char*, boost::spirit::hold_any> cyclus::Datum::Entry |
| typedef std::vector<std::string> cyclus::Datum::Fields |
| typedef std::vector<int> cyclus::Datum::Shape |
| typedef std::vector<Shape> cyclus::Datum::Shapes |
| typedef std::vector<Entry> cyclus::Datum::Vals |
| Datum * cyclus::Datum::AddVal | ( | const char * | field, |
| boost::spirit::hold_any | val, | ||
| std::vector< int > * | shape = NULL ) |
Add an arbitrary field-value pair to the datum.
| field | a label or key for a value. Loosely analogous to a column label. |
| val | a value of any type (int, bool, string, vector) supported by the backends being used. |
| shape | a pointer to a vector of ints that represents the maximum shape for this field. This is only useful for variable length data types such as string and blob. If a shape is provided, this field and value is interpreted as having a fixed length (of the value given). If the pointer is NULL or the entry is less than one (<1), the field is interpreted as inherently variable length, which may affect persistance. This is a vector of ints (a shape) rather than an int (a length) to accomodate nested data types, such as a vector of vectors of doubles or a map of strings to ints. Use NULL as the shape for fixed length data types such as int, float, double, etc. |
| Datum * cyclus::Datum::AddVal | ( | std::string | field, |
| boost::spirit::hold_any | val, | ||
| std::vector< int > * | shape = NULL ) |
| const Datum::Fields & cyclus::Datum::fields | ( | ) |
|
static | |||||||||||||
| void cyclus::Datum::Record | ( | ) |
| const Datum::Shapes & cyclus::Datum::shapes | ( | ) |
| std::string cyclus::Datum::title | ( | ) |
| const Datum::Vals & cyclus::Datum::vals | ( | ) |