00001
00011
00012
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016
00017 #ifndef __XSIICENODECONTEXT_H__
00018 #define __XSIICENODECONTEXT_H__
00019
00020 #include <xsi_context.h>
00021 #include <xsi_time.h>
00022 #include <xsi_longarray.h>
00023
00024 namespace XSI {
00025
00026 class CStatus;
00027 class CBaseDataArray;
00028 class CBaseDataArray2D;
00029 class CIndexSet;
00030
00031
00040
00041
00042 class SICPPSDKDECL ICENodeContext : public Context
00043 {
00044 public:
00045
00046 friend class CBaseDataArray;
00047 friend class CBaseDataArray2D;
00048 friend class CIndexSet;
00049 friend class CICEGeometry;
00050 friend class CICEPortState;
00051
00053 ICENodeContext();
00054
00056 ~ICENodeContext();
00057
00061 ICENodeContext(const CRef& in_ref);
00062
00066 ICENodeContext(const ICENodeContext& in_obj);
00067
00072 bool IsA( siClassID in_ClassID) const;
00073
00077 siClassID GetClassID() const;
00078
00083 ICENodeContext& operator=(const ICENodeContext& in_obj);
00084
00090 ICENodeContext& operator=(const CRef& in_ref);
00091
00097 CStatus GetGroupInstanceCount( ULONG in_grpUniqID, ULONG& out_inst_count ) const;
00098
00102 ULONG GetEvaluationThreadCount( ) const;
00103
00109 ULONG GetCurrentThreadIndex( ) const;
00110
00117 ULONG GetNumberOfElementsToProcess( ) const;
00118
00146 CStatus PutNumberOfElementsToProcess( ULONG in_nElements );
00147
00155 CStatus GetPortInfo( ULONG in_nPortID, siICENodeDataType& out_type, siICENodeStructureType& out_struct, siICENodeContextType& out_context ) const;
00156
00166 CStatus GetPortInfo( ULONG in_nPortID,
00167 siICENodeDataType& out_type,
00168 siICENodeStructureType& out_struct,
00169 siICENodeContextType& out_context,
00170 CString& out_customDataType ) const;
00171
00175 ULONG GetEvaluatedOutputPortID( ) const;
00176
00181 CTime GetTime() const;
00182
00190 ULONG GetEvaluationPhaseIndex( ) const;
00191
00199 CStatus SetLastEvaluationPhase( );
00200
00221 CStatus AddEvaluationPhaseInputPort( ULONG in_portid, const XSI::CLongArray& in_portInstances=XSI::CLongArray() );
00222
00235 CStatus SetAsElementDataVarying( );
00236
00242 CStatus SetAsTimeVarying( );
00243
00244 private:
00245
00246
00247 CStatus AcquireIndexSet( CIndexSet& io_set ) const;
00248 CStatus AcquireIndexSetFromPort( CIndexSet& io_set, ULONG in_nInputPortID, ULONG in_nInstanceIndex ) const;
00249 CStatus ReleaseIndexSet( CIndexSet& io_set );
00250 CStatus RemoveElementFromIndexSet( CIndexSet& io_set, LONG in_index, LONG& out_nNewIndex, bool& out_bEnd );
00251 CStatus GetFilteredCountFromIndexSet( const CIndexSet& in_set, ULONG& out_ulCount ) const;
00252 CStatus AcquireInputDataArray( CBaseDataArray& io_dataArray, siICENodeDataType in_requiredDataType, ULONG in_port_uniq_index, ULONG in_grp_instance_index ) const;
00253 CStatus CopyFromInputDataArray( CBaseDataArray& io_dataArray, siICENodeDataType in_requiredDataType, ULONG in_port_uniq_index, ULONG in_grp_instance_index ) const;
00254 CStatus AcquireOutputDataArray( CBaseDataArray& io_dataArray, siICENodeDataType in_requiredDataType ) const;
00255 CStatus ReleaseDataArray( CBaseDataArray& io_dataArray );
00256
00257 CStatus SetCustomTypeData( CBaseDataArray& io_dataArray, ULONG in_nArrayIndex, const unsigned char* in_ptr, ULONG in_nSize );
00258 CStatus GetCustomTypeData( CBaseDataArray& io_dataArray, ULONG in_nArrayIndex, const unsigned char** out_pptr, ULONG& out_nSize ) const;
00259 CStatus GetCustomTypeData( CBaseDataArray& io_dataArray, ULONG in_nArrayIndex, unsigned char** out_pptr, ULONG& out_nSize ) const;
00260 unsigned char* ResizeCustomTypeData( CBaseDataArray& io_dataArray, ULONG in_index, ULONG in_nSize );
00261
00262 CStatus SetStringData( CBaseDataArray& io_dataArray, ULONG in_nArrayIndex, const wchar_t* in_ptr, ULONG in_nSize );
00263 CStatus GetStringData( CBaseDataArray& io_dataArray, ULONG in_nArrayIndex, const wchar_t** out_pptr, ULONG& out_nSize ) const;
00264 CStatus GetStringData( CBaseDataArray& io_dataArray, ULONG in_nArrayIndex, wchar_t** out_pptr, ULONG& out_nSize ) const;
00265 wchar_t* ResizeStringData( CBaseDataArray& io_dataArray, ULONG in_index, ULONG in_nSize );
00266
00267
00268 CStatus AcquireInputDataArray2D( CBaseDataArray2D& io_dataArray, siICENodeDataType in_requiredDataType, ULONG in_port_uniq_index, ULONG in_grp_instance_index ) const;
00269 CStatus CopyFromInputDataArray2D( CBaseDataArray2D& io_dataArray, siICENodeDataType in_requiredDataType, ULONG in_port_uniq_index, ULONG in_grp_instance_index ) const;
00270 CStatus AcquireOutputDataArray2D( CBaseDataArray2D& io_dataArray, siICENodeDataType in_requiredDataType ) const;
00271 CStatus ResizeSubArray( CBaseDataArray2D& io_dataArray, ULONG in_nArrayIndex, ULONG in_nSize, void*& out_ppData, ULONG& out_nCount, ULONG& out_nStartBit ) ;
00272 CStatus GetSubArray( CBaseDataArray2D& io_dataArray, ULONG in_nArrayIndex, void*& out_ppData, ULONG& out_nCount, ULONG& out_nStartBit ) const;
00273
00274 CStatus SetCustomTypeData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, const unsigned char* in_ptr, ULONG in_nSize );
00275 CStatus GetCustomTypeData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, const unsigned char** out_pptr, ULONG& out_nSize ) const;
00276 CStatus GetCustomTypeData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, unsigned char** out_pptr, ULONG& out_nSize ) const;
00277 unsigned char* ResizeCustomTypeData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, ULONG in_nSize );
00278
00279 CStatus SetStringData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, const wchar_t* in_ptr, ULONG in_nCount );
00280 CStatus GetStringData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, const wchar_t** out_pptr, ULONG& out_nCount ) const;
00281 CStatus GetStringData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, wchar_t** out_pptr, ULONG& out_nCount ) const;
00282 wchar_t* ResizeStringData2D( CBaseDataArray& io_dataArray, ULONG in_nAccessIndex, ULONG in_nArrayIndex, ULONG in_nCount );
00283
00284 ICENodeContext * operator&() const;
00285 ICENodeContext * operator&();
00286 };
00287
00288 };
00289 #endif // __XSIICENODECONTEXT_H__