Public Member Functions
CDataArray2DCustomType::Accessor Class Reference

Detailed Description

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

Since:
8.0 (2010)

#include <xsi_dataarray2D.h>

List of all members.

Public Member Functions

 Accessor ()
 Accessor (const Accessor &in_accessor)
Accessoroperator= (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_accessorconstant Accessor object.

Member Function Documentation

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

Assignment operator.

Parameters:
in_accessorconstant 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_nIndexArray index to store the user data.
in_pDataPointer to user data.
in_nSizeSize 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_nIndexArray index of the user data to retrieve.
Return values:
out_ppDataRead-only pointer to the data.
out_nSizeSize 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_nIndexArray index of the user data to retrieve.
Return values:
out_ppDataPointer to the data.
out_nSizeSize 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_nIndexArray index of the user buffer to resize.
in_nSizeThe 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: