dotXSIParam.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 //***************************************************************************************
00013 // Defines
00014 //***************************************************************************************
00015 #ifndef __DOTXSIPARAM_H
00016 #define __DOTXSIPARAM_H
00017 
00018 //***************************************************************************************
00019 // Includes
00020 //***************************************************************************************
00021 #include "SIBCNode.h"
00022 #include "SIBCString.h"
00023 
00024 //***************************************************************************************
00025 // CdotXSIParam | holds a prameter value of all the supported types (SI_TinyVariant)
00026 // public | CSIBCNode
00027 //***************************************************************************************
00028 
00030 
00034 class XSIEXPORT CdotXSIParam : public CSIBCNode
00035 {
00036 public:
00037 
00038     enum 
00039     {
00040         UNFORMATTED = 1
00041     };
00042 
00046     CdotXSIParam();
00047 
00057     CdotXSIParam( CSIBCString *i_sName, SI_Int i_nVariantType );
00058 
00068     CdotXSIParam( SI_Char *i_sName, SI_Int i_nVariantType );
00069 
00082     CdotXSIParam( CSIBCString *i_sName, SI_Int i_nVariantType, SI_Int i_nTweakType );
00083 
00096     CdotXSIParam( SI_Char *i_sName, SI_Int i_nVariantType, SI_Int i_nTweakType );
00097 
00107     CdotXSIParam( CSIBCString *i_sName, SI_TinyVariant i_vValue );
00108 
00118     CdotXSIParam( SI_Char *i_sName, SI_TinyVariant i_vValue );
00119 
00123     virtual ~CdotXSIParam();
00124 
00128     SI_Void GetValue( SI_TinyVariant *o_vValue );
00129 
00134     SI_Void SetValue( SI_TinyVariant i_vValue );
00135 
00140     SI_TinyVariant* GetVariantPtr(){ return &m_vValue; }                                // Get Ptr to the stored variant.
00141 
00146     SI_Void InitializeVarValue( SI_TinyVariant *i_pValue );
00147 
00151     SI_Void InitializeDefaultVarValue();
00152     
00153     CdotXSIParam*   Clone();
00154     void            Serialize(CSIBCString& in_szBuffer);
00155     void            UnSerialize(CSIBCString& in_szBuffer);
00156 
00157 private:
00158     SI_Void ClearVariant();                                     // Clears the content of the variant
00159 
00160     SI_TinyVariant  m_vValue;
00161 };
00162 
00163 //***************************************************************************************
00164 // Global Functions
00165 //***************************************************************************************
00166 XSIEXPORT CdotXSIParam* CreatedotXSIParam();                                // Allocate a CdotXSIParam
00167 XSIEXPORT void          AllocateLocalXSIArray(SI_TinyVariant*, SI_Long);    // Allocate a Val array in the biven TinyVariant
00168 CSIBCString             GetNextSerializedToken ( CSIBCString &in_szString );
00169 #endif // __DOTXSIPARAM_H