IRdStrArray 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, defaultvalue(-1)] int 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, defaultvalue(-1)] int 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
IRdStrArray was designed to create 'array of strings':
- It is more effective for storing string values than for storing Universal Array Data.
- Single dimensional or multi-dimensional.
Member Function Documentation
| HRESULT IRdStrArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myStringArray = System.CreateDO('Common Data Package/String Array Data');
myStringArray.Clear();
| HRESULT IRdStrArray::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. |
myStringArray.SetDim(13);
| HRESULT IRdStrArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension(s) of the array.
- Returns:
- pulDim [out,retval] Return number of dimensions found in array.
var dimIs = myStringArray.GetDim();
System.Alert(dimIs);
| HRESULT IRdStrArray::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.
myStringArray.SetDim(2);
myStringArray.SetSize(10, 10);
| HRESULT IRdStrArray::GetSize |
( |
[in, defaultvalue(-1)] int |
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.
myStringArray.GetSize(0);
myStringArray.GetSize(3);
| HRESULT IRdStrArray::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.
myStringArray.SetAt(2, "Houston we have lift-off");
Set item to multi-dimensional array.
myStringArray.SetAt(3, 5, "Houston we have touch-down");
| HRESULT IRdStrArray::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 = myStringArray.GetAt(5);
| HRESULT IRdStrArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
myStringArray.Add("beepbopbaloola");
| HRESULT IRdStrArray::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. |
myStringArray.InsertAt(1, "You will be assimilated!");
| HRESULT IRdStrArray::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. |
myStringArray.RemoveAt(1);
| HRESULT IRdStrArray::Clear |
( |
void |
|
) |
|
Clear (initialize) the data object.
var myStringArray = System.CreateDO('Common Data Package/String Array Data');
myStringArray.Clear();
| HRESULT IRdStrArray::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. |
myStringArray.SetDim(13);
| HRESULT IRdStrArray::GetDim |
( |
[out, retval] RtUlong * |
pulDim |
) |
|
Get dimension(s) of the array.
- Returns:
- pulDim [out,retval] Return number of dimensions found in array.
var dimIs = myStringArray.GetDim();
System.Alert(dimIs);
| HRESULT IRdStrArray::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.
myStringArray.SetDim(2);
myStringArray.SetSize(10, 10);
| HRESULT IRdStrArray::GetSize |
( |
[in, defaultvalue(-1)] int |
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.
myStringArray.GetSize(0);
myStringArray.GetSize(3);
| HRESULT IRdStrArray::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.
myStringArray.SetAt(2, "Houston we have lift-off");
Set item to multi-dimensional array.
myStringArray.SetAt(3, 5, "Houston we have touch-down");
| HRESULT IRdStrArray::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 = myStringArray.GetAt(5);
| HRESULT IRdStrArray::Add |
( |
[in] VARIANT |
newVal |
) |
|
Append new item to the array.
- Note: only works for single-dimensional arrays!
- Parameters:
-
| newVal | [in] New item value. |
myStringArray.Add("beepbopbaloola");
| HRESULT IRdStrArray::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. |
myStringArray.InsertAt(1, "You will be assimilated!");
| HRESULT IRdStrArray::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. |
myStringArray.RemoveAt(1);