IGameProperty.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: IGameProperty.h
00004 
00005     DESCRIPTION: IGameProperty interfaces for IGame
00006 
00007     CREATED BY: Neil Hazzard, Discreet
00008 
00009     HISTORY: created 02/02/02
00010 
00011     IGame Version: 1.122
00012 
00013  *> Copyright (c) 2002, All Rights Reserved.
00014  **********************************************************************/
00015 #pragma once
00016 
00017 #include "..\maxheap.h"
00018 #include "..\strbasic.h"
00019 #include "..\maxtypes.h"
00020 #include "..\BuildWarnings.h"
00021 #include "..\iparamb2Typedefs.h"
00022 
00023 // forward declarations
00024 class IParamBlock;
00025 class IParamBlock2;
00026 class Point3;
00027 class Point4;
00028 
00038 
00039 enum PropType{
00040     IGAME_UNKNOWN_PROP, 
00041     IGAME_FLOAT_PROP,   
00042     IGAME_POINT3_PROP,  
00043     IGAME_INT_PROP,     
00044     IGAME_STRING_PROP,  
00045     IGAME_POINT4_PROP,  
00046 };
00047 
00048 class IGameControl;
00049 
00051 
00057 class IGameProperty: public MaxHeapOperators
00058 {
00059 
00060 public:
00062     virtual ~IGameProperty() {;}
00063 
00065 
00068     virtual const MCHAR * GetName() =0;
00069 
00071 
00074     virtual bool IsPBlock2()=0;
00075     
00077 
00080     virtual bool IsPropAnimated()=0;
00081 
00083 
00086     virtual IGameControl * GetIGameControl() =0;
00087 
00089 
00092     virtual IParamBlock2 * GetMaxParamBlock2() =0;
00093 
00095 
00098     virtual IParamBlock * GetMaxParamBlock() =0;
00099 
00101 
00105     virtual bool IsParamBlock()=0;
00106 
00108 
00112     virtual PropType GetType() =0;
00113 
00115 
00119     virtual bool IsParameterSupported() = 0;
00120 
00122     MAX_DEPRECATED int GetParamBlockIndex();
00123 
00125 
00133     virtual int GetParamIndex() = 0;
00134 
00136 
00138     virtual ParamID GetParamID() = 0;
00139     
00140 
00142 
00148     virtual bool GetPropertyValue(float& f, TimeValue t = TIME_NegInfinity, bool p = false)=0;
00149 
00151 
00156     virtual bool GetPropertyValue(int &i, TimeValue t=TIME_NegInfinity)=0;
00157     
00159 
00164     virtual bool GetPropertyValue(Point3 &p, TimeValue t=TIME_NegInfinity)=0;
00165 
00167 
00172     virtual bool GetPropertyValue(Point4 &p, TimeValue t=TIME_NegInfinity)=0;
00173 
00175 
00180     virtual bool GetPropertyValue(const MCHAR*& v, TimeValue t=TIME_NegInfinity)=0;
00181 
00182 };
00183 
00185 
00188 class PropertyEnum: public MaxHeapOperators
00189 {
00190 public:
00192     virtual ~PropertyEnum() {;}
00193 
00195 
00199     virtual bool Proc(IGameProperty* prop) = 0;
00200 };
00201 
00203 
00208 #pragma warning(push)
00209 #pragma warning(disable:4100)
00210 class IPropertyContainer: public MaxHeapOperators
00211 {
00212 public:
00214     virtual ~IPropertyContainer() {;}
00215 
00217 
00221     virtual IGameProperty * QueryProperty(DWORD PropID) {return NULL;}
00222 
00224 
00227     virtual int GetNumberOfProperties(){return 0;}
00228     
00230 
00235     virtual IGameProperty * GetProperty(int index) {return NULL;}
00236 
00238 
00242     virtual IGameProperty * QueryProperty(const MCHAR * propName) {return NULL;}
00243 
00245 
00249     virtual void EnumerateProperties(PropertyEnum & Enum) = 0;
00250 };
00251 #pragma warning(pop)
00252 
00254 
00256 class IExportEntity: public MaxHeapOperators
00257 {
00258 public:
00260     virtual ~IExportEntity() {;}
00261 
00263 
00266     virtual IPropertyContainer * GetIPropertyContainer(){return NULL;}
00267 
00269 
00273     virtual bool IsEntitySupported() {return false;}
00274 
00276 
00279     virtual MCHAR * GetClassName()=0;
00280 };
00281 
00282