CEL

Public API Reference

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 
00059 struct iPcProperties : public virtual iBase
00060 {
00061   SCF_INTERFACE (iPcProperties, 0, 0, 1);
00062 
00067   virtual void AddPropertyListener (iPcPropertyListener* listener) = 0;
00071   virtual void RemovePropertyListener (iPcPropertyListener* listener) = 0;
00072 
00076   virtual void SetProperty (const char* name, float value) = 0;
00077 
00081   virtual void SetProperty (const char* name, long value) = 0;
00082 
00086   virtual void SetProperty (const char* name, bool value) = 0;
00087 
00091   virtual void SetProperty (const char* name, const char* value) = 0;
00092 
00096   virtual void SetProperty (const char* name, const csVector2& value) = 0;
00097 
00101   virtual void SetProperty (const char* name, const csVector3& value) = 0;
00102 
00106   virtual void SetProperty (const char* name, const csColor& value) = 0;
00107 
00111   virtual void SetProperty (const char* name, iCelPropertyClass* pclass) = 0;
00112 
00116   virtual void SetProperty (const char* name, iCelEntity* entity) = 0;
00117 
00121   virtual void SetProperty (const char* name, iBase* value) = 0;
00122 
00127   virtual size_t GetPropertyIndex (const char* name) = 0;
00128 
00132   virtual void SetPropertyIndex (size_t index, float value) = 0;
00133 
00137   virtual void SetPropertyIndex (size_t index, long value) = 0;
00138 
00142   virtual void SetPropertyIndex (size_t index, bool value) = 0;
00143 
00147   virtual void SetPropertyIndex (size_t index, const csVector2& value) = 0;
00148 
00152   virtual void SetPropertyIndex (size_t index, const csVector3& value) = 0;
00153 
00157   virtual void SetPropertyIndex (size_t index, const csColor& value) = 0;
00158 
00162   virtual void SetPropertyIndex (size_t index, const char* value) = 0;
00163 
00167   virtual void SetPropertyIndex (size_t index, iCelPropertyClass* pc) = 0;
00168 
00172   virtual void SetPropertyIndex (size_t index, iCelEntity* entity) = 0;
00173 
00177   virtual void SetPropertyIndex (size_t index, iBase* value) = 0;
00178 
00194   virtual celDataType GetPropertyType (size_t index) const = 0;
00195 
00199   virtual float GetPropertyFloat (size_t index) const = 0;
00200 
00204   virtual long GetPropertyLong (size_t index) const = 0;
00205 
00209   virtual bool GetPropertyBool (size_t index) const = 0;
00210 
00214   virtual bool GetPropertyVector (size_t index, csVector2& v) const = 0;
00215 
00219   virtual bool GetPropertyVector (size_t index, csVector3& v) const = 0;
00220 
00224   virtual bool GetPropertyColor (size_t index, csColor& v) const = 0;
00225 
00229   virtual const char* GetPropertyString (size_t index) const = 0;
00230 
00234   virtual iCelPropertyClass* GetPropertyPClass (size_t index) const = 0;
00235 
00239   virtual iCelEntity* GetPropertyEntity (size_t index) const = 0;
00240 
00244   virtual iBase* GetPropertyIBase (size_t index) const = 0;
00245 
00249   virtual void ClearProperty (size_t index) = 0;
00250 
00254   virtual void Clear () = 0;
00255 
00259   virtual size_t GetPropertyCount () const = 0;
00260 
00264   virtual const char* GetPropertyName (size_t idx) const = 0;
00265 
00269   virtual void Dump () = 0;
00270 };
00271 
00272 #endif // __CEL_PF_PROP__
00273 

Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.7.6.1