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 00061 struct iPcProperties : public virtual iBase 00062 { 00063 SCF_INTERFACE (iPcProperties, 0, 0, 1); 00064 00069 virtual void AddPropertyListener (iPcPropertyListener* listener) = 0; 00073 virtual void RemovePropertyListener (iPcPropertyListener* listener) = 0; 00074 00078 virtual void SetProperty (const char* name, float value) = 0; 00079 00083 virtual void SetProperty (const char* name, long value) = 0; 00084 00088 virtual void SetProperty (const char* name, bool value) = 0; 00089 00093 virtual void SetProperty (const char* name, const char* value) = 0; 00094 00098 virtual void SetProperty (const char* name, const csVector2& value) = 0; 00099 00103 virtual void SetProperty (const char* name, const csVector3& value) = 0; 00104 00108 virtual void SetProperty (const char* name, const csColor& value) = 0; 00109 00113 virtual void SetProperty (const char* name, iCelPropertyClass* pclass) = 0; 00114 00118 virtual void SetProperty (const char* name, iCelEntity* entity) = 0; 00119 00123 virtual void SetProperty (const char* name, iBase* value) = 0; 00124 00129 virtual size_t GetPropertyIndex (const char* name) = 0; 00130 00134 virtual void SetPropertyIndex (size_t index, float value) = 0; 00135 00139 virtual void SetPropertyIndex (size_t index, long value) = 0; 00140 00144 virtual void SetPropertyIndex (size_t index, bool value) = 0; 00145 00149 virtual void SetPropertyIndex (size_t index, const csVector2& value) = 0; 00150 00154 virtual void SetPropertyIndex (size_t index, const csVector3& value) = 0; 00155 00159 virtual void SetPropertyIndex (size_t index, const csColor& value) = 0; 00160 00164 virtual void SetPropertyIndex (size_t index, const char* value) = 0; 00165 00169 virtual void SetPropertyIndex (size_t index, iCelPropertyClass* pc) = 0; 00170 00174 virtual void SetPropertyIndex (size_t index, iCelEntity* entity) = 0; 00175 00179 virtual void SetPropertyIndex (size_t index, iBase* value) = 0; 00180 00196 virtual celDataType GetPropertyType (size_t index) const = 0; 00197 00201 virtual float GetPropertyFloat (size_t index) const = 0; 00202 00206 virtual long GetPropertyLong (size_t index) const = 0; 00207 00211 virtual bool GetPropertyBool (size_t index) const = 0; 00212 00216 virtual bool GetPropertyVector (size_t index, csVector2& v) const = 0; 00217 00221 virtual bool GetPropertyVector (size_t index, csVector3& v) const = 0; 00222 00226 virtual bool GetPropertyColor (size_t index, csColor& v) const = 0; 00227 00231 virtual const char* GetPropertyString (size_t index) const = 0; 00232 00236 virtual iCelPropertyClass* GetPropertyPClass (size_t index) const = 0; 00237 00241 virtual iCelEntity* GetPropertyEntity (size_t index) const = 0; 00242 00246 virtual iBase* GetPropertyIBase (size_t index) const = 0; 00247 00251 virtual void ClearProperty (size_t index) = 0; 00252 00256 virtual void Clear () = 0; 00257 00261 virtual size_t GetPropertyCount () const = 0; 00262 00266 virtual const char* GetPropertyName (size_t idx) const = 0; 00267 00271 virtual void Dump () = 0; 00272 }; 00273 00274 #endif // __CEL_PF_PROP__ 00275
Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1