CharArrayInDS struct | QSYS API Reference Guide
Estimated reading time: 6 minutes
Describes a fixed size array of characters contained in a DataStructure.
Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll
Constructors
| Name | Description |
|---|---|
| CharArrayInDS(DataStructure, Int32, Int32) | Constructs a fixed size array of characters in a Data Structure. |
| CharArrayInDS(MultiDataStructure, Int32, Int32) | Constructs a fixed size array of characters in a Multiple Occurrence Data Structure. |
CharArrayInDS(DataStructure, Int32, Int32)
Constructs a fixed size array of characters in a Data Structure.
CharArrayInDS(DataStructure, Int32, Int32)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| DataStructure | parent | The DataStructure containing this array of characters. |
| Int32 | startPos | The starting position of the array within the DataStructure buffer. |
| Int32 | skipPositions | For non-contiguous arrays, the number of position between two consecutive array elements. |
CharArrayInDS(MultiDataStructure, Int32, Int32)
Constructs a fixed size array of characters in a Multiple Occurrence Data Structure.
CharArrayInDS(MultiDataStructure, Int32, Int32)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| MultiDataStructure | parent | The MultiDataStructure containing this array of characters. |
| Int32 | startPos | The starting position of the array within the DataStructure buffer. |
| Int32 | skipPositions | For non-contiguous arrays, the number of position between two consecutive array elements. |
Properties
| Type | Name | Description |
|---|---|---|
| Char | Item | Indexer over the array, gets or sets the char element at that position. |
| Int32 | Length | Gets the total number of elements in the array. |
| DataStructure | ParentDS | Gets the Data Structure to which this field belongs. |
| Int32 | SkipPositions | For non-contiguous arrays, gets the number of buffer positions between consecutive array elements. 0 otherwise. |
| Int32 | StartPosition | Gets the Data Structure buffer position where this array starts. |
Methods
| Signature | Description |
|---|---|
| Clear() | Sets all array elements to blank. |
| CopyFrom(Char[], Int32) | Copies elements from a char[] into this array. |
| Equals(Object) | Equality comparer. |
| GetEnumerator() | Returns an enumerator that iterates through the array. |
| GetHashCode() | Computes the hashcode. |
| GetStartingPosition(Int32) | Gets the starting position in the DataStructure buffer of the element indicated by the index parameter. |
| op_Equality(CharArrayInDS<TDim>, CharArrayInDS<TDim>) | Operator ==, returns true if the operands are equal. |
| op_Explicit(CharArrayInDS<TDim>) | Casting operator to char[]. Returns a copy of the array as a char[]. |
| op_Inequality(CharArrayInDS<TDim>, CharArrayInDS<TDim>) | Operator !=, returns true if the operands are not equal. |
| Sort(Boolean, Int32, Int32) | Sorts a range of elements in the array in ascending or descending order. |
| To() | Copies the array to a char[]. |
void Clear()
Sets all array elements to blank.
void Clear()
void CopyFrom(Char[] sourceArray, int targetStartAt)
Copies elements from a char[] into this array.
void CopyFrom(Char[] sourceArray, int targetStartAt)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| Char[] | sourceArray | The array to copy from. |
| Int32 | targetStartAt | The index in this array where the copying should start. |
bool Equals(object obj)
Equality comparer.
bool Equals(object obj)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| Object | obj | Object to compare against. |
Returns
| Type | Description |
|---|---|
| Boolean | True in obj is an array of characters and the corresponding elements are equal. |
IEnumerator GetEnumerator()
Returns an enumerator that iterates through the array.
IEnumerator<char> GetEnumerator()
int GetHashCode()
Computes the hashcode.
int GetHashCode()
int GetStartingPosition(int index)
Gets the starting position in the DataStructure buffer of the element indicated by the index parameter.
int GetStartingPosition(int index)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| Int32 | index | The index of the desired element. |
Returns
| Type | Description |
|---|---|
| Int32 | The position in the buffer of the element at the given index. |
bool op_Equality(CharArrayInDS<TDim> left, CharArrayInDS<TDim> right)
Operator ==, returns true if the operands are equal.
bool op_Equality(CharArrayInDS<TDim> left, CharArrayInDS<TDim> right)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| CharArrayInDS<TDim> | left | Left operand. |
| CharArrayInDS<TDim> | right | Right operand. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the operands are equal, false otherwise. |
Char[] op_Explicit(CharArrayInDS<TDim> array)
Casting operator to char[]. Returns a copy of the array as a char[].
Char[] op_Explicit(CharArrayInDS<TDim> array)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| CharArrayInDS<TDim> | array | The array to copy. |
Returns
| Type | Description |
|---|---|
| Char[] |
bool op_Inequality(CharArrayInDS<TDim> left, CharArrayInDS<TDim> right)
Operator !=, returns true if the operands are not equal.
bool op_Inequality(CharArrayInDS<TDim> left, CharArrayInDS<TDim> right)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| CharArrayInDS<TDim> | left | Left operand. |
| CharArrayInDS<TDim> | right | Right operand. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the operands are NOT equal, false otherwise. |
void Sort(bool ascending, int start, int length)
Sorts a range of elements in the array in ascending or descending order.
void Sort(bool ascending, int start, int length)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| Boolean | ascending | True (default) for ascending. |
| Int32 | start | The starting index of the range to sort. Default is 0. |
| Int32 | length | The number of elements in the range to sort. Default is -1, which means sort all elements. |
Char[] To()
Copies the array to a char[].
Char[] To()