#ifdef __PRIVATE__
//#
//#	File:		PstObj.idl
//#
//#	Contains:	Interface for ODPersistentObject class
//#
//#	Owned by:	Caia Grisar
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <6>	 8/24/94	CG		#1181622: Updated file ownership.
//#		 <5>	 8/16/94	VL		1143605: Added CloneInto.
//#		 <4>	 6/23/94	CG		Added functionprefix.
//#		 <3>	  6/8/94	CG		Forgot #endif.
//#		 <2>	  6/8/94	CG		Privatize change history.
//#		 <1>	  6/8/94	CG		first checked in
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _PSTOBJ_
#define _PSTOBJ_

#ifndef _REFCTOBJ_
#include "RefCtObj.idl"
#endif

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

/*
  This file defines class ODPersistentObject.  This class is the common base
  class for all OpenDoc classes whose objects require persistent storage.
*/

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

interface  ODPersistentObject;

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

interface	ODStorageUnit;
interface	ODFrame;

//==============================================================================
// ODPersistentObject
//==============================================================================

interface ODPersistentObject :  ODRefCntObject
{
  void  InitPersistentObject(in ODStorageUnit storageUnit);
 
  void  InitPersistentObjectFromStorage(in ODStorageUnit storageUnit);
    
  void  ReleaseAll();
  
  void  Externalize();
                  
  ODStorageUnit  GetStorageUnit();
    
  ODID   GetID();
  
  void CloneInto(in ODDraftKey key,
  							in ODStorageUnit toSU,
							in ODFrame scope);
  
#ifdef __SOMIDL__
	implementation
	{
  	functionprefix = ODPersistentObject;
	
  	override:
		somInit,
		somUninit;
	
    releaseorder:
        InitPersistentObject,
        InitPersistentObjectFromStorage,
        ReleaseAll,
        Externalize,
        GetStorageUnit,
        GetID,
		CloneInto;
		
    #ifdef __PRIVATE__
      ODStorageUnit   fSU;
      ODID      fID;
    #endif
    
  };
#endif
};

#endif //# _PSTOBJ_

