Public Member Functions
CDataArray2DString::Accessor Class Reference

## Detailed Description

Accessor gives access to the string data stored in a CDataArray2DString object.

Since:
  Ariane

`#include <xsi_dataarray2D.h>`

List of all members.

## Public Member Functions
| Accessor ()
| Accessor (const Accessor &in_accessor)
Accessor & | operator= (const Accessor &in_accessor)
SICPPSDK_INLINE CStatus | SetData (ULONG in_nIndex, const CString &in_str)
SICPPSDK_INLINE CStatus | GetData (ULONG in_nIndex, CString &out_str) const
SICPPSDK_INLINE CString | operator[] (ULONG in_nIndex) const
SICPPSDK_INLINE CStatus | SetData (ULONG in_nIndex, const TData *in_pStr, ULONG in_nSize)
SICPPSDK_INLINE CStatus | GetData (ULONG in_nIndex, const TData **out_ppStr, ULONG &out_nCount) const
SICPPSDK_INLINE CStatus | GetData (ULONG in_nIndex, TData **out_ppStr, ULONG &out_nCount) const
SICPPSDK_INLINE TData * | Resize (ULONG in_nIndex, ULONG in_nCount)
ULONG | GetCount () const

## Constructor & Destructor Documentation

Accessor | ( |  | ) | `[inline]`

Constructor.

Accessor | ( | const Accessor & | in_accessor | ) | `[inline]`

Constructs an Accessor object from another Accessor object.

Parameters:

  in_accessor | constant Accessor object.

## Member Function Documentation

Accessor& operator= | ( | const Accessor & | in_accessor | ) | `[inline]`

Assignment operator.

Parameters:

  in_accessor | constant class object.

Returns:
  A reference to this Accessor.

SICPPSDK_INLINE CStatus SetData | ( | ULONG | in_nIndex,
|  | const CString & | in_str
| ) |  |

Sets the sub-array at `in_nIndex` with the content of `in_str`.

Parameters:

  in_nIndex | Array index where to store the string.
  in_str | CString object.

Returns:
  Success/failure

SICPPSDK_INLINE CStatus GetData | ( | ULONG | in_nIndex,
|  | CString & | out_str
| ) |  | const

Returns a CString object set with a copy of the string stored at `in_nIndex`.

Parameters:

  in_nIndex | Array index of the string to retrieve. The returned CString is empty if no string is stored at this index.

Return values:

  out_str | CString object containing a copy of the string.

Returns:
  Success/failure

SICPPSDK_INLINE CString operator[] | ( | ULONG | in_nIndex | ) | const

Returns a CString object containing a copy of the string stored at`in_nIndex`.

Parameters:

  in_nIndex | Index in the sub-array. The index must be smaller than the number of elements in the sub-array, otherwise the object returned is empty.

Returns:
  CString object.

SICPPSDK_INLINE CStatus SetData | ( | ULONG | in_nIndex,
|  | const TData * | in_pStr,
|  | ULONG | in_nSize
| ) |  |

Sets the sub-array at `in_nIndex` with the content of `in_pStr`.

Parameters:

  in_nIndex | Sub-array index to store the string data.
  in_pStr | Pointer to string data.
  in_nCount | Number of characters to store.

Returns:
  CStatus::OK Success

See also:
  CDataArrayString::Accessor::GetData, CDataArrayString::Accessor::Resize

SICPPSDK_INLINE CStatus GetData | ( | ULONG | in_nIndex,
|  | const TData ** | out_ppStr,
|  | ULONG & | out_nCount
| ) |  | const

Returns a pointer to the string data stored at `in_nIndex`. The data is read-only and cannot be modified.

Note:
  The memory allocated for the data returned by CDataArray2DString::GetData is only available within the scope of this CDataArray2DString instance. Make sure to make a copy of the data if you need to access it outside the scope of CDataArray2DString.

Note:
  The string returned in `out_ppStr` is not null-terminated, the caller must make sure to take the number of characters in account when manipulating the string.

Parameters:

  in_nIndex | Array index of the string data to retrieve.

Return values:

  out_ppStr | Read-only pointer to the string data.
  out_nCount | Number of characters in the string.

Returns:
  CStatus::OK Success

See also:
  CDataArray2DString::Accessor::GetData, CDataArray2DString::Accessor::Resize

SICPPSDK_INLINE CStatus GetData | ( | ULONG | in_nIndex,
|  | TData ** | out_ppStr,
|  | ULONG & | out_nCount
| ) |  | const

Returns a pointer to the string data stored at `in_nIndex`. The data can be modified directly.

Note:
  The memory allocated for the data returned by CDataArray2DString::GetData is only available within the scope of this CDataArray2DString instance. Make sure to make a copy of the data if you need to access it outside the scope of CDataArray2DString.

Note:
  The string returned in `out_ppStr` is not null-terminated, the caller must make sure to take the number of characters in account when manipulating the string.

Parameters:

  in_nIndex | Array index of the string data to retrieve.

Return values:

  out_ppStr | Pointer to the string data.
  out_nCount | Number of characters in the string.

Returns:
  CStatus::OK Success

See also:
  CDataArray2DString::Accessor::SetData, CDataArray2DString::Accessor::Resize

SICPPSDK_INLINE CDataArray2DString::TData * Resize | ( | ULONG | in_nIndex,
|  | ULONG | in_nCount
| ) |  |

Changes the size of the sub-array buffer at `in_nIndex` and returns a pointer to the allocated data.

Parameters:

  in_nIndex | Array index of the string buffer to resize.
  in_nCount | Number of characters to store.

Returns:
  Pointer to the newly allocated memory.

See also:
  CDataArray2DString::Accessor::SetData, CDataArray2DString::Accessor::Resize

ULONG GetCount | ( | void |  | ) | const`[inline]`

Returns the number of characters in the sub-array.

Returns:
  Number of characters.

The documentation for this class was generated from the following file:

- xsi_dataarray2D.h