| ## Public API Reference

- Main Page
- Classes
- Files

# 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 iObject;
    00031
    00032 SCF_VERSION (iCelEntity, 0, 0, 1);
    00033
    00045 struct iCelEntity : public iBase
    00046 {
    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
    00124 SCF_VERSION (iCelEntityList, 0, 0, 1);
    00125
    00134 struct iCelEntityList : public iBase
    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 };
    00210
    00211 #endif // __CEL_PL_ENTITY__
    00212