Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
object.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2000 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_IOBJECT_OBJECT_H__ 00020 #define __CS_IOBJECT_OBJECT_H__ 00021 00026 #include "csutil/scf.h" 00027 #include "csutil/ref.h" 00028 00029 struct iObjectIterator; 00030 00036 #define CS_GET_CHILD_OBJECT(object,Interface) \ 00037 csPtr<Interface> ((Interface*)(object)->GetChild( \ 00038 scfInterface<Interface>::GetID(), scfInterface<Interface>::GetVersion())) 00039 00044 #define CS_GET_NAMED_CHILD_OBJECT(object,Interface,name) \ 00045 csPtr<Interface> ((Interface*)(object)->GetChild( \ 00046 scfInterface<Interface>::GetID(), scfInterface<Interface>::GetVersion(), \ 00047 name)) 00048 00053 #define CS_GET_FIRST_NAMED_CHILD_OBJECT(object,Interface,name) \ 00054 csPtr<Interface> ((Interface*)(object)->GetChild( \ 00055 scfInterface<Interface>::GetID(), scfInterface<Interface>::GetVersion(), \ 00056 name, true)) 00057 00058 00059 SCF_VERSION (iObject, 0, 3, 0); 00060 00079 struct iObject : public iBase 00080 { 00082 virtual void SetName (const char *iName) = 0; 00083 00085 virtual const char *GetName () const = 0; 00086 00088 virtual uint GetID () const = 0; 00089 00094 virtual void SetObjectParent (iObject *obj) = 0; 00095 00097 virtual iObject* GetObjectParent () const = 0; 00098 00100 virtual void ObjAdd (iObject *obj) = 0; 00101 00103 virtual void ObjRemove (iObject *obj) = 0; 00104 00106 virtual void ObjRemoveAll () = 0; 00107 00109 virtual void ObjAddChildren (iObject *Parent) = 0; 00110 00121 virtual void* GetChild (int iInterfaceID, int iVersion, 00122 const char *Name = 0, bool FirstName = false) const = 0; 00123 00125 virtual iObject *GetChild (const char *Name) const = 0; 00126 00131 virtual csPtr<iObjectIterator> GetIterator () = 0; 00132 00133 // @@@ temporary fix 00134 virtual void ObjReleaseOld (iObject *obj) = 0; 00135 }; 00136 00137 00138 SCF_VERSION (iObjectIterator, 0, 1, 0); 00139 00152 struct iObjectIterator : public iBase 00153 { 00155 virtual iObject* Next () = 0; 00156 00158 virtual void Reset () = 0; 00159 00161 virtual iObject* GetParentObj () const = 0; 00162 00164 virtual bool HasNext () const = 0; 00165 00172 virtual iObject* FindName (const char* name) = 0; 00173 }; 00174 00177 #endif // __CS_IOBJECT_OBJECT_H__
Generated for Crystal Space by doxygen 1.3.9.1