GlishSerialHelper.h

Classes

GlishSerialHelper --

(full description)


class GlishSerialHelper

Interface

Public Members
GlishSerialHelper(const GlishRecord& record) : gr(record)
GlishSerialHelper(const GlishSerialHelper& other)
virtual ~GlishSerialHelper()
Bool getFuncType(String& ftype) const throw (InvalidGlishSerializationError)
void checkFuncType(const String& ftype) const throw (InvalidGlishSerializationError)
Bool exists(const String &name) const
void get(Bool &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Short &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Int &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Float &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Double &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Complex &val, const val& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(DComplex &val, const val& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(String &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(GlishRecord &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Bool> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Short> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Int> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Float> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Double> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Complex> &val, const val& name) const throw (InvalidGlishSerializationError)
void get(Array<DComplex> &val, const val& name) const throw (InvalidGlishSerializationError)
void get(Array<String> &val, const String& name) const throw (InvalidGlishSerializationError)
GlishSerialHelper& operator=(const GlishSerialHelper& other)
Protected Members
GlishSerialHelper()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

GlishSerialHelper(const GlishRecord& record) : gr(record)

GlishSerialHelper(const GlishSerialHelper& other)

virtual ~GlishSerialHelper()

Bool getFuncType(String& ftype) const throw (InvalidGlishSerializationError)

load the function type name as given in the record's "functype" field into the given String ftype. gr is the Glish record to extract from. False is returned if the record does not contain this field.

Thrown Exceptions

void checkFuncType(const String& ftype) const throw (InvalidGlishSerializationError)

ensure that the Function type stored in the given record, gr, matches ftype. If it does not, an InvalidGlishSerializationError 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 (InvalidGlishSerializationError)

Get the indexth element of the name field This should be particularly useful for GlishArray objects with only one element, i.e. a scalar. Note that unlike the native Glish classes, indexing is zero-relative.

InvalidGlishSerializationError is thrown if:

void get(uChar &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError);

void get(Bool &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Int &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Float &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Double &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(Complex &val, const val& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(DComplex &val, const val& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(String &val, const String& name, uInt index = 0) const throw (InvalidGlishSerializationError)
void get(GlishRecord &val, const String& name) const throw (InvalidGlishSerializationError)

Get the indexth element of the name field This should be particularly useful for GlishArray objects with only one element, i.e. a scalar. Note that unlike the native Glish classes, indexing is zero-relative.

InvalidGlishSerializationError is thrown if:

void get(Array<Short> &val, const String& name) const throw (InvalidGlishSerializationError)

Get the indexth element of the name field This should be particularly useful for GlishArray objects with only one element, i.e. a scalar. Note that unlike the native Glish classes, indexing is zero-relative.

InvalidGlishSerializationError is thrown if:

void get(Array void get(Array<Bool> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Int> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Float> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Double> &val, const String& name) const throw (InvalidGlishSerializationError)
void get(Array<Complex> &val, const val& name) const throw (InvalidGlishSerializationError)
void get(Array<DComplex> &val, const val& name) const throw (InvalidGlishSerializationError)
void get(Array<String> &val, const String& name) const throw (InvalidGlishSerializationError)

Get the indexth element of the name field This should be particularly useful for GlishArray objects with only one element, i.e. a scalar. Note that unlike the native Glish classes, indexing is zero-relative.

InvalidGlishSerializationError is thrown if:

GlishSerialHelper& operator=(const GlishSerialHelper& other)

GlishSerialHelper()