propclass/prop.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2001 by Jorrit Tyberghein 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef __CEL_PF_PROP__ 00021 #define __CEL_PF_PROP__ 00022 00023 #include "cstypes.h" 00024 #include "csutil/scf.h" 00025 #include "physicallayer/datatype.h" 00026 00027 struct iCelEntity; 00028 struct iCelPropertyClass; 00029 struct iPcProperties; 00030 class csVector2; 00031 class csVector3; 00032 class csColor; 00033 00037 struct iPcPropertyListener : public virtual iBase 00038 { 00039 SCF_INTERFACE (iPcPropertyListener, 0, 0, 1); 00040 00044 virtual void PropertyChanged (iPcProperties* pcprop, size_t idx) = 0; 00045 }; 00046 00047 SCF_VERSION (iPcProperties, 0, 0, 1); 00048 00062 struct iPcProperties : public iBase 00063 { 00068 virtual void AddPropertyListener (iPcPropertyListener* listener) = 0; 00072 virtual void RemovePropertyListener (iPcPropertyListener* listener) = 0; 00073 00077 virtual void SetProperty (const char* name, float value) = 0; 00078 00082 virtual void SetProperty (const char* name, long value) = 0; 00083 00087 virtual void SetProperty (const char* name, bool value) = 0; 00088 00092 virtual void SetProperty (const char* name, const char* value) = 0; 00093 00097 virtual void SetProperty (const char* name, const csVector2& value) = 0; 00098 00102 virtual void SetProperty (const char* name, const csVector3& value) = 0; 00103 00107 virtual void SetProperty (const char* name, const csColor& value) = 0; 00108 00112 virtual void SetProperty (const char* name, iCelPropertyClass* pclass) = 0; 00113 00117 virtual void SetProperty (const char* name, iCelEntity* entity) = 0; 00118 00122 virtual void SetProperty (const char* name, iBase* value) = 0; 00123 00128 virtual size_t GetPropertyIndex (const char* name) = 0; 00129 00133 virtual void SetPropertyIndex (size_t index, float value) = 0; 00134 00138 virtual void SetPropertyIndex (size_t index, long value) = 0; 00139 00143 virtual void SetPropertyIndex (size_t index, bool value) = 0; 00144 00148 virtual void SetPropertyIndex (size_t index, const csVector2& value) = 0; 00149 00153 virtual void SetPropertyIndex (size_t index, const csVector3& value) = 0; 00154 00158 virtual void SetPropertyIndex (size_t index, const csColor& value) = 0; 00159 00163 virtual void SetPropertyIndex (size_t index, const char* value) = 0; 00164 00168 virtual void SetPropertyIndex (size_t index, iCelPropertyClass* pc) = 0; 00169 00173 virtual void SetPropertyIndex (size_t index, iCelEntity* entity) = 0; 00174 00178 virtual void SetPropertyIndex (size_t index, iBase* value) = 0; 00179 00195 virtual celDataType GetPropertyType (size_t index) const = 0; 00196 00200 virtual float GetPropertyFloat (size_t index) const = 0; 00201 00205 virtual long GetPropertyLong (size_t index) const = 0; 00206 00210 virtual bool GetPropertyBool (size_t index) const = 0; 00211 00215 virtual bool GetPropertyVector (size_t index, csVector2& v) const = 0; 00216 00220 virtual bool GetPropertyVector (size_t index, csVector3& v) const = 0; 00221 00225 virtual bool GetPropertyColor (size_t index, csColor& v) const = 0; 00226 00230 virtual const char* GetPropertyString (size_t index) const = 0; 00231 00235 virtual iCelPropertyClass* GetPropertyPClass (size_t index) const = 0; 00236 00240 virtual iCelEntity* GetPropertyEntity (size_t index) const = 0; 00241 00245 virtual iBase* GetPropertyIBase (size_t index) const = 0; 00246 00250 virtual void ClearProperty (size_t index) = 0; 00251 00255 virtual void Clear () = 0; 00256 00260 virtual size_t GetPropertyCount () const = 0; 00261 00265 virtual const char* GetPropertyName (size_t idx) const = 0; 00266 00270 virtual void Dump () = 0; 00271 }; 00272 00273 #endif // __CEL_PF_PROP__ 00274
Generated for CEL: Crystal Entity Layer by doxygen 1.4.7