physicallayer/entity.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2001-2011 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 iMessageChannel; 00032 struct iMessageDispatcher; 00033 struct iMessageSender; 00034 struct iObject; 00035 struct iStringSet; 00036 struct iCelCompactDataBufferWriter; 00037 struct iCelCompactDataBufferReader; 00038 00039 struct iSector; 00040 struct iMovable; 00041 00053 struct iCelEntity : public virtual iBase 00054 { 00055 SCF_INTERFACE (iCelEntity, 0, 0, 7); 00056 00062 virtual iObject* QueryObject () = 0; 00063 00068 virtual const char* GetName () const = 0; 00069 00074 virtual void SetName (const char* n) = 0; 00075 00080 virtual uint GetID () const = 0; 00081 00086 virtual void SetID (uint n) = 0; 00087 00093 virtual void SetTemplateNameID (csStringID id) = 0; 00094 00099 virtual csStringID GetTemplateNameID () const = 0; 00100 00106 virtual iCelPropertyClassList* GetPropertyClassList () = 0; 00107 00113 virtual void SetBehaviour (iCelBehaviour* behaviour) = 0; 00114 00120 virtual iCelBehaviour* GetBehaviour () = 0; 00121 00127 virtual void AddClass (csStringID cls) = 0; 00128 00132 virtual void RemoveClass (csStringID cls) = 0; 00133 00137 virtual bool HasClass (csStringID cls) = 0; 00138 00142 virtual const csSet<csStringID>& GetClasses () const = 0; 00143 00148 virtual iMessageChannel* QueryMessageChannel () = 0; 00149 00155 virtual csRef<iMessageDispatcher> CreateTaggedMessageDispatcher ( 00156 iMessageSender* sender, csStringID msg_id, 00157 const char* tag) = 0; 00158 00163 virtual bool IsPositional () const = 0; 00164 00170 virtual void Activate () = 0; 00171 00176 virtual void Deactivate () = 0; 00177 00181 virtual bool IsActive () const = 0; 00182 00189 virtual void MarkBaseline () = 0; 00190 00195 virtual bool IsModifiedSinceBaseline () const = 0; 00196 00200 virtual bool ExistedAtBaseline () const = 0; 00201 00206 virtual void SaveModifications (iCelCompactDataBufferWriter* buf, iStringSet* strings) = 0; 00207 00213 virtual void RestoreModifications (iCelCompactDataBufferReader* buf, 00214 const csHash<csString,csStringID>& strings) = 0; 00215 }; 00216 00225 struct iCelEntityList : public virtual iBase 00226 { 00227 SCF_INTERFACE (iCelEntityList, 0, 0, 2); 00228 00234 virtual size_t GetCount () const = 0; 00235 00244 virtual iCelEntity* Get (size_t n) const = 0; 00245 00254 virtual size_t Add (iCelEntity* obj) = 0; 00255 00264 virtual bool Remove (iCelEntity* obj) = 0; 00265 00274 virtual bool Remove (size_t n) = 0; 00275 00281 virtual void RemoveAll () = 0; 00282 00291 virtual size_t Find (iCelEntity* obj) const = 0; 00292 00301 virtual iCelEntity* FindByName (const char *Name) const = 0; 00302 00308 virtual csPtr<iCelEntityIterator> GetIterator () const = 0; 00309 }; 00310 00314 struct iCelEntityIterator : public virtual iBase 00315 { 00316 SCF_INTERFACE (iCelEntityIterator, 0, 0, 1); 00317 00321 virtual iCelEntity* Next () = 0; 00322 00326 virtual bool HasNext () const = 0; 00327 }; 00328 00329 #endif // __CEL_PL_ENTITY__ 00330
Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1
