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 
00044 struct iCelEntity : public virtual iBase
00045 {
00046   SCF_INTERFACE (iCelEntity, 0, 0, 1);
00052   virtual iObject* QueryObject () = 0;
00053 
00058   virtual const char* GetName () const = 0;
00059 
00064   virtual void SetName (const char* n) = 0;
00065 
00070   virtual uint GetID () const = 0;
00071 
00078   virtual void SetID (uint n) = 0;
00079 
00085   virtual iCelPropertyClassList* GetPropertyClassList () = 0;
00086 
00092   virtual void SetBehaviour (iCelBehaviour* behaviour) = 0;
00093 
00099   virtual iCelBehaviour* GetBehaviour () = 0;
00100 
00106   virtual void AddClass (csStringID cls) = 0;
00107 
00111   virtual void RemoveClass (csStringID cls) = 0;
00112 
00116   virtual bool HasClass (csStringID cls) = 0;
00117 
00121   virtual const csSet<csStringID>& GetClasses () const = 0;
00122 };
00123 
00132 struct iCelEntityList : public virtual iBase
00133 {
00134   SCF_INTERFACE (iCelEntityList, 0, 0, 2);
00135 
00141   virtual size_t GetCount () const = 0;
00142 
00151   virtual iCelEntity* Get (size_t n) const = 0;
00152 
00161   virtual size_t Add (iCelEntity* obj) = 0;
00162 
00171   virtual bool Remove (iCelEntity* obj) = 0;
00172 
00181   virtual bool Remove (size_t n) = 0;
00182 
00188   virtual void RemoveAll () = 0;
00189 
00198   virtual size_t Find (iCelEntity* obj) const = 0;
00199 
00208   virtual iCelEntity* FindByName (const char *Name) const = 0;
00209 
00215   virtual csPtr<iCelEntityIterator> GetIterator () const = 0;
00216 };
00217 
00221 struct iCelEntityIterator : public virtual iBase
00222 {
00223   SCF_INTERFACE (iCelEntityIterator, 0, 0, 1);
00224 
00228   virtual iCelEntity* Next () = 0;
00229 
00233   virtual bool HasNext () const = 0;
00234 };
00235 
00236 #endif // __CEL_PL_ENTITY__
00237 

Generated for CEL: Crystal Entity Layer 1.2 by doxygen 1.4.7