UM .NET API  6.16.1
com.latencybusters.lbm.sdm.LBMSDMFields Class Reference

LBMSDMFields is a utility class for LBMSDMessage to collect a set of fields. The intent of separating the set of fields from LBMSDMessage is to encourage reuse of the field set. More...

Inheritance diagram for com.latencybusters.lbm.sdm.LBMSDMFields:
com.latencybusters.lbm.sdm.LBMSDM

Public Member Functions

 LBMSDMFields ()
 Constructor for an empty field set.
 
 LBMSDMFields (LBMSDMFieldsAttribute user_attr)
 Constructor for an empty field set. More...
 
virtual void add (LBMSDMField newfield)
 Add an SDM field to the field set. More...
 
virtual void set (LBMSDMField field)
 Overwrite/set an existing field based on the name. More...
 
virtual void set (LBMSDMField field, int idx)
 Overwrite/set an existing field based on the field set index. More...
 
virtual void set (LBMSDMField newfield, int fieldidx, int arrayidx)
 Overwrite/set an existing field based on the field set index and array element. More...
 
virtual int length ()
 Get the number of fields in the field set. More...
 
virtual LBMSDMField get (int pos)
 Get a field by the index. More...
 
virtual LBMSDMFieldsAttribute get_attr ()
 Get the field set attributes are associated with this message A copy is returned. More...
 
virtual void remove (int pos)
 Remove a field by specifying the index. More...
 
virtual void remove (System.String name)
 Remove a field by specifying the name. More...
 
virtual System.Collections.IEnumerator iterator ()
 Get the default iterator for this field set. More...
 
override System.String ToString ()
 Dump the string representation of this field set which includes the fields. More...
 
virtual System.String toDbgString ()
 Dump the internal representation of this field set which includes the fields. More...
 
virtual new System.Object Clone ()
 Get a copy of this object. More...
 
virtual LBMSDMField locate (System.String name)
 Get a field in the field set based on the name. Note calling locate() many times on the same message is not optimal. When processing multiple fields in a message, looping through by index and comparing the name may be more efficient, eliminating unnecessary string compares. More...
 
virtual void set_debug_level (int level)
 Set the debug level for processing this SDM message. Currently all debugs go to standard out. More...
 
virtual void log (System.String s)
 Log an event. If debug level is set greater than 0, output to stderr. More...
 

Public Attributes

const int DEBUG_BASIC = 1
 Debug flag for basic debug output.
 
const int DEBUG_VERBOSE_PARSING = 2
 Debug flag for verbose message parsing output.
 

Detailed Description

LBMSDMFields is a utility class for LBMSDMessage to collect a set of fields. The intent of separating the set of fields from LBMSDMessage is to encourage reuse of the field set.

Constructor & Destructor Documentation

com.latencybusters.lbm.sdm.LBMSDMFields.LBMSDMFields ( LBMSDMFieldsAttribute  user_attr)

Constructor for an empty field set.

Parameters
user_attrUser attribute object setting options for this field set

References com.latencybusters.lbm.sdm.LBMSDMFieldsAttribute.Clone().

Member Function Documentation

virtual void com.latencybusters.lbm.sdm.LBMSDMFields.add ( LBMSDMField  newfield)
virtual

Add an SDM field to the field set.

same name as a field already in the field set

LBMSDMDuplicateFieldException when adding a field with the

LBMSDMException when an unexpected error occurs within LBMSDM

Parameters
newfieldThe new field to be added

References com.latencybusters.lbm.sdm.LBMSDMField.get_name().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.add().

virtual new System.Object com.latencybusters.lbm.sdm.LBMSDMFields.Clone ( )
virtual

Get a copy of this object.

Returns
A new object with a copy

References com.latencybusters.lbm.sdm.LBMSDMFields.Clone().

Referenced by com.latencybusters.lbm.sdm.LBMSDMFields.Clone(), and com.latencybusters.lbm.sdm.LBMSDMessage.Clone().

virtual LBMSDMField com.latencybusters.lbm.sdm.LBMSDMFields.get ( int  pos)
virtual

Get a field by the index.

Parameters
posThe index of the field required
Returns
The LBMSDMField object

Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldIterator.get(), and com.latencybusters.lbm.sdm.LBMSDMessage.get().

