DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
the structure to pass common parameters to various read() methods of OksData and OksObject class More...
#include <object.hpp>
Classes | |
union | Data |
Public Types | |
enum | Type { unknown_type = 0 , s8_int_type = 1 , u8_int_type = 2 , s16_int_type = 3 , u16_int_type = 4 , s32_int_type = 5 , u32_int_type = 6 , s64_int_type = 7 , u64_int_type = 8 , float_type = 9 , double_type = 10 , bool_type = 11 , class_type = 12 , object_type = 13 , date_type = 14 , time_type = 15 , string_type = 16 , list_type = 17 , uid_type = 18 , uid2_type = 19 , enum_type = 20 } |
typedef std::list< OksData *, boost::fast_pool_allocator< OksData * > > | List |
Public Member Functions | |
OksData () | |
OksData (int8_t c) | |
OksData (uint8_t c) | |
OksData (int16_t i) | |
OksData (uint16_t i) | |
OksData (int32_t i) | |
OksData (uint32_t i) | |
OksData (int64_t i) | |
OksData (uint64_t i) | |
OksData (const float &f) | |
OksData (const double &d) | |
OksData (bool b) | |
OksData (boost::gregorian::date d) | |
OksData (boost::posix_time::ptime t) | |
OksData (OksString *s) | |
OksData (const char *s) | |
OksData (const std::string &s) | |
OksData (const OksString &s) | |
OksData (const char *s, size_t len, const OksAttribute *a) | |
OksData (const std::string &s, const OksAttribute *a) | |
OksData (const OksString &s, const OksAttribute *a) | |
OksData (const OksClass *c) | |
OksData (List *l) | |
OksData (OksObject *o) | |
OksData (const OksClass *c, const char *o) | |
OksData (const OksClass *c, const OksString &o) | |
OksData (const std::string &c, const std::string &o) | |
~OksData () | |
void | Clear () |
void | Clear2 () |
void | Set (int8_t c) |
void | Set (uint8_t c) |
void | Set (int16_t i) |
void | Set (uint16_t i) |
void | Set (int32_t i) |
void | Set (uint32_t i) |
void | Set (int64_t i) |
void | Set (uint64_t i) |
void | Set (const float &f) |
void | Set (const double &d) |
void | Set (bool b) |
void | SetFast (boost::gregorian::date d) |
void | SetFast (boost::posix_time::ptime t) |
void | Set (boost::gregorian::date d) |
void | Set (boost::posix_time::ptime t) |
void | Set (OksString *s) |
void | Set (const char *s) |
void | Set (const std::string &s) |
void | Set (const OksString &s) |
void | Set (const OksClass *c) |
void | SetE (OksString *s, const OksAttribute *a) |
void | SetE (const char *s, size_t len, const OksAttribute *a) |
void | SetE (const std::string &s, const OksAttribute *a) |
void | SetE (const OksAttribute *a) |
void | SetE (const OksString &s, const OksAttribute *a) |
void | Set (List *l) |
void | Set (OksObject *o) |
void | Set (const OksClass *c, const OksString &s) |
void | Set (const OksClass *c, OksString *s) |
void | Set (const OksString &c, const OksString &s) |
void | Set (OksString *c, OksString *s) |
void | ReadFrom (const char *, Type, const OksAttribute *) |
void | ReadFrom (const std::string &, const OksAttribute *) |
void | SetNullValue (const OksAttribute *a) |
void | SetValue (const char *s, const OksAttribute *a) |
void | SetValues (const char *, const OksAttribute *a) |
void | ReadFrom (const OksRelationship *) noexcept |
void | WriteTo (OksXmlOutputStream &, bool) const |
void | WriteTo (OksXmlOutputStream &) const |
void | ConvertTo (OksData *, const OksRelationship *) const |
boost::gregorian::date | date () const noexcept |
boost::posix_time::ptime | time () const noexcept |
void | cvt (OksData *to, const OksAttribute *attr) const |
Convert data to new type. | |
std::string | str (int base=0) const |
std::string | str (const OksKernel *) const |
void | check_range (const OksAttribute *a) const |
Check range of data. | |
void | set_init_value (const OksAttribute *attr, bool skip_init) |
Set value defined by initial value of attribute. | |
OksData & | operator= (const OksData &d) |
OksData (const OksData &d) | |
bool | operator== (const OksData &) const |
bool | operator!= (const OksData &) const |
bool | operator<= (const OksData &) const |
bool | operator>= (const OksData &) const |
bool | operator< (const OksData &) const |
bool | operator> (const OksData &) const |
void * | operator new (size_t) |
void | operator delete (void *ptr) |
void | sort (bool ascending=true) |
Static Public Member Functions | |
static bool | is_object (Type t) |
Public Attributes | |
enum dunedaq::oks::OksData::Type | type |
union dunedaq::oks::OksData::Data | data |
Private Member Functions | |
void | copy (const OksData &) |
bool | is_le (const OksData &) const noexcept |
bool | is_ge (const OksData &) const noexcept |
bool | is_l (const OksData &) const noexcept |
bool | is_g (const OksData &) const noexcept |
void | read (const oks::ReadFileParams &, const OksAttribute *, int32_t) |
private methods which can be used by OksObject class only | |
void | read (const oks::ReadFileParams &, const OksAttribute *) |
void | read (const OksAttribute *, const OksXmlValue &) |
void | read (const OksAttribute *, const oks::ReadFileParams &) |
void | read (const oks::ReadFileParams &, const OksRelationship *, int32_t) |
void | read (const oks::ReadFileParams &, const OksRelationship *) |
void | read (const OksRelationship *, const OksXmlRelValue &) |
void | read (const OksRelationship *, const oks::ReadFileParams &) |
OksData (const oks::ReadFileParams ¶ms, const OksAttribute *a, int32_t n) | |
OksData (const oks::ReadFileParams ¶ms, const OksAttribute *a) | |
OksData (const OksAttribute *a, const OksXmlValue &value) | |
OksData (const OksAttribute *a, const oks::ReadFileParams ¶ms) | |
OksData (const oks::ReadFileParams ¶ms, const OksRelationship *r, int32_t n) | |
OksData (const oks::ReadFileParams ¶ms, const OksRelationship *r) | |
OksData (const OksRelationship *r, const OksXmlRelValue &value) | |
OksData (const OksRelationship *r, const oks::ReadFileParams ¶ms) | |
void | WriteTo (OksXmlOutputStream &, OksKernel *, OksAliasTable *, bool, bool) const |
bool | IsConsistent (const OksRelationship *r, const OksObject *o, const char *msg) |
const std::string & | __oid () const |
const std::string & | __cn () const |
Friends | |
class | OksObject |
class | OksKernel |
std::ostream & | operator<< (std::ostream &, const OksData &) |
the structure to pass common parameters to various read() methods of OksData and OksObject class
Struct OKS data.
The struct OksData is used to present OKS data types (the type is unknown before run-time) Members: enumeration 'type' is used to define data type in run-time union 'data' is used to represent such type
Definition at line 449 of file object.hpp.
std::list<OksData *, boost::fast_pool_allocator<OksData *> > dunedaq::oks::OksData::List |
Definition at line 455 of file object.hpp.
Definition at line 457 of file object.hpp.
|
inline |
Definition at line 510 of file object.hpp.
|
inline |
Definition at line 511 of file object.hpp.
|
inline |
Definition at line 512 of file object.hpp.
|
inline |
Definition at line 513 of file object.hpp.
|
inline |
Definition at line 514 of file object.hpp.
|
inline |
Definition at line 515 of file object.hpp.
|
inline |
Definition at line 516 of file object.hpp.
|
inline |
Definition at line 517 of file object.hpp.
|
inline |
Definition at line 518 of file object.hpp.
|
inline |
Definition at line 519 of file object.hpp.
|
inline |
Definition at line 520 of file object.hpp.
|
inline |
Definition at line 521 of file object.hpp.
|
inline |
Definition at line 522 of file object.hpp.
|
inline |
Definition at line 523 of file object.hpp.
|
inline |
Definition at line 524 of file object.hpp.
|
inline |
Definition at line 525 of file object.hpp.
|
inline |
Definition at line 526 of file object.hpp.
|
inline |
Definition at line 527 of file object.hpp.
|
inline |
Definition at line 528 of file object.hpp.
|
inline |
Definition at line 529 of file object.hpp.
|
inline |
Definition at line 530 of file object.hpp.
|
inline |
Definition at line 531 of file object.hpp.
|
inline |
Definition at line 532 of file object.hpp.
|
inline |
Definition at line 533 of file object.hpp.
|
inline |
Definition at line 534 of file object.hpp.
Definition at line 535 of file object.hpp.
|
inline |
Definition at line 536 of file object.hpp.
|
inline |
Definition at line 538 of file object.hpp.
|
inline |
Definition at line 682 of file object.hpp.
|
inlineprivate |
Definition at line 727 of file object.hpp.
|
inlineprivate |
Definition at line 728 of file object.hpp.
|
inlineprivate |
Definition at line 729 of file object.hpp.
|
inlineprivate |
Definition at line 730 of file object.hpp.
|
inlineprivate |
Definition at line 732 of file object.hpp.
|
inlineprivate |
Definition at line 733 of file object.hpp.
|
inlineprivate |
Definition at line 734 of file object.hpp.
|
inlineprivate |
Definition at line 735 of file object.hpp.
|
private |
|
private |
void dunedaq::oks::OksData::check_range | ( | const OksAttribute * | a | ) | const |
Check range of data.
The method checks that the data matches to the range. If the data is out of range, the oks::AttributeRangeError exception is thrown. If definition of range is bad, then the oks::AttributeReadError exception is thrown.
a | attribute defining the range (UML syntax, e.g. "A,B,C" or "1..10" or "*..99") |
oks::AttributeRangeError | or oks::AttributeReadError is thrown in case of problems. |
void dunedaq::oks::OksData::Clear | ( | ) |
|
inline |
Definition at line 541 of file object.hpp.
void dunedaq::oks::OksData::ConvertTo | ( | OksData * | , |
const OksRelationship * | ) const |
|
private |
void dunedaq::oks::OksData::cvt | ( | OksData * | to, |
const OksAttribute * | attr ) const |
Convert data to new type.
The method converts this data to the new data using type defined by attribute parameter. A single-value can be converted to multi-value conta4ining this single item. A multi-value can be converted to single-value using first item from the multi-value.
If data cannot be converted, then the oks::AttributeReadError exception is thrown.
to | out parameter (new data containing converted value) |
attr | pointer to OKS kernel (required to read class_type values) |
oks::AttributeReadError | is thrown in case of problems. |
|
noexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
inlinestatic |
Definition at line 701 of file object.hpp.
|
private |
|
inline |
Definition at line 697 of file object.hpp.
|
inline |
Definition at line 696 of file object.hpp.
bool dunedaq::oks::OksData::operator!= | ( | const OksData & | ) | const |
bool dunedaq::oks::OksData::operator< | ( | const OksData & | ) | const |
bool dunedaq::oks::OksData::operator<= | ( | const OksData & | ) | const |
Definition at line 672 of file object.hpp.
bool dunedaq::oks::OksData::operator== | ( | const OksData & | ) | const |
bool dunedaq::oks::OksData::operator> | ( | const OksData & | ) | const |
bool dunedaq::oks::OksData::operator>= | ( | const OksData & | ) | const |
|
private |
|
private |
private methods which can be used by OksObject class only
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
Read from string using non multi-value type
oks::AttributeReadError | is thrown in case of problems. |
Definition at line 747 of file object.hpp.
|
noexcept |
Create emtpy list or empty uid2
|
inline |
Read from string using non multi-value type
oks::AttributeReadError | is thrown in case of problems. |
Definition at line 705 of file attribute.hpp.
|
inline |
Definition at line 553 of file object.hpp.
|
inline |
Definition at line 556 of file object.hpp.
|
inline |
Definition at line 557 of file object.hpp.
|
inline |
Definition at line 559 of file object.hpp.
|
inline |
Definition at line 552 of file object.hpp.
|
inline |
Definition at line 551 of file object.hpp.
|
inline |
Definition at line 562 of file object.hpp.
Definition at line 570 of file object.hpp.
Definition at line 572 of file object.hpp.
|
inline |
Definition at line 561 of file object.hpp.
|
inline |
Definition at line 560 of file object.hpp.
|
inline |
Definition at line 545 of file object.hpp.
|
inline |
Definition at line 547 of file object.hpp.
|
inline |
Definition at line 549 of file object.hpp.
|
inline |
Definition at line 543 of file object.hpp.
|
inline |
Definition at line 568 of file object.hpp.
|
inline |
Definition at line 569 of file object.hpp.
|
inline |
Definition at line 558 of file object.hpp.
|
inline |
Definition at line 546 of file object.hpp.
|
inline |
Definition at line 548 of file object.hpp.
|
inline |
Definition at line 550 of file object.hpp.
|
inline |
Definition at line 544 of file object.hpp.
void dunedaq::oks::OksData::set_init_value | ( | const OksAttribute * | attr, |
bool | skip_init ) |
Set value defined by initial value of attribute.
The method checks that the data matches to the range. If the data is out of range, the oks::AttributeRangeError exception is thrown. If definition of range is bad, then the oks::AttributeReadError exception is thrown.
attr | the attribute |
kernel | pointer to OKS kernel (required to read class_type values) |
skip_init | only required by OksObject::init2() method for optimization |
oks::AttributeReadError | is thrown in case of problems. |
Definition at line 242 of file object.cpp.
|
inline |
Definition at line 671 of file attribute.hpp.
|
inline |
Definition at line 687 of file attribute.hpp.
|
inline |
Definition at line 695 of file attribute.hpp.
|
inline |
Definition at line 679 of file attribute.hpp.
|
inline |
void dunedaq::oks::OksData::SetFast | ( | boost::gregorian::date | d | ) |
void dunedaq::oks::OksData::SetFast | ( | boost::posix_time::ptime | t | ) |
void dunedaq::oks::OksData::SetNullValue | ( | const OksAttribute * | a | ) |
Read from null string (single-value)
oks::AttributeReadError | is thrown in case of problems. |
void dunedaq::oks::OksData::SetValue | ( | const char * | s, |
const OksAttribute * | a ) |
Read from string (single-value)
oks::AttributeReadError | is thrown in case of problems. |
void dunedaq::oks::OksData::SetValues | ( | const char * | , |
const OksAttribute * | a ) |
Read from string (any type)
oks::AttributeReadError | is thrown in case of problems. |
void dunedaq::oks::OksData::sort | ( | bool | ascending = true | ) |
std::string dunedaq::oks::OksData::str | ( | const OksKernel * | ) | const |
std::string dunedaq::oks::OksData::str | ( | int | base = 0 | ) | const |
|
noexcept |
void dunedaq::oks::OksData::WriteTo | ( | OksXmlOutputStream & | ) | const |
void dunedaq::oks::OksData::WriteTo | ( | OksXmlOutputStream & | , |
bool | ) const |
|
private |
|
friend |
Definition at line 451 of file object.hpp.
|
friend |
Definition at line 450 of file object.hpp.
|
friend |
union dunedaq::oks::OksData::Data dunedaq::oks::OksData::data |
enum dunedaq::oks::OksData::Type dunedaq::oks::OksData::type |