Detailed Description
CDataArrayCustomType is used for storing binary data in a 1D element array of type CDataArrayCustomType::TData.
- Since:
- 8.0 (2010)
- See also:
- CDataArray2DCustomType, CIndexSet
#include <xsi_dataarray.h>
Inherits CBaseDataArray.
List of all members.
Public Member Functions |
SICPPSDK_INLINE | CDataArrayCustomType () |
SICPPSDK_INLINE | CDataArrayCustomType (ICENodeContext &in_ctxt, ULONG in_nInputPortID, ULONG in_nInstanceIndex=0) |
SICPPSDK_INLINE | CDataArrayCustomType (ICENodeContext &in_ctxt) |
SICPPSDK_INLINE | ~CDataArrayCustomType () |
SICPPSDK_INLINE CStatus | CopyFrom (ULONG in_nInputPortID, ULONG in_nInstanceIndex=0) |
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) |
SICPPSDK_INLINE ULONG | GetCount () const |
SICPPSDK_INLINE bool | IsConstant () const |
Constructor & Destructor Documentation
Constructor for user
array types bound to input ports.
- Parameters:
-
in_ctxt | ICENode evaluation context. |
in_nInputPortID | Input port identifier. |
in_nInstanceIndex | The group instance of the port. |
Constructor for bool
array types bound to output ports.
- Parameters:
-
Member Function Documentation
SICPPSDK_INLINE CStatus CopyFrom |
( |
ULONG |
in_nInputPortID, |
|
|
ULONG |
in_nInstanceIndex = 0 |
|
) |
| |
Copy the data from a given input port to this object buffer without allocating memory. This is typically used for passing data by reference from input to output ports, similar to what the built-in 'pass through' node is doing.
- Parameters:
-
in_nInputPortID | Input port identifier. |
in_nInstanceIndex | The group instance of the port. |
- Returns:
- CStatus::OK Success
-
CStatus::InvalidArgument Fails if in_nInputPortID is not an input port identifier or in_nInstanceIndex is invalid.
-
CStatus::AccessDenied This array is not an output type or wasn't created properly.
- Example:
SICPPSDK_INLINE CStatus SetData |
( |
ULONG |
in_nIndex, |
|
|
const TData * |
in_pData, |
|
|
ULONG |
in_nSize |
|
) |
| |
Sets the array at a specific position with the content of in_pData
. This API will allocate in_nSize
bytes of memory to store the user data.
- 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:
- Success/failure
- See also:
- CDataArrayCustomType::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 specific index. The data is read-only and cannot be modified.
- Note:
- The memory allocated for the data returned by CDataArrayCustomType::GetData is only available within the scope of this CDataArrayCustomType instance. Make sure to make a copy of the data if you need to access it outside the scope of CDataArrayCustomType.
- Parameters:
-
in_nIndex | Array index of the user data to retrieve. The size is 0 if no data is stored at this index. |
- Return values:
-
out_ppData | Read-only pointer to the data. |
out_nSize | Size in bytes of the user data. |
- Returns:
- Success/failure
SICPPSDK_INLINE CStatus GetData |
( |
ULONG |
in_nIndex, |
|
|
TData ** |
out_ppData, |
|
|
ULONG & |
out_nSize |
|
) |
| const |
Returns a pointer to the user data stored at a specific index. The data can be modified directly.
- Note:
- The memory allocated for the data returned by CDataArrayCustomType::GetData is only available within the scope of this CDataArrayCustomType instance. Make sure to make a copy of the data if you need to access it outside the scope of CDataArrayCustomType.
- 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:
- Success/failure
SICPPSDK_INLINE CDataArrayCustomType::TData * Resize |
( |
ULONG |
in_nIndex, |
|
|
ULONG |
in_nSize |
|
) |
| |
Changes the sizes of the user buffer at a specific index to a specified size 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 allocated data.
SICPPSDK_INLINE ULONG GetCount |
( |
void |
| ) |
const |
Returns the number of elements in the array.
- Returns:
- Number of elements.
SICPPSDK_INLINE bool IsConstant |
( |
| ) |
const |
Returns true if the array is constant or false otherwise. A constant array has only one value.
- Returns:
- True if constant, false otherwise.
The documentation for this class was generated from the following file: