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 
00048 public:
00050   csObject (iBase* pParent = NULL);
00052   virtual ~csObject ();
00053 
00055   virtual void SetName (const char *iName);
00056 
00058   virtual const char *GetName () const;
00059 
00061   virtual CS_ID GetID () const;
00062 
00064   virtual void SetObjectParent (iObject *);
00065 
00067   virtual iObject* GetObjectParent () const;
00068 
00070   virtual void ObjAdd (iObject *obj);
00071 
00073   virtual void ObjRemove (iObject *obj);
00074 
00076   virtual void ObjRemoveAll ();
00077 
00079   virtual void ObjAddChildren (iObject *Parent);
00080 
00091   virtual void* GetChild (int iInterfaceID, int iVersion,
00092     const char *Name = NULL, bool FirstName = false) const;
00093 
00095   virtual iObject *GetChild (const char *Name) const;
00096 
00101   virtual iObjectIterator *GetIterator ();
00102 
00103   SCF_DECLARE_IBASE;
00104 
00105   // @@@ temporary fix
00106   virtual void ObjReleaseOld (iObject *obj);
00107 };
00108 
00109 #endif // __CSOBJ_H__

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