CustomPSet.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Crosswalk team
00004 //
00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.
00006 // Use of this software is subject to the terms of the Autodesk license agreement
00007 // provided at the time of installation or download, or which otherwise accompanies
00008 // this software in either electronic or hard copy form.
00009 //
00010 //***************************************************************************************
00011 
00012 #ifndef _CUSTOMPSET_H
00013 #define _CUSTOMPSET_H
00014 
00015 #include "Template.h"
00016 
00017 // Forward declaration
00018 class CSLVariantParameter;
00019 class CSLXSICustomParamInfo;
00020 
00024 class XSIEXPORT CSLCustomPSet
00025     : public CSLTemplate
00026 {
00027 public:
00034     CSLCustomPSet(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00035 
00037     virtual ~CSLCustomPSet();
00038 
00042     virtual SI_Error Synchronize();
00043 
00047     virtual ETemplateType Type() { return SI_CUSTOM_PSET; }
00048 
00050     enum EPropagationType
00051     {
00052         SI_BRANCH,      
00053         SI_NODE,        
00054         SI_INHERITED    
00055     };
00056 
00058 
00061     EPropagationType GetPropagationType();
00062 
00064 
00068     SI_Void SetPropagationType( EPropagationType in_PropagationType );
00069 
00071     // Parameters Functionality ///////////////////////////////////////////////
00073 
00077     CSLVariantParameter* AddParameter();
00078 
00083     SI_Error RemoveParameter( SI_Int in_nIndex );
00084 
00089     SI_Error RemoveParameter( CSLVariantParameter* in_pToRemove );
00090 
00094     SI_Error ClearParameters();
00095 
00100     CSLVariantParameter* ConnectParameter( CSLVariantParameter* in_pToConnect );
00101 
00105     CSLVariantParameter** GetParameterList();
00106 
00110     SI_Int GetParameterCount();
00111 
00116     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00117 
00123     virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
00124 
00126     // Custom parameter information
00128 
00134     CSLXSICustomParamInfo* CreateCustomParamInfo( SI_Int in_nIndex );
00135 
00142     CSLXSICustomParamInfo* CreateCustomParamInfo( CSLVariantParameter * in_pParam );
00143 
00149     CSLXSICustomParamInfo* ConnectCustomParamInfo( CSLXSICustomParamInfo *in_pToConnect );
00150 
00155     char *GetType();
00156 
00162     void SetType(char *in_pType);
00163 
00164 private:
00165     CSLStrEnumProxy<EPropagationType, SI_INHERITED>  m_PropagationType;
00166     CSIBCArray<CSLVariantParameter*> m_Parameters;
00167 
00168     SI_Void *m_pReserved;   // Reserved for future use
00169 };
00170 
00171 #endif