CDataArray2DCustomType::Accessor Class Reference
 
 
 
CDataArray2DCustomType::Accessor Class Reference

#include <xsi_dataarray2D.h>


Class Description

Accessor gives access to the user data values stored in a CDataArray2DCustomType object.

Since:
8.0 (2010)

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 TData *in_pData, ULONG in_nSize)
SICPPSDK_INLINE CStatus  GetData (ULONG in_nIndex, const TData **out_ppData, ULONG &out_nSize) const
SICPPSDK_INLINE CStatus  GetData (ULONG in_nIndex, TData **out_ppData, ULONG &out_nSize) const
SICPPSDK_INLINE TData *  Resize (ULONG in_nIndex, ULONG in_nSize)
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 TData *  in_pData,
ULONG  in_nSize 
)

Allocates in_nSize bytes of memory for the user data at a specified position and copies the content of in_pData to the new user array. Use Accessor::Resize if you only need to allocate the memory.

Parameters:
in_nIndex Array index to store the user data.
in_pData Pointer to user data.
in_nSize Size in bytes of the data to store.
Returns:
CStatus::OK Success
See also:
CDataArray2DCustomType::Accessor::GetData, CDataArray2DCustomType::Accessor::Resize
SICPPSDK_INLINE CStatus GetData ( ULONG  in_nIndex,
const TData **  out_ppData,
ULONG &  out_nSize 
) const

Returns a pointer to the user data stored at a specified position. The data is read-only and cannot be modified.

Note:
The memory allocated for the data returned by CDataArray2DCustomType::GetData is only available within the scope of this CDataArray2DCustomType instance. Make sure to make a copy of the data if you need to access it outside the scope of CDataArray2DCustomType.
Parameters:
in_nIndex Array index of the user data to retrieve.
Return values:
out_ppData Read-only pointer to the data.
out_nSize Size in bytes of the user data.
Returns:
CStatus::OK Success
See also:
CDataArray2DCustomType::Accessor::GetData, CDataArray2DCustomType::Accessor::Resize
SICPPSDK_INLINE CStatus GetData ( ULONG  in_nIndex,
TData **  out_ppData,
ULONG &  out_nSize 
) const

Returns a pointer to the user data stored in at a specified position. The data can be modified directly.

Note:
The memory allocated for the data returned by CDataArray2DCustomType::GetData is only available within the scope of this CDataArray2DCustomType instance. Make sure to make a copy of the data if you need to access it outside the scope of CDataArray2DCustomType.
Parameters:
in_nIndex Array index of the user data to retrieve.
Return values:
out_ppData Pointer to the data.
out_nSize Size in bytes of the user data.
Returns:
CStatus::OK Success
See also:
CDataArray2DCustomType::Accessor::SetData, CDataArray2DCustomType::Accessor::Resize
SICPPSDK_INLINE CDataArray2DCustomType::TData * Resize ( ULONG  in_nIndex,
ULONG  in_nSize 
)

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

Parameters:
in_nIndex Array index of the user buffer to resize.
in_nSize The size in bytes of the new array.
Returns:
Pointer to the newly allocated memory.
See also:
CDataArray2DCustomType::Accessor::SetData, CDataArray2DCustomType::Accessor::Resize
ULONG GetCount ( void  ) const [inline]

Returns the number of elements in the sub-array.

Returns:
Number of elements.

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