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 
00047 SCF_VERSION (iPcProperties, 0, 0, 1);
00048 
00066 struct iPcProperties : public iBase
00067 {
00072   virtual void AddPropertyListener (iPcPropertyListener* listener) = 0;
00076   virtual void RemovePropertyListener (iPcPropertyListener* listener) = 0;
00077 
00081   virtual void SetProperty (const char* name, float value) = 0;
00082 
00086   virtual void SetProperty (const char* name, long value) = 0;
00087 
00091   virtual void SetProperty (const char* name, bool value) = 0;
00092 
00096   virtual void SetProperty (const char* name, const char* value) = 0;
00097 
00101   virtual void SetProperty (const char* name, const csVector2& value) = 0;
00102 
00106   virtual void SetProperty (const char* name, const csVector3& value) = 0;
00107 
00111   virtual void SetProperty (const char* name, const csColor& value) = 0;
00112 
00116   virtual void SetProperty (const char* name, iCelPropertyClass* pclass) = 0;
00117 
00121   virtual void SetProperty (const char* name, iCelEntity* entity) = 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 
00190   virtual celDataType GetPropertyType (size_t index) const = 0;
00191 
00195   virtual float GetPropertyFloat (size_t index) const = 0;
00196 
00200   virtual long GetPropertyLong (size_t index) const = 0;
00201 
00205   virtual bool GetPropertyBool (size_t index) const = 0;
00206 
00210   virtual bool GetPropertyVector (size_t index, csVector2& v) const = 0;
00211 
00215   virtual bool GetPropertyVector (size_t index, csVector3& v) const = 0;
00216 
00220   virtual bool GetPropertyColor (size_t index, csColor& v) const = 0;
00221 
00225   virtual const char* GetPropertyString (size_t index) const = 0;
00226 
00230   virtual iCelPropertyClass* GetPropertyPClass (size_t index) const = 0;
00231 
00235   virtual iCelEntity* GetPropertyEntity (size_t index) const = 0;
00236 
00240   virtual void ClearProperty (size_t index) = 0;
00241 
00245   virtual void Clear () = 0;
00246 
00250   virtual size_t GetPropertyCount () const = 0;
00251 
00255   virtual const char* GetPropertyName (size_t idx) const = 0;
00256 
00260   virtual void Dump () = 0;
00261 };
00262 
00263 #endif // __CEL_PF_PROP__
00264 

Generated for CEL: Crystal Entity Layer by doxygen 1.4.6