casa
$Rev:20696$
|
#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 throw (InvalidSerializationError) |
load the function type name as given in the record's "functype" field into the given String ftype. | |
void | checkFuncType (const String &ftype) const throw (InvalidSerializationError) |
ensure that the Function type stored in the given record, gr, matches ftype. | |
Bool | exists (const String &name) const |
return True if a field with the given name exists | |
void | get (Bool &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
Get the indexth element of the name field This should be particularly useful for Array objects with only one element, i.e. | |
void | get (Short &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void get(uChar &val, const String& name, uInt index = 0) const throw (InvalidSerializationError); | |
void | get (Int &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void | get (Float &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void | get (Double &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void | get (Complex &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void | get (DComplex &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void | get (String &val, const String &name, uInt index=0) const throw (InvalidSerializationError) |
void | get (Record &val, const String &name) const throw (InvalidSerializationError) |
void | get (Array< Bool > &val, const String &name) const throw (InvalidSerializationError) |
Get the indexth element of the name field This should be particularly useful for Array objects with only one element, i.e. | |
void | get (Array< Short > &val, const String &name) const throw (InvalidSerializationError) |
void get(Array<uChar &val, const String& name) const throw (InvalidSerializationError); | |
void | get (Array< Int > &val, const String &name) const throw (InvalidSerializationError) |
void | get (Array< Float > &val, const String &name) const throw (InvalidSerializationError) |
void | get (Array< Double > &val, const String &name) const throw (InvalidSerializationError) |
void | get (Array< Complex > &val, const String &name) const throw (InvalidSerializationError) |
void | get (Array< DComplex > &val, const String &name) const throw (InvalidSerializationError) |
void | get (Array< String > &val, const String &name) const throw (InvalidSerializationError) |
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
<h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl>
Definition at line 101 of file SerialHelper.h.
Definition at line 105 of file SerialHelper.h.
casa::SerialHelper::SerialHelper | ( | const Record & | record | ) | [inline] |
Definition at line 108 of file SerialHelper.h.
casa::SerialHelper::SerialHelper | ( | const SerialHelper & | other | ) | [inline] |
Definition at line 109 of file SerialHelper.h.
References gr.
virtual casa::SerialHelper::~SerialHelper | ( | ) | [inline, virtual] |
Definition at line 110 of file SerialHelper.h.
casa::SerialHelper::SerialHelper | ( | ) | [inline, protected] |
Definition at line 206 of file SerialHelper.h.
void casa::SerialHelper::checkFuncType | ( | const String & | ftype | ) | const throw (InvalidSerializationError) |
ensure that the Function type stored in the given record, gr, matches ftype.
If it does not, an InvalidSerializationError is thrown.
Bool casa::SerialHelper::exists | ( | const String & | name | ) | const [inline] |
return True if a field with the given name exists
Definition at line 130 of file SerialHelper.h.
void casa::SerialHelper::get | ( | Bool & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
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 casa::SerialHelper::get | ( | Short & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void get(uChar &val, const String& name, uInt index = 0) const throw (InvalidSerializationError);
void casa::SerialHelper::get | ( | Int & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Float & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Double & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Complex & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | DComplex & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | String & | val, |
const String & | name, | ||
uInt | index = 0 |
||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Record & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Array< Bool > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
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 casa::SerialHelper::get | ( | Array< Short > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void get(Array<uChar &val, const String& name) const throw (InvalidSerializationError);
void casa::SerialHelper::get | ( | Array< Int > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Array< Float > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Array< Double > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Array< Complex > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Array< DComplex > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
void casa::SerialHelper::get | ( | Array< String > & | val, |
const String & | name | ||
) | const throw (InvalidSerializationError) |
Bool casa::SerialHelper::getFuncType | ( | String & | ftype | ) | const throw (InvalidSerializationError) |
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.
SerialHelper& casa::SerialHelper::operator= | ( | const SerialHelper & | other | ) | [inline] |
const String casa::SerialHelper::FUNCTYPE [static] |
Definition at line 103 of file SerialHelper.h.
Referenced by casa::FunctionMarshallable::loadFuncType().
Record casa::SerialHelper::gr [private] |
Definition at line 210 of file SerialHelper.h.
Referenced by operator=(), and SerialHelper().
const String casa::SerialHelper::gtype[] [static] |
Definition at line 104 of file SerialHelper.h.