IRdObjArray 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
IRdObjArray was designed to create universal array data object:
- Single-dimensional or multi-dimensional.
- Can store items of arbitrary types used in Rosetta (numerical, strings, Rosetta data objects).
Member Function Documentation
| HRESULT IRdObjArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myUniversalArray = System.CreateDO('Common Data Package/Universal Array Data');
myUniversalArray.Clear();
| HRESULT IRdObjArray::SetDim |
( |
[in] RtUlong |
ulDim |
) |
|
Set dimension of the array (default is 1 or single-dimension array).
- Parameters:
-
myUniversalArray.SetDim(1);
| HRESULT IRdObjArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension of the array
- Returns:
- pulDim [out, retval] Return dimension.
myUniversalArray.GetDim();
| HRESULT IRdObjArray::SetSize |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa |
) |
|
Set array size (one number for each dimension).
- Note: The Add method automatically increases the size in case of one-dimensional array.
- Parameters:
-
| psa | [in] Variable number of size integers - one for each dimension. |
Example: Define multi-dimensional array.
myUniversalArray.SetDim(2);
myUniversalArray.SetSize(10, 10);
| HRESULT IRdObjArray::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.
Example: Multi-dimensional:
var sizeIs = myUniversalArray.GetSize(2);
System.Alert(sizeIs);
| HRESULT IRdObjArray::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.
myUniversalArray.SetAt(2, "purple")
set item to a multi-dimensional array.
myUniversalArray.SetAt(3, 5, myIntArray)
| HRESULT IRdObjArray::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.
item = myUniversalArray.GetAt(5)
Example: Get item from multi-dimensional array:
var item = myUniversalArray.GetAt(1,5);
| HRESULT IRdObjArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
myUniversalArray.Add(4.789);
| HRESULT IRdObjArray::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. |
myUniversalArray.InsertAt(1, "blue");
| HRESULT IRdObjArray::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. |
myUniversalArray.RemoveAt(3);
| HRESULT IRdObjArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myUniversalArray = System.CreateDO('Common Data Package/Universal Array Data');
myUniversalArray.Clear();
| HRESULT IRdObjArray::SetDim |
( |
[in] RtUlong |
ulDim |
) |
|
Set dimension of the array (default is 1 or single-dimension array).
- Parameters:
-
myUniversalArray.SetDim(1);
| HRESULT IRdObjArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension of the array
- Returns:
- pulDim [out, retval] Return dimension.
myUniversalArray.GetDim();
| HRESULT IRdObjArray::SetSize |
( |
[in, satype(VARIANT)] SAFEARRAY * |
psa |
) |
|
Set array size (one number for each dimension).
- Note: The Add method automatically increases the size in case of one-dimensional array.
- Parameters:
-
| psa | [in] Variable number of size integers - one for each dimension. |
Example: Define multi-dimensional array.
myUniversalArray.SetDim(2);
myUniversalArray.SetSize(10, 10);
| HRESULT IRdObjArray::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.
Example: Multi-dimensional:
var sizeIs = myUniversalArray.GetSize(2);
System.Alert(sizeIs);
| HRESULT IRdObjArray::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.
myUniversalArray.SetAt(2, "purple")
set item to a multi-dimensional array.
myUniversalArray.SetAt(3, 5, myIntArray)
| HRESULT IRdObjArray::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.
item = myUniversalArray.GetAt(5)
Example: Get item from multi-dimensional array:
var item = myUniversalArray.GetAt(1,5);
| HRESULT IRdObjArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
myUniversalArray.Add(4.789);
| HRESULT IRdObjArray::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. |
myUniversalArray.InsertAt(1, "blue");
| HRESULT IRdObjArray::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. |
myUniversalArray.RemoveAt(3);