Public Member Functions
CICEAttributeDataArray2DString Class Reference

Detailed Description

This class is a specialization of CICEAttributeDataArray2D which allows access to the ICEAttribute data as a 2D array of type siICENodeDataString. CICEAttributeDataArray2DString objects are read-only and can be filled with the methods supplied with the ICEAttribute class.

Note:
Data of type siICENodeDataString can be created with custom ICENodes.
See also:
ICEAttribute::GetDataArray2D, ICEAttribute::GetDataArray2DChunk, CICEAttributeDataArrayString, Type Definitions for CICEAttributeDataArray
Since:
9.0 (2011)
Example:
This example demonstrates how to iterate over the siICENodeDataString 2D attributes on a geometry. For a more detailed example, check out the ICEAttribute/netview_ICEAttribute Inspect ICE Attributes example.
        using namespace XSI;

        Application app;
        X3DObject x3dObj = app.GetSelection().GetItem(0);
        ICEAttribute attr = x3dObj.GetActivePrimitive().GetGeometry().GetICEAttributeFromName( L"MyStringData2DAttribute" );

        // Log the string and number of characters.
        CICEAttributeDataArray2DString stringData2D;

        attr.GetDataArray2D( stringData2D );

        for( ULONG i=0; i<stringData2D.GetCount( ); i++ )
        {
            CICEAttributeDataArrayString stringData;
            stringData2D.GetSubArray( i, stringData );
            for( ULONG j=0; j<stringData.GetCount( ); j++ )
            {
                ULONG nCount;
                const CICEAttributeDataArrayString::TData* pStr;
                stringData.GetData( j, &pStr, nCount );

                app.LogMessage( CString( pStr, nCount ) + L":" + CString( nCount ) );
            }
        }

#include <xsi_iceattributedataarray2D.h>

Inheritance diagram for CICEAttributeDataArray2DString:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  CICEAttributeDataArray2DString ()
  ~CICEAttributeDataArray2DString ()
CStatus  GetSubArray (ULONG in_index, CBaseICEAttributeDataArray &out_dataArray) const
CStatus  ResizeSubArray (ULONG in_index, ULONG in_ulSize, CBaseICEAttributeDataArray &out_dataArray)

Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

CStatus GetSubArray ( ULONG  in_index,
CBaseICEAttributeDataArray out_dataArray 
) const [inline]

Returns the sub-array containing the string data at a given index.

Parameters:
in_index Index in the array. The index must be smaller than the number of elements in the array, otherwise the result is unpredictable.
Return values:
out_dataArray A read-only reference to a CICEAttributeDataArrayString object.
Returns:
CStatus::OK Success
CStatus::InvalidArgument If in_index or out_dataArray is invalid.
CStatus ResizeSubArray ( ULONG  in_index,
ULONG  in_ulSize,
CBaseICEAttributeDataArray out_dataArray 
) [inline]

Changes the size of the sub-array at a given index and returns a new array pointing to the resized sub-array. This is only supported for writable attributes and not available for built-in attributes.

Parameters:
in_index Index in the array. The index must be smaller than the number of elements in the array, otherwise the result is unpredictable.
out_dataArray A reference to a CICEAttributeDataArray<T> object at a specific index.
in_ulSize The size of the array.
Returns:
CStatus::OK Success
CStatus::InvalidArgument If in_index or out_dataArray is invalid.

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