virtual LBMSDMFieldsAttribute com.latencybusters.lbm.sdm.LBMSDMFields.get_attr ( )
virtual

Get the field set attributes are associated with this message A copy is returned.

Returns
LBMSDMFieldsAttribute object

References com.latencybusters.lbm.sdm.LBMSDMFieldsAttribute.Clone().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.get_attr().

virtual System.Collections.IEnumerator com.latencybusters.lbm.sdm.LBMSDMFields.iterator ( )
virtual

Get the default iterator for this field set.

Returns
An Iterator of type LBMSDMFieldIterator
virtual int com.latencybusters.lbm.sdm.LBMSDMFields.length ( )
virtual

Get the number of fields in the field set.

Returns
The number of fields in the field set

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.count(), com.latencybusters.lbm.sdm.LBMSDMessage.data(), and com.latencybusters.lbm.sdm.LBMSDMFieldIterator.MoveNext().

virtual LBMSDMField com.latencybusters.lbm.sdm.LBMSDMFields.locate ( System.String  name)
virtual

Get a field in the field set based on the name. Note calling locate() many times on the same message is not optimal. When processing multiple fields in a message, looping through by index and comparing the name may be more efficient, eliminating unnecessary string compares.

Parameters
nameThe name of the field to be searched for.
Returns
the LBMSDMField or null

References com.latencybusters.lbm.sdm.LBMSDMFieldIterator.Current, com.latencybusters.lbm.sdm.LBMSDMField.get_name(), and com.latencybusters.lbm.sdm.LBMSDMFieldIterator.MoveNext().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.locate().

virtual void com.latencybusters.lbm.sdm.LBMSDM.log ( System.String  s)
virtualinherited

Log an event. If debug level is set greater than 0, output to stderr.

Parameters
sString containing the event to log
virtual void com.latencybusters.lbm.sdm.LBMSDMFields.remove ( int  pos)
virtual

Remove a field by specifying the index.

Parameters
posThe index of the field

Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldIterator.remove(), and com.latencybusters.lbm.sdm.LBMSDMessage.remove().

virtual void com.latencybusters.lbm.sdm.LBMSDMFields.remove ( System.String  name)
virtual

Remove a field by specifying the name.

Parameters
nameThe field name to be removed
virtual void com.latencybusters.lbm.sdm.LBMSDMFields.set ( LBMSDMField  field)
virtual

Overwrite/set an existing field based on the name.

LBMSDMAddingFieldException when the field doesn't exist

Parameters
fieldThe new field value

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.set(), and com.latencybusters.lbm.sdm.LBMSDMFieldIterator.set().

virtual void com.latencybusters.lbm.sdm.LBMSDMFields.set ( LBMSDMField  field,
int  idx 
)
virtual

Overwrite/set an existing field based on the field set index.

LBMSDMAddingFieldException when the field doesn't exist

LBMSDMTypeMismatchException when the field isnt the same type as the element

Parameters
fieldThe new field value
idxThe index into the field set of the field

References com.latencybusters.lbm.sdm.LBMSDMField.get_name().

virtual void com.latencybusters.lbm.sdm.LBMSDMFields.set ( LBMSDMField  newfield,
int  fieldidx,
int  arrayidx 
)
virtual

Overwrite/set an existing field based on the field set index and array element.

LBMSDMAddingFieldException when the field doesn't exist

LBMSDMTypeMismatchException when the field isnt the same type as the element

Parameters
newfieldThe new field value
fieldidxThe index into the field set of the field
arrayidxThe element in the array to be set

References com.latencybusters.lbm.sdm.LBMSDMField.set().

virtual void com.latencybusters.lbm.sdm.LBMSDM.set_debug_level ( int  level)
virtualinherited

Set the debug level for processing this SDM message. Currently all debugs go to standard out.

Parameters
levelDebug level to set
virtual System.String com.latencybusters.lbm.sdm.LBMSDMFields.toDbgString ( )
virtual

Dump the internal representation of this field set which includes the fields.

Returns
A string

References com.latencybusters.lbm.sdm.LBMSDMField.toDbgString().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.toDbgString(), and com.latencybusters.lbm.sdm.LBMSDMessage.ToString().

override System.String com.latencybusters.lbm.sdm.LBMSDMFields.ToString ( )

Dump the string representation of this field set which includes the fields.

Returns
A string

The documentation for this class was generated from the following file: