#ifdef __PRIVATE__
//#
//#	File:		ODObject.idl
//#
//#	Contains:	Interface for ODObject class
//#
//#	Owned by:	Richard Rodseth, Caia Grisar
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		<11>	 9/15/94	NP		Wrap inclusion of Except.h with private
//#									section.
//#		<10>	  9/9/94	jpa		Include Except.h to enable auto-throw.
//#									[1185656]
//#		 <9>	 8/24/94	CG		#1181622: Updated file ownership.
//#		 <8>	 8/12/94	VL		Added IsEqualTo.
//#		 <7>	 6/22/94	CG		Added functionprefix.
//#		 <6>	 6/17/94	jpa		Fixed syntax error (caught only by
//#									CodeWarrior) in passthru of includes.
//#		 <5>	 6/15/94	NP		Removed another unneeded semi.
//#		 <4>	 6/13/94	NP		Removed unneeded semi-colon.
//#		 <3>	  6/8/94	CG		Privatize change history.
//#		 <2>	  6/8/94	CG		Privatize change history.
//#		 <1>	  6/8/94	CG		first checked in
//#		 <9>	 5/23/94	RR		include GeoTypes and Polygon
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _ODOBJECT_
#define _ODOBJECT_

#include <somobj.idl>
#include <somcls.idl>

#ifndef _ODTYPESM_
#include "ODTypesM.idl"
#endif

#ifndef _GEOTYPES_
#include "GeoTypes.idl"
#endif

#ifndef _POLYGON_
#include "Polygon.idl"
#endif

//==============================================================================
// Theory of Operation
//==============================================================================

/*
  This file defines class ODObject.  This class is the common base class
  for all OpenDoc classes.  It provides for extensibility through the
  Extensions protocol.
*/

//==============================================================================
// Classes defined in this interface
//==============================================================================

interface  ODObject;

//==============================================================================
// Classes used by this interface
//==============================================================================

interface  ODExtension;

//==============================================================================
// ODObject
//==============================================================================

interface M_ODObject : SOMClass
{
#ifdef __SOMIDL__
	implementation
	{
		somNew : override;
	};
#endif
};

interface ODObject  : SOMObject
{
	void InitObject();
	
	ODBoolean IsInitialized();
  
	ODBoolean HasExtension(in ODType extensionName);
  
	ODExtension GetExtension(in ODType extensionName);
  
	void ReleaseExtension(in ODExtension extension);
  
    ODSize  Purge(in ODSize size);
	
	ODBoolean IsEqualTo(in ODObject object);
	
	void SubClassResponsibility();
      
#ifdef __SOMIDL__

  implementation
  {
	metaclass = M_ODObject;
  	functionprefix = ODObject;

	passthru C_h =
	""
	"#include <ODTypes.h>"
	""
  #ifdef __PRIVATE__
	"#ifndef _EXCEPT_"
	"#include <Except.h>"	//# for SOMCHKEXCEPT
	"#endif"
  #endif
	"";

	passthru C_xh =
	""
	"#include <ODTypes.h>"
	""
  #ifdef __PRIVATE__
	"#ifndef _EXCEPT_"
	"#include <Except.h>"	//# for SOMCHKEXCEPT
	"#endif"
  #endif
	"";

    somInit : override;
    somUninit : override;
	
    releaseorder:
        InitObject,
		IsInitialized,
        HasExtension,
        GetExtension,
        ReleaseExtension,
        Purge,
		IsEqualTo,
		SubClassResponsibility;
		
    #ifdef __PRIVATE__
      ODBoolean fInitialized;
    #endif    
  };
  
#endif

};

#endif // _ODOBJECT_

