IRdNumArray 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
IRdNumArray was designed to create 'array of numbers (floats)' - data object - single-dimensional or multi-dimensional
- It is more effective for storing float values than for storing Universal Array Data.
Member Function Documentation
| HRESULT IRdNumArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myNumberArray = System.CreateDO('Common Data Package/Number Array Data');
myNumberArray.Clear();
| HRESULT IRdNumArray::SetDim |
( |
[in] RtUlong |
ulDim |
) |
|
Set dimension of the array (default is 1 or single-dimensional array)
- Parameters:
-
| ulDim | [in] Dimension(s) to set array to. |
myNumberArray.SetDim(13);
| HRESULT IRdNumArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension(s) of the array.
- Returns:
- pulDim [out,retval] Return number of dimensions found in array.
var dimIs = myNumberArray.GetDim();
System.Alert(dimIs);
| HRESULT IRdNumArray::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 single-dimensional array.
- Parameters:
-
| psa | [in] Variable number of size integers - one for each dimension. |
Example: Define 2 dimensional array.
myNumberArray.SetDim(2);
myNumberArray.SetSize(10, 10);
| HRESULT IRdNumArray::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.
myNumberArray.GetSize(0);
myNumberArray.GetSize(3);
| HRESULT IRdNumArray::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.
myNumberArray.SetAt(2, 1.459);
Set item to multi-dimensional array.
myNumberArray.SetAt(3, 5, 9.853);
| HRESULT IRdNumArray::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 = myNumberArray.GetAt(5);
| HRESULT IRdNumArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
myNumberArray.Add(4.589);
| HRESULT IRdNumArray::InsertAt |
( |
[in] RtUlong |
ulIndex, |
|
|
[in] VARIANT |
newVal | |
|
) |
| | |
Insert new item at specified position, increasing array size.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| ulIndex | [in] Zero based array index. |
| newVal | [in] New item value. |
myNumberArray.InsertAt(1, 5.354);
| HRESULT IRdNumArray::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. |
myNumberArray.RemoveAt(1);
| HRESULT IRdNumArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myNumberArray = System.CreateDO('Common Data Package/Number Array Data');
myNumberArray.Clear();
| HRESULT IRdNumArray::SetDim |
( |
[in] RtUlong |
ulDim |
) |
|
Set dimension of the array (default is 1 or single-dimensional array)
- Parameters:
-
| ulDim | [in] Dimension(s) to set array to. |
myNumberArray.SetDim(13);
| HRESULT IRdNumArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension(s) of the array.
- Returns:
- pulDim [out,retval] Return number of dimensions found in array.
var dimIs = myNumberArray.GetDim();
System.Alert(dimIs);
| HRESULT IRdNumArray::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 single-dimensional array.
- Parameters:
-
| psa | [in] Variable number of size integers - one for each dimension. |
Example: Define 2 dimensional array.
myNumberArray.SetDim(2);
myNumberArray.SetSize(10, 10);
| HRESULT IRdNumArray::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.
myNumberArray.GetSize(0);
myNumberArray.GetSize(3);
| HRESULT IRdNumArray::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.
myNumberArray.SetAt(2, 1.459);
Set item to multi-dimensional array.
myNumberArray.SetAt(3, 5, 9.853);
| HRESULT IRdNumArray::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 = myNumberArray.GetAt(5);
| HRESULT IRdNumArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
myNumberArray.Add(4.589);
| HRESULT IRdNumArray::InsertAt |
( |
[in] RtUlong |
ulIndex, |
|
|
[in] VARIANT |
newVal | |
|
) |
| | |
Insert new item at specified position, increasing array size.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| ulIndex | [in] Zero based array index. |
| newVal | [in] New item value. |
myNumberArray.InsertAt(1, 5.354);
| HRESULT IRdNumArray::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. |
myNumberArray.RemoveAt(1);