Public Member Functions
CDataArray< bool > Class Template Reference

Detailed Description

template<>
class XSI::CDataArray< bool >

This class is a specialization of a CDataArray class of type bool.

Since:
7.0
See also:
CDataArray2D, CIndexSet, ICENodeDef, CDataArrayBool

#include <xsi_dataarray.h>

Inherits CBaseDataArray.

List of all members.

Public Member Functions

SICPPSDK_INLINE CDataArray ()
SICPPSDK_INLINE CDataArray (ICENodeContext &in_ctxt, ULONG in_nInputPortID, ULONG in_nInstanceIndex=0)
SICPPSDK_INLINE CDataArray (ICENodeContext &in_ctxt)
SICPPSDK_INLINE ~CDataArray ()
SICPPSDK_INLINE CStatus CopyFrom (ULONG in_nInputPortID, ULONG in_nInstanceIndex=0)
SICPPSDK_INLINE const bool operator[] (ULONG in_nIndex) const
SICPPSDK_INLINE CStatus Set (ULONG in_nIndex, bool in_bVal)
SICPPSDK_INLINE ULONG GetCount () const
SICPPSDK_INLINE bool IsConstant () const

Constructor & Destructor Documentation

SICPPSDK_INLINE CDataArray ( )

Default Constructor.

SICPPSDK_INLINE CDataArray ( ICENodeContext in_ctxt,
ULONG  in_nInputPortID,
ULONG  in_nInstanceIndex = 0 
)

Constructor for bool array types bound to input ports.

Parameters:
in_ctxtICENode evaluation context.
in_nInputPortIDInput port identifier.
in_nInstanceIndexThe group instance of the port.
SICPPSDK_INLINE CDataArray ( ICENodeContext in_ctxt)

Constructor for bool array types bound to output ports.

Parameters:
in_ctxtICENode evaluation context.
SICPPSDK_INLINE ~CDataArray ( )

Destructor.


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_nInputPortIDInput port identifier.
in_nInstanceIndexThe 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:
        // Copy data from the ID_IN_BOOL port to the current output port
        XSI::CDataArrayBool outData( in_ctxt );
        outData.CopyFrom( ID_IN_BOOL );
SICPPSDK_INLINE const bool operator[] ( ULONG  in_nIndex) const

Accessor to the bool array. This operator is called when reading the data so the return value is read-only.

Parameters:
in_nIndexIndex in the array. The index must be smaller than the number of elements in the array, otherwise the results are unpredicted.
Returns:
A read-only value to the indexed item.
SICPPSDK_INLINE CStatus Set ( ULONG  in_nIndex,
bool  in_bVal 
)

Sets the array at a given index with a value.

Parameters:
in_nIndexIndex in the array. The index must be smaller than the number of elements in the array, otherwise the results are unpredicted.
in_bValValue to set.
Returns:
CStatus::OK Success
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: