DABC (Data Acquisition Backbone Core)
2.9.9
|
#include <dabc/Record.h>
Public Member Functions | |
bool | AsBool (bool dflt=false) const |
dabc::Buffer | AsBuffer () const |
double | AsDouble (double dflt=0.) const |
std::vector< double > | AsDoubleVect () const |
int64_t | AsInt (int64_t dflt=0) const |
std::vector< int64_t > | AsIntVect () const |
std::string | AsJson () const |
Returns field value in JSON format. More... | |
dabc::Reference | AsReference () const |
std::string | AsStr (const std::string &dflt="") const |
std::vector< std::string > | AsStrVect () const |
uint64_t | AsUInt (uint64_t dflt=0) const |
std::vector< uint64_t > | AsUIntVect () const |
int64_t | GetArraySize () const |
double * | GetDoubleArr () const |
int64_t * | GetIntArr () const |
uint64_t * | GetUIntArr () const |
bool | IsArray () const |
bool | IsModified () const |
bool | IsProtected () const |
bool | null () const |
RecordField & | operator= (const RecordField &src) |
RecordField () | |
RecordField (const bool &v) | |
RecordField (const Buffer &buf) | |
RecordField (const char *v) | |
RecordField (const DateTime &v) | |
RecordField (const double &v) | |
RecordField (const int &v) | |
RecordField (const int64_t &v) | |
RecordField (const RecordField &src) | |
RecordField (const Reference &ref) | |
RecordField (const std::string &v) | |
RecordField (const std::vector< double > &v) | |
RecordField (const std::vector< int64_t > &v) | |
RecordField (const std::vector< std::string > &v) | |
RecordField (const std::vector< uint64_t > &v) | |
RecordField (const uint64_t &v) | |
RecordField (const unsigned &v) | |
bool | SetArrDouble (int64_t size, double *arr, bool owner=false) |
Set as array, if owner flag specified, one get ownership over array and do not need to create copy. More... | |
bool | SetArrInt (int64_t size, int64_t *arr, bool owner=false) |
Set as array, if owner flag specified, one get ownership over array and do not need to create copy. More... | |
bool | SetArrStr (int64_t size, char *arr, bool owner=false) |
Sets as array of string, placed one after another in memory. More... | |
bool | SetArrUInt (int64_t size, uint64_t *arr, bool owner=false) |
Set as array, if owner flag specified, one get ownership over array and do not need to create copy. More... | |
bool | SetBool (bool v) |
bool | SetBuffer (const Buffer &buf) |
bool | SetDatime (const DateTime &v) |
bool | SetDatime (uint64_t v) |
bool | SetDouble (double v) |
bool | SetInt (int64_t v) |
void | SetModified (bool on=true) |
bool | SetNull () |
void | SetProtected (bool on=true) |
bool | SetReference (const Reference &ref) |
bool | SetStr (const char *v) |
bool | SetStr (const std::string &v) |
bool | SetStrVect (const std::vector< std::string > &vect) |
bool | SetUInt (uint64_t v) |
bool | SetValue (const RecordField &src) |
bool | SetVectDouble (const std::vector< double > &v) |
bool | SetVectInt (const std::vector< int64_t > &v) |
bool | SetVectUInt (const std::vector< uint64_t > &v) |
uint64_t | StoreSize () |
bool | Stream (iostream &s) |
virtual | ~RecordField () |
Static Public Member Functions | |
static std::string | JsonReformat (const std::string &str) |
static bool | NeedJsonReformat (const std::string &str) |
static bool | StrToStrVect (const char *str, std::vector< std::string > &vect, bool verbose=true) |
Protected Types | |
enum | ValueKind { kind_none = 0 , kind_bool = 1 , kind_int = 2 , kind_datime = 3 , kind_uint = 4 , kind_double = 5 , kind_arrint = 6 , kind_arruint = 7 , kind_arrdouble = 8 , kind_string = 9 , kind_arrstr = 10 , kind_buffer = 11 , kind_reference = 12 } |
Protected Member Functions | |
bool | cannot_modify () |
void | constructor () |
bool | isreadonly () const |
bool | modified (bool reallychanged=true) |
void | release () |
! when true, field will not be automatically deleted when full list updated from other hierarchy More... | |
void | SetArrStrDirect (int64_t size, char *arr, bool owner=false) |
Protected Attributes | |
union { | |
double valueDouble | |
scalar unsigned int type More... | |
int64_t valueInt | |
uint64_t valueUInt | |
scalar int type More... | |
}; | |
union { | |
double * arrDouble | |
! uint array, size in valueInt More... | |
int64_t * arrInt | |
uint64_t * arrUInt | |
! int array, size in valueInt More... | |
Buffer * valueBuf | |
! string or array of strings More... | |
Reference * valueRef | |
! buffer object More... | |
char * valueStr | |
! double array, size in valueInt More... | |
}; | |
ValueKind | fKind |
bool | fModified |
bool | fProtected |
! flag, used to detect in streamer when field was touched at all More... | |
bool | fTouched |
! when true, field was modified at least once More... | |
Friends | |
class | RecordFieldsMap |
|
protected |
dabc::RecordField::RecordField | ( | ) |
Definition at line 293 of file Record.cxx.
dabc::RecordField::RecordField | ( | const RecordField & | src | ) |
Definition at line 308 of file Record.cxx.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Definition at line 331 of file Record.cxx.
|
protected |
! when true, field will not be automatically deleted when full list updated from other hierarchy
Definition at line 456 of file Record.cxx.
|
inlineprotected |
|
inlineprotected |
|
protected |
Definition at line 302 of file Record.cxx.
|
protected |
Definition at line 1347 of file Record.cxx.
|
inline |
|
inline |
|
inline |
bool dabc::RecordField::AsBool | ( | bool | dflt = false | ) | const |
Definition at line 477 of file Record.cxx.
int64_t dabc::RecordField::AsInt | ( | int64_t | dflt = 0 | ) | const |
Definition at line 501 of file Record.cxx.
uint64_t dabc::RecordField::AsUInt | ( | uint64_t | dflt = 0 | ) | const |
Definition at line 525 of file Record.cxx.
double dabc::RecordField::AsDouble | ( | double | dflt = 0. | ) | const |
Definition at line 549 of file Record.cxx.
std::string dabc::RecordField::AsStr | ( | const std::string & | dflt = "" | ) | const |
Definition at line 749 of file Record.cxx.
std::vector< int64_t > dabc::RecordField::AsIntVect | ( | ) | const |
Definition at line 573 of file Record.cxx.
std::vector< uint64_t > dabc::RecordField::AsUIntVect | ( | ) | const |
Definition at line 631 of file Record.cxx.
std::vector< double > dabc::RecordField::AsDoubleVect | ( | ) | const |
Definition at line 691 of file Record.cxx.
std::vector< std::string > dabc::RecordField::AsStrVect | ( | ) | const |
Definition at line 923 of file Record.cxx.
dabc::Buffer dabc::RecordField::AsBuffer | ( | ) | const |
Definition at line 969 of file Record.cxx.
dabc::Reference dabc::RecordField::AsReference | ( | ) | const |
Definition at line 976 of file Record.cxx.
std::string dabc::RecordField::AsJson | ( | ) | const |
Returns field value in JSON format.
Definition at line 835 of file Record.cxx.
bool dabc::RecordField::SetValue | ( | const RecordField & | src | ) |
Definition at line 1030 of file Record.cxx.
bool dabc::RecordField::SetNull | ( | ) |
Definition at line 1051 of file Record.cxx.
bool dabc::RecordField::SetBool | ( | bool | v | ) |
Definition at line 1060 of file Record.cxx.
bool dabc::RecordField::SetInt | ( | int64_t | v | ) |
Definition at line 1073 of file Record.cxx.
bool dabc::RecordField::SetDatime | ( | uint64_t | v | ) |
Definition at line 1083 of file Record.cxx.
bool dabc::RecordField::SetDatime | ( | const DateTime & | v | ) |
Definition at line 1095 of file Record.cxx.
bool dabc::RecordField::SetUInt | ( | uint64_t | v | ) |
Definition at line 1101 of file Record.cxx.
bool dabc::RecordField::SetDouble | ( | double | v | ) |
Definition at line 1114 of file Record.cxx.
bool dabc::RecordField::SetStr | ( | const std::string & | v | ) |
Definition at line 1127 of file Record.cxx.
bool dabc::RecordField::SetStr | ( | const char * | v | ) |
Definition at line 1144 of file Record.cxx.
bool dabc::RecordField::SetStrVect | ( | const std::vector< std::string > & | vect | ) |
Definition at line 1162 of file Record.cxx.
bool dabc::RecordField::SetBuffer | ( | const Buffer & | buf | ) |
Definition at line 1197 of file Record.cxx.
bool dabc::RecordField::SetReference | ( | const Reference & | ref | ) |
Definition at line 1210 of file Record.cxx.
bool dabc::RecordField::SetArrInt | ( | int64_t | size, |
int64_t * | arr, | ||
bool | owner = false |
||
) |
Set as array, if owner flag specified, one get ownership over array and do not need to create copy.
Definition at line 1224 of file Record.cxx.
bool dabc::RecordField::SetVectInt | ( | const std::vector< int64_t > & | v | ) |
Definition at line 1251 of file Record.cxx.
bool dabc::RecordField::SetArrUInt | ( | int64_t | size, |
uint64_t * | arr, | ||
bool | owner = false |
||
) |
Set as array, if owner flag specified, one get ownership over array and do not need to create copy.
Definition at line 1263 of file Record.cxx.
bool dabc::RecordField::SetVectUInt | ( | const std::vector< uint64_t > & | v | ) |
Definition at line 1287 of file Record.cxx.
bool dabc::RecordField::SetArrDouble | ( | int64_t | size, |
double * | arr, | ||
bool | owner = false |
||
) |
Set as array, if owner flag specified, one get ownership over array and do not need to create copy.
Definition at line 1312 of file Record.cxx.
bool dabc::RecordField::SetVectDouble | ( | const std::vector< double > & | v | ) |
Definition at line 1299 of file Record.cxx.
bool dabc::RecordField::SetArrStr | ( | int64_t | size, |
char * | arr, | ||
bool | owner = false |
||
) |
Sets as array of string, placed one after another in memory.
Definition at line 1336 of file Record.cxx.
uint64_t dabc::RecordField::StoreSize | ( | ) |
Definition at line 336 of file Record.cxx.
bool dabc::RecordField::Stream | ( | iostream & | s | ) |
Definition at line 343 of file Record.cxx.
|
static |
Definition at line 792 of file Record.cxx.
|
static |
Definition at line 813 of file Record.cxx.
|
static |
Definition at line 983 of file Record.cxx.
|
friend |
double dabc::RecordField::valueDouble |
union { ... } |
uint64_t* dabc::RecordField::arrUInt |
double* dabc::RecordField::arrDouble |
char* dabc::RecordField::valueStr |
Buffer* dabc::RecordField::valueBuf |
union { ... } |
|
protected |
|
protected |