#include <BxUnionCases.h>
Inheritance diagram for BxUnionCases:

Public Member Functions | |
| BxUnionCases () | |
| BxUnionCases (int, int) | |
| BxUnionCases (const BxUnionCases &) | |
| bool | add (BxUnionCase *) |
| BxUnionCase * | remove (int index) |
| void | clear () |
| BxUnionCase * | get (int index) const |
| BxDataObject * | getArm (int index) const |
| BxDataObject * | getArm (const BxDataObject &discriminant) const |
| BxUnionCase * | operator[] (int index) const |
|
|
Default constructor. Constructs an instance of the class BxUnionCases. Default attribute values are assigned as follows:
elementCount_ = 0;
capacity_ = 4;
incrementSize_ = 1;
|
|
||||||||||||
|
Construct a union cases object having a specified collection size and expansion size. The new union cases object holds a collection of the specified size. An empty collection to hold individual union cases is created. The maximum number of entries in the collection is specified by the input capacity number. The collection can be expanded in the specified increments. The method expand()should be used to increase the size of the collection stored in this object.
|
|
|
Construct a union cases object having attribute values identical to a specified instance of BxUnionCases. Attributes of the new union instance are initialised by copying attribute values from the specified input union cases object. Upon completion of the construction operation, the two union cases instances are independent. They do not share objects and they must be individually destructed.
|
|
|
Append a specified union case object to the end of this union cases collection. If an object has not been constructed to hold the collection or the collection is full, the collection is expanded by incrementSize_ entries.
|
|
|
Delete all the union case objects in the collection.
All union case objects in the collection are destructed and the collection size is set to zero. |
|
|
Returns the total number of union cases in the list.
|
|
|
Get a union case object from the collection. The object is specified by index position in the collection. The index position must be specified as a zero-based reference into the collection. If the specified index value is out of range for the number of entries in the collection, this method return a NULL pointer. If the specified index value is in range, then a pointer to the union case object is returned. The caller must not destruct the returned object as it is managed by this union cases object.
|
|
|
Get the data object value corresponding to a specified case selection entry in the collection.
A discriminant selection value specifies a case selection entry in this union case object. The data object value associated with the identified case selection entry (and originally read from the associated binary data file), is returned to the caller.
|
|
|
Get the data object value corresponding to a specified case selection entry in the collection.
An input index value specifies a case selection entry in this union case object. The data object value associated with the identified case selection entry (and originally read from the associated binary data file), is returned to the caller.
|
|
|
Overloaded operator [] provides array-like access to entries in the collection.
|
|
|
Extract a union case object specified by index position in the collection. The index position must be specified as a zero-based reference into the collection. If the specified index value is out of range, no action is performed by this method. The union case object is removed from the collectin and returned to the caller. The caller is responsible for destructing the object, based on the object type.
|
1.3.3