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 IRsGenArray::Clear | ( | void | ) |
Clear (initialize) the data object
| HRESULT IRsGenArray::SetDim | ( | [in] RtUlong | ulDim | ) |
Set dimension of the array (default is 1)
| ulDim | - dimension |
| HRESULT IRsGenArray::GetDim | ( | [out, retval] RtUlong * | pulDim | ) |
Get dimension of the array
| pulDim | - return dimension |
| HRESULT IRsGenArray::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 one-dim array.
| psa | - variable number of size integers - one for each dimension |
array.SetDim(2); array.SetSize(10, 10);
| HRESULT IRsGenArray::GetSize | ( | [in, optional] VARIANT | optionalDim, | |
| [out, retval] RtUlong * | pulSize | |||
| ) |
Get array size (one number for each dimension).
| optionalDim | - optional, requested dimension to get size for (zero-based) | |
| pulSize | - return size for given dimension |
| HRESULT IRsGenArray::SetAt | ( | [in, satype(VARIANT)] SAFEARRAY * | psa | ) |
Set one item to the array at given position. Array indices are zero-based.
| psa | - variable number of item coordinates, the last parameter is the item value to be set |
array.SetAt(2, "foosa")
set item to 2 dim array
array.SetAt(3, 5, myObject)
| HRESULT IRsGenArray::GetAt | ( | [in, satype(VARIANT)] SAFEARRAY * | psa, | |
| [out, retval] VARIANT * | pVal | |||
| ) |
Get one item from array at given position. Array indices are zero-based.
| psa | - variable number of item coordinates | |
| pVal | - return item value |
Example: get item from 1 dim array
item = array.GetAt(5)
| HRESULT IRsGenArray::Add | ( | [in] VARIANT | newVal | ) |
Append new item to the array Note: only works for 1 dimensional arrays!
| newVal | - new item value |
| HRESULT IRsGenArray::InsertAt | ( | [in] RtUlong | ulIndex, | |
| [in] VARIANT | newVal | |||
| ) |
Insert new item at specified position, increasing array size Note: only works for 1 dimensional arrays!
| ulIndex | - zero based array index | |
| newVal | - new item value |
| HRESULT IRsGenArray::RemoveAt | ( | [in] RtUlong | ulIndex | ) |
Remove item with specified index, decreasing array size Note: only works for 1 dimensional arrays!
| ulIndex | - zero based array index |
1.5.5