IRdIntArray Interface Reference
Inherits IDispatch, and IDispatch.
List of all members.
|
Public Member Functions |
| HRESULT | Clear (void) |
| HRESULT | SetDim ([in] RtUlong ulDim) |
| HRESULT | GetDim ([out, retval] RtUlong *pulDim) |
| HRESULT | SetSize ([in, satype(VARIANT)]SAFEARRAY *psa) |
| HRESULT | GetSize ([in, optional] VARIANT optionalDim,[out, retval] RtUlong *pulSize) |
| HRESULT | SetAt ([in, satype(VARIANT)]SAFEARRAY *psa) |
| HRESULT | GetAt ([in, satype(VARIANT)]SAFEARRAY *psa,[out, retval] VARIANT *pVal) |
| HRESULT | Add ([in] VARIANT newVal) |
| HRESULT | InsertAt ([in] RtUlong ulIndex,[in] VARIANT newVal) |
| HRESULT | RemoveAt ([in] RtUlong ulIndex) |
| HRESULT | Clear (void) |
| HRESULT | SetDim ([in] RtUlong ulDim) |
| HRESULT | GetDim ([out, retval] RtUlong *pulDim) |
| HRESULT | SetSize ([in, satype(VARIANT)]SAFEARRAY *psa) |
| HRESULT | GetSize ([in, optional] VARIANT optionalDim,[out, retval] RtUlong *pulSize) |
| HRESULT | SetAt ([in, satype(VARIANT)]SAFEARRAY *psa) |
| HRESULT | GetAt ([in, satype(VARIANT)]SAFEARRAY *psa,[out, retval] VARIANT *pVal) |
| HRESULT | Add ([in] VARIANT newVal) |
| HRESULT | InsertAt ([in] RtUlong ulIndex,[in] VARIANT newVal) |
| HRESULT | RemoveAt ([in] RtUlong ulIndex) |
Detailed Description
IRdIntArray was designed to create an 'array of integers' data object:
- Single dimensional or multi-dimensional.
- It is more effective for storing integer values than for storing Universal Array Data.
Member Function Documentation
| HRESULT IRdIntArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myIntArray = System.CreateDO('Common Data Package/Int Array Data');
myIntArray.Clear();
| HRESULT IRdIntArray::SetDim |
( |
[in] RtUlong |
ulDim |
) |
|
Set dimension of the array (default is 1 or single-dimensional array).
- Parameters:
-
| ulDim | [in] Dimension value to set. |
| HRESULT IRdIntArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension of the array.
- Returns:
- pulDim [out,retval] Return dimension.
| HRESULT IRdIntArray::SetSize |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa |
) |
|
Set array size (one number for each dimension).
- Note: The Add method automatically increase the size in case of a single-dimensional array.
- Parameters:
-
| psa | [in] Variable number of size integers - one for each dimension. |
Example: Define multi-dimensional array:
myIntArray.SetDim(2);
myIntArray.SetSize(10, 10);
| HRESULT IRdIntArray::GetSize |
( |
[in, optional] VARIANT |
optionalDim, |
|
|
[out, retval] RtUlong * |
pulSize | |
|
) |
| | |
Get array size (one number for each dimension).
- Parameters:
-
| optionalDim | [in] Optional, requested dimension to get size for (zero-based). |
- Returns:
- pulSize [out,retval] Return size for given dimension.
var sizeIs = myIntArray.GetSize();
System.Alert(sizeIs);
Example: Multi-dimensional:
var sizeIs = myIntArray.GetSize(2);
System.Alert(sizeIs);
| HRESULT IRdIntArray::SetAt |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa |
) |
|
Set one item to the array at given position.
- Array indices are zero-based.
- Parameters:
-
| psa | [in] Variable number of item coordinates, the last parameter is the item value to be set. |
Example: Set item to single-dimensional array:
Example: Set item to multi-dimensional array:
myIntArray.SetAt(3, 5, 13);
| HRESULT IRdIntArray::GetAt |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa, |
|
|
[out, retval] VARIANT * |
pVal | |
|
) |
| | |
Get one item from array at given position.
- Array indices are zero-based.
- Parameters:
-
| psa | [in] Variable number of item coordinates. |
- Returns:
- pVal [out,retval] Return item value.
Example: Get item from single-dimensional array:
var item = myIntArray.GetAt(5);
Example: Get item from multi-dimensional array:
var item = myIntArray.GetAt(1,5);
| HRESULT IRdIntArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array:
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
| HRESULT IRdIntArray::InsertAt |
( |
[in] RtUlong |
ulIndex, |
|
|
[in] VARIANT |
newVal | |
|
) |
| | |
Insert new item at specified position, increasing array size:
- Note: only works for single-dimensional arrays!
- In example below, first value is position and second value is value to be inserted at the position.
- Parameters:
-
| ulIndex | [in] Zero based array index. |
| newVal | [in] New item value. |
myIntArray.InsertAt(1,5);
| HRESULT IRdIntArray::RemoveAt |
( |
[in] RtUlong |
ulIndex |
) |
|
Remove item with specified index, decreasing array size:
- Note: only works for single-dimensional arrays!
- Parameters:
-
| ulIndex | [in] Zero based array index. |
| HRESULT IRdIntArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myIntArray = System.CreateDO('Common Data Package/Int Array Data');
myIntArray.Clear();
| HRESULT IRdIntArray::SetDim |
( |
[in] RtUlong |
ulDim |
) |
|
Set dimension of the array (default is 1 or single-dimensional array).
- Parameters:
-
| ulDim | [in] Dimension value to set. |
| HRESULT IRdIntArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension of the array.
- Returns:
- pulDim [out,retval] Return dimension.
| HRESULT IRdIntArray::SetSize |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa |
) |
|
Set array size (one number for each dimension).
- Note: The Add method automatically increase the size in case of a single-dimensional array.
- Parameters:
-
| psa | [in] Variable number of size integers - one for each dimension. |
Example: Define multi-dimensional array:
myIntArray.SetDim(2);
myIntArray.SetSize(10, 10);
| HRESULT IRdIntArray::GetSize |
( |
[in, optional] VARIANT |
optionalDim, |
|
|
[out, retval] RtUlong * |
pulSize | |
|
) |
| | |
Get array size (one number for each dimension).
- Parameters:
-
| optionalDim | [in] Optional, requested dimension to get size for (zero-based). |
- Returns:
- pulSize [out,retval] Return size for given dimension.
var sizeIs = myIntArray.GetSize();
System.Alert(sizeIs);
Example: Multi-dimensional:
var sizeIs = myIntArray.GetSize(2);
System.Alert(sizeIs);
| HRESULT IRdIntArray::SetAt |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa |
) |
|
Set one item to the array at given position.
- Array indices are zero-based.
- Parameters:
-
| psa | [in] Variable number of item coordinates, the last parameter is the item value to be set. |
Example: Set item to single-dimensional array:
Example: Set item to multi-dimensional array:
myIntArray.SetAt(3, 5, 13);
| HRESULT IRdIntArray::GetAt |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa, |
|
|
[out, retval] VARIANT * |
pVal | |
|
) |
| | |
Get one item from array at given position.
- Array indices are zero-based.
- Parameters:
-
| psa | [in] Variable number of item coordinates. |
- Returns:
- pVal [out,retval] Return item value.
Example: Get item from single-dimensional array:
var item = myIntArray.GetAt(5);
Example: Get item from multi-dimensional array:
var item = myIntArray.GetAt(1,5);
| HRESULT IRdIntArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array:
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
| HRESULT IRdIntArray::InsertAt |
( |
[in] RtUlong |
ulIndex, |
|
|
[in] VARIANT |
newVal | |
|
) |
| | |
Insert new item at specified position, increasing array size:
- Note: only works for single-dimensional arrays!
- In example below, first value is position and second value is value to be inserted at the position.
- Parameters:
-
| ulIndex | [in] Zero based array index. |
| newVal | [in] New item value. |
myIntArray.InsertAt(1,5);
| HRESULT IRdIntArray::RemoveAt |
( |
[in] RtUlong |
ulIndex |
) |
|
Remove item with specified index, decreasing array size:
- Note: only works for single-dimensional arrays!
- Parameters:
-
| ulIndex | [in] Zero based array index. |