casacore
|
#include <SerialHelper.h>
Public Types | |
enum | shType { shtBOOL, shtBYTE, shtSHORT, shtINT, shtFLOAT, shtDOUBLE, shtCOMPLEX, shtDCOMPLEX, shtSTRING } |
Public Member Functions | |
SerialHelper (const Record &record) | |
SerialHelper (const SerialHelper &other) | |
virtual | ~SerialHelper () |
Bool | getFuncType (String &ftype) const |
load the function type name as given in the record's "functype" field into the given String ftype. More... | |
void | checkFuncType (const String &ftype) const |
ensure that the Function type stored in the given record, gr, matches ftype. More... | |
Bool | exists (const String &name) const |
return True if a field with the given name exists More... | |
void | get (Bool &val, const String &name, uInt index=0) const |
Get the indexth element of the name field This should be particularly useful for Array objects with only one element, i.e. More... | |
void | get (Short &val, const String &name, uInt index=0) const |
void get(uChar &val, const String& name, uInt index = 0) const; More... | |
void | get (Int &val, const String &name, uInt index=0) const |
void | get (Float &val, const String &name, uInt index=0) const |
void | get (Double &val, const String &name, uInt index=0) const |
void | get (Complex &val, const String &name, uInt index=0) const |
void | get (DComplex &val, const String &name, uInt index=0) const |
void | get (String &val, const String &name, uInt index=0) const |
void | get (Record &val, const String &name) const |
void | get (Array< Bool > &val, const String &name) const |
Get the indexth element of the name field This should be particularly useful for Array objects with only one element, i.e. More... | |
void | get (Array< Short > &val, const String &name) const |
void get(Array<uChar &val, const String& name) const; More... | |
void | get (Array< Int > &val, const String &name) const |
void | get (Array< Float > &val, const String &name) const |
void | get (Array< Double > &val, const String &name) const |
void | get (Array< Complex > &val, const String &name) const |
void | get (Array< DComplex > &val, const String &name) const |
void | get (Array< String > &val, const String &name) const |
SerialHelper & | operator= (const SerialHelper &other) |
Static Public Attributes | |
static const String | FUNCTYPE |
static const String | gtype [] |
Protected Member Functions | |
SerialHelper () | |
Private Attributes | |
Record | gr |
Public interface
Definition at line 100 of file SerialHelper.h.
Enumerator | |
---|---|
shtBOOL | |
shtBYTE | |
shtSHORT | |
shtINT | |
shtFLOAT | |
shtDOUBLE | |
shtCOMPLEX | |
shtDCOMPLEX | |
shtSTRING |
Definition at line 104 of file SerialHelper.h.
|
inline |
Definition at line 107 of file SerialHelper.h.
|
inline |
Definition at line 108 of file SerialHelper.h.
References gr.
|
inlinevirtual |
Definition at line 109 of file SerialHelper.h.
|
inlineprotected |
Definition at line 184 of file SerialHelper.h.
void casacore::SerialHelper::checkFuncType | ( | const String & | ftype | ) | const |
ensure that the Function type stored in the given record, gr, matches ftype.
If it does not, an InvalidSerializationError is thrown.
return True if a field with the given name exists
Definition at line 127 of file SerialHelper.h.
References gr, and casacore::RecordInterface::isDefined().
Get the indexth element of the name field This should be particularly useful for Array objects with only one element, i.e.
a scalar. Note that unlike the native classes, indexing is zero-relative.
InvalidSerializationError is thrown if:
void get(uChar &val, const String& name, uInt index = 0) const;
Get the indexth element of the name field This should be particularly useful for Array objects with only one element, i.e.
a scalar. Note that unlike the native classes, indexing is zero-relative.
InvalidSerializationError is thrown if:
void get(Array<uChar &val, const String& name) const;
load the function type name as given in the record's "functype" field into the given String ftype.
gr is the record to extract from. False is returned if the record does not contain this field.
|
inline |
Definition at line 178 of file SerialHelper.h.
References gr.
|
static |
Definition at line 102 of file SerialHelper.h.
Referenced by casacore::FunctionMarshallable::loadFuncType().
|
private |
Definition at line 188 of file SerialHelper.h.
Referenced by exists(), operator=(), and SerialHelper().
|
static |
Definition at line 103 of file SerialHelper.h.