CEL

Public API Reference

physicallayer/entity.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_PL_ENTITY__
00021 #define __CEL_PL_ENTITY__
00022 
00023 #include "cstypes.h"
00024 #include "csutil/scf.h"
00025 #include "csutil/set.h"
00026 #include "csutil/strset.h"
00027 
00028 struct iCelPropertyClassList;
00029 struct iCelBehaviour;
00030 struct iCelEntityIterator;
00031 struct iObject;
00032 
00033 SCF_VERSION (iCelEntity, 0, 0, 1);
00034 
00046 struct iCelEntity : public iBase
00047 {
00053   virtual iObject* QueryObject () = 0;
00054 
00059   virtual const char* GetName () const = 0;
00060 
00065   virtual void SetName (const char* n) = 0;
00066 
00071   virtual uint GetID () const = 0;
00072 
00079   virtual void SetID (uint n) = 0;
00080 
00086   virtual iCelPropertyClassList* GetPropertyClassList () = 0;
00087 
00093   virtual void SetBehaviour (iCelBehaviour* behaviour) = 0;
00094 
00100   virtual iCelBehaviour* GetBehaviour () = 0;
00101 
00107   virtual void AddClass (csStringID cls) = 0;
00108 
00112   virtual void RemoveClass (csStringID cls) = 0;
00113 
00117   virtual bool HasClass (csStringID cls) = 0;
00118 
00122   virtual const csSet<csStringID>& GetClasses () const = 0;
00123 };
00124 
00125 SCF_VERSION (iCelEntityList, 0, 0, 2);
00126 
00135 struct iCelEntityList : public iBase
00136 {
00142   virtual size_t GetCount () const = 0;
00143 
00152   virtual iCelEntity* Get (size_t n) const = 0;
00153 
00162   virtual size_t Add (iCelEntity* obj) = 0;
00163 
00172   virtual bool Remove (iCelEntity* obj) = 0;
00173 
00182   virtual bool Remove (size_t n) = 0;
00183 
00189   virtual void RemoveAll () = 0;
00190 
00199   virtual size_t Find (iCelEntity* obj) const = 0;
00200 
00209   virtual iCelEntity* FindByName (const char *Name) const = 0;
00210 
00216   virtual csPtr<iCelEntityIterator> GetIterator () const = 0;
00217 };
00218 
00222 struct iCelEntityIterator : public virtual iBase
00223 {
00224   SCF_INTERFACE (iCelEntityIterator, 0, 0, 1);
00225 
00229   virtual iCelEntity* Next () = 0;
00230 
00234   virtual bool HasNext () const = 0;
00235 };
00236 
00237 #endif // __CEL_PL_ENTITY__
00238 

Generated for CEL: Crystal Entity Layer by doxygen 1.4.7