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

Public Member Functions | |
| BxArray () | |
| BxArray (int dim) | |
| BxArray (const BxArray ©) | |
| virtual void | setByteOrder (BxByteOrder bo) |
| virtual char * | toString (bool xml) |
| virtual bool | toStream (FILE *) |
| virtual bool | toStreamBinary (FILE *) |
| int | getIndexFrom (int dim) const |
| int | getIndexTo (int dim) const |
| int | getCount (int dim) const |
| char * | getDimName (int dim) const |
| int | getElementSize () const |
| BxDataObject * | get (int d1, int d2) |
| BxDataObject * | get (int d1, int d2, int d3) |
| BxDataObject * | get (int d1, int d2, int d3, int d4) |
| BxDataObject * | getMore (int d1,...) |
| virtual BxDataObject * | get (int index) |
| virtual BxDataObject * | getNext () |
| void | setElementType (BxDataObject *elemObj) |
| void | setDimensions (int dims) |
| bool | setDimension (int, BxDimension *) |
| void | setIndexFrom (int dim, int from) |
| void | setIndexTo (int dim, int to) |
| void | addDimension (BxDimension *) |
| void | addDimensionInFront (BxDimension *) |
| bool | addElement (BxDataObject *) |
| void | toFirst () |
|
|
Default constructor. Constructs an instance of the class BxArray. Default attribute values are assigned as follows:
arrayOffset_ = 0;
dimensions_ = 0;
dims_ = NULL;
elementType_ = NULL;
arraybuf_ = NULL;
|
|
|
Construct an array having a specified number of dimensions. The dims_ attribute is created to store the specified number of dimensions, but the dimension descriptions stored in this attribute are set to NULL. Default values for the other attributes are assigned as follows:
arrayOffset = 0;
dimensions_ = <value of input parameter dim>;
dims_ = <a vector containing dim null-valued entries>;
elementType_ = NULL;
arraybuf_ = NULL;
|
|
|
Construct an array having attribute values identical to a specified BxArray object.
Attributes of the new array instance are initialized by copying attribute values from the specified input array. Uninitialized attribute values in the input array result in NULL valued attributes in the new array instance. If the attributes of the input array have been initialized, then the array structure of the new instance will be the same as the array structure of the input instance.
|
|
|
Append a description of an (N+1)th dimension to an existing N-dimensional array.
An array dimension is described by a BxDimension object. A pointer to the description object is appended to the end of the dims_ attribute list. The number of array dimensions is incremented by one.
|
|
|
Insert a description of a new 1st dimension, increasing the dimensions of an existing array.
An array dimension is described by a BxDimension object. The new dimension description is inserted at the beginning of the dims_ attribute list. The previously existing dimension description objects are moved forward one position in the list. The number of array dimensions is incremented by one.
|
|
|
Copy a single new data element value to the next (available) array buffer element.
Successive calls to this method result in sequentially appending new array data element values at the end of the array. This method remembers the position of the next available array buffer slot for storing a new element value. For each method call, a single data element value is appended to the array. The dimensionality of the array is ignored.
|
|
|
Get a copy of a single data element from an array.
The data element to be retrieved from the array is identified by a single index value into the array. If the array consists of multiple dimensions, then the caller is responsible for multiplying the dimension extents times the respective index values for the desired data element. The index value must be specified as a zero-based offset into the array.
Reimplemented in BxArrayVariable. |
|
||||||||||||||||||||
|
Get a copy of a single data element from a four-dimensional array.
The data element to be retrieved from the array is identified by an index value for each dimension of the four-dimensional array. The index parameters are ordered. The slowest-moving index value is first, and the fastest-moving index value is last. All index values must be specified as zero-based offsets into the array.
|
|
||||||||||||||||
|
Get a copy of a single data element from a three-dimensional array.
The data element to be retrieved from the array is identified by an index value for each dimension of the three-dimensional array. The index parameters are ordered. The slowest-moving index value is first, and the fastest-moving index value is last. All index values must be specified as zero-based offsets into the array.
|
|
||||||||||||
|
Get a copy of a single data element from a two-dimensional array.
The data element to be retrieved from the array is identified by an index value for each dimension of the two-dimensional array. The index parameters are ordered. The slow-moving index value is first, and the fast-moving index value is second. Both index values must be specified as zero-based offsets into the array.
|
|
|
Get the number of data elements in a specified dimension of an array.
The number of data elements in a specified dimension of an array is defined by the dimension description object associated with the specified dimension of the array. The array dimension must be specified as a zero-based offset into the list of dimensions.
|
|
|
Get the name of a specified dimension of an array.
The array dimension must be specified as a zero-based offset into the list of dimensions.
|
|
|
Get the size of a single data element stored by an array. The size of a data element is expressed as the number of bytes required to represent a single data element of the element type stored by the array.
|
|
|
Get the indexFrom value describing a specified dimension of an array.
The array dimension must be specified as a zero-based offset into the list of dimensions.
|
|
|
Get the indexTo value describing a specified dimension of an array.
The array dimension must be specified as a zero-based offset into the list of dimensions.
|
|
||||||||||||
|
Get a copy of a single data element from an N-dimensional array.
The data element to be retrieved from the array is identified by an index value for each dimension of the N-dimensional array. The number of index parameters must exactly match the number of dimensions for this array. The index parameters are ordered. The slowest-moving index value is first, and the fastest-moving index value is last. All index values must be specified as zero-based offsets into the array.
|
|
|
Get the next (available) single data element from an array.
Successive calls to this method result in a sequential retrieval of array data element values. This method remembers the position of the next value to be retrieved. For each method call, a single data element value is retrieved and returned based on the order in which the element values are stored within the array. The dimensionality of the array is ignored.
Reimplemented in BxArrayVariable. |
|
|
Set byte order for elements in an array. Set the byte order for value associated with the array and the element type for the elements of the array.
Reimplemented from BxDataObject. |
|
||||||||||||
|
Set or reset the dimension description for a specific dimension of an array.
An array dimension is described by a BxDimension object. The new dimension description is inserted in the dims_ attribute list at the specified position, replacing any dimension description previously occupying that position in the list. The position must be specified as a zero-based offset into the list. The number of array dimensions is unchanged by this method.
|
|
|
Set or reset the number of array dimensions for an existing array instance.
If the number of dimenions for this array has been set previously, then the number of dimensions is reset to the newly specified number. The dims_ attributes, describing each dimension of the array is released, a new dims_ attribute of appropriate size is created and each entry is set to NULL. Use BxArray::setDimension to initialise these attribute values.
|
|
|
Set or reset the type of data element stored by an array.
Sets the array attribute recording the type of data elements stored by the array. An array element type is described by an instance of type BxDataObject.
|
|
||||||||||||
|
Set indexFrom value for a specified dimension of an array.
Deprecated in version 1.0.
|
|
||||||||||||
|
Set indexTo value for a specified dimension of an array.
Deprecated in version 1.0.
|
|
|
Reset the array buffer pointer to the first element in the buffer.
The array buffer pointer is used by the getNext() method to sequentially retrieve data element values from the array buffer. |
|
|
Write the implicit and complete XML (DataBinX) representation for an array to a file.
The BinX XML schema for this array is combined with the array data element values to create a DataBinX file.
<arrayFixed varName="x" typeName="x">
<dim name="d2" index="1">
<dim name="d1" index="1">
<short-16>11</short-16>
</dim>
<dim name="d1" index="2">
<short-16>12</short-16>
</dim>
<dim name="d1" index="3">
<short-16>13</short-16>
</dim>
<dim name="d1" index="4">
<short-16>14</short-16>
</dim>
</dim>
<dim name="d2" index="2">
<dim name="d1" index="1">
<short-16>21</short-16>
</dim>
<dim name="d1" index="2">
<short-16>22</short-16>
</dim>
<dim name="d1" index="3">
<short-16>23</short-16>
</dim>
<dim name="d1" index="4">
<short-16>24</short-16>
</dim>
</dim>
</arrayFixed>
Reimplemented from BxDataObject. Reimplemented in BxArrayVariable. |
|
|
Write all of the data element values of an array to a binary file. The file must be open for writing in binary mode.
Reimplemented from BxDataObject. Reimplemented in BxArrayVariable. |
|
|
Build a printable string containing a closed BinX XML schema definition for an array. The resulting string includes:
This method appends the closing XML tag to the end of the returned string. To obtain an unclosed XML string, to which additional XML elements can be appended, use the method BxArray::toArrayHeader. This method is reimplemented from the base class BxDataObject. The semantic of the reimplementation are modified as follows:
If the input parameter value is true, then the schema corresponding to the array dimension descriptions will be listed in the reverse order to which they are stored in the array object attribute named dims_. This method allocates memory to hold the returned BinX XML schema string. The caller is responsible for releasing the memory when the string is no longer needed.
Reimplemented from BxDataObject. |
1.3.3