SerialHelper.h

Classes

SerialHelper --

(full description)


class SerialHelper

Types

enum shType

shtBOOL = 0
shtBYTE
shtSHORT
shtINT
shtFLOAT
shtDOUBLE
shtCOMPLEX
shtDCOMPLEX
shtSTRING

Interface

Public Members
SerialHelper(const Record& record) : gr(record)
SerialHelper(const SerialHelper& other)
virtual ~SerialHelper()
Bool getFuncType(String& ftype) const throw (InvalidSerializationError)
void checkFuncType(const String& ftype) const throw (InvalidSerializationError)
Bool exists(const String &name) const
void get(Bool &val, const String& name, uInt index = 0) const throw (InvalidSerializationError)
void get(Short &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 val& name, uInt index = 0) const throw (InvalidSerializationError)
void get(DComplex &val, const val& 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)
void get(Array<Short> &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 val& name) const throw (InvalidSerializationError)
void get(Array<DComplex> &val, const val& name) const throw (InvalidSerializationError)
void get(Array<String> &val, const String& name) const throw (InvalidSerializationError)
SerialHelper& operator=(const SerialHelper& other)
Protected Members
SerialHelper()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

enum shType

SerialHelper(const Record& record) : gr(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. gr is the record to extract from. False is returned if the record does not contain this field.

Thrown Exceptions

void 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 exists(const String &name) const

return True if a field with the given name exists

void get(Short &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 get(uChar &val, const String& name, uInt index = 0) const throw (InvalidSerializationError);

void get(Bool &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 val& name, uInt index = 0) const throw (InvalidSerializationError)
void get(DComplex &val, const val& 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)

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<Short> &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 get(Array void get(Array<Bool> &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 val& name) const throw (InvalidSerializationError)
void get(Array<DComplex> &val, const val& name) const throw (InvalidSerializationError)
void get(Array<String> &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:

SerialHelper& operator=(const SerialHelper& other)

SerialHelper()