Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csobject.h

00001 /*
00002     Copyright (C) 1998-2001 by Jorrit Tyberghein
00003     csObject library (C) 1999 by Ivan Avramovic <ivan@avramovic.com>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CSOBJ_H__
00021 #define __CSOBJ_H__
00022 
00023 #include "cstypes.h"
00024 #include "csutil/util.h"
00025 #include "iutil/object.h"
00026 
00032 class csObject : public iObject
00033 {
00034 protected:
00035   friend class csObjectIterator;
00037   CS_ID csid;
00038 
00040   class csObjectContainer *Children;
00041 
00043   char *Name;
00044 
00046   iObject *ParentObject;
00047 
00049   void InitializeObject ();
00050 
00051 public:
00053   csObject (iBase* pParent = NULL);
00054 
00060   csObject (csObject &o);
00061 
00063   virtual ~csObject ();
00064 
00066   virtual void SetName (const char *iName);
00067 
00069   virtual const char *GetName () const;
00070 
00072   virtual CS_ID GetID () const;
00073 
00075   virtual void SetObjectParent (iObject *);
00076 
00078   virtual iObject* GetObjectParent () const;
00079 
00081   virtual void ObjAdd (iObject *obj);
00082 
00084   virtual void ObjRemove (iObject *obj);
00085 
00087   virtual void ObjRemoveAll ();
00088 
00090   virtual void ObjAddChildren (iObject *Parent);
00091 
00102   virtual void* GetChild (int iInterfaceID, int iVersion,
00103     const char *Name = NULL, bool FirstName = false) const;
00104 
00106   virtual iObject *GetChild (const char *Name) const;
00107 
00112   virtual iObjectIterator *GetIterator ();
00113 
00114   SCF_DECLARE_IBASE;
00115 
00116   // @@@ temporary fix
00117   virtual void ObjReleaseOld (iObject *obj);
00118 };
00119 
00120 #endif // __CSOBJ_H__

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000