// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _CDM_Application_HeaderFile
#define _CDM_Application_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_CDM_Application.hxx>

#include <Standard_Transient.hxx>
#include <Handle_CDM_Document.hxx>
#include <Handle_CDM_MetaData.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Handle_Resource_Manager.hxx>
#include <Handle_CDM_MessageDriver.hxx>
#include <Standard_ExtString.hxx>
class CDM_Reference;
class CDM_MetaData;
class CDM_Document;
class Resource_Manager;
class CDM_MessageDriver;
class TCollection_ExtendedString;



class CDM_Application : public Standard_Transient
{

public:

  
  //! the manager returned by  this virtual  method will be
  //! used to search for Format`.Retrieval  resource items.
  Standard_EXPORT virtual   Handle(Resource_Manager) Resources()  = 0;
  
  //! By default returns a NullMessageDriver;
  Standard_EXPORT virtual   Handle(CDM_MessageDriver) MessageDriver() ;
  
  //! this method is called before the update of a document.
  //! By default, writes in MessageDriver().
  Standard_EXPORT virtual   void BeginOfUpdate (const Handle(CDM_Document)& aDocument) ;
  
  //! this method is called affter the update of a document.
  //! By default, writes in MessageDriver().
  Standard_EXPORT virtual   void EndOfUpdate (const Handle(CDM_Document)& aDocument, const Standard_Boolean Status, const TCollection_ExtendedString& ErrorString) ;
  
  //! writes the string in the application MessagerDriver.
  Standard_EXPORT   void Write (const Standard_ExtString aString) ;


friend class CDM_Reference;
friend class CDM_MetaData;


  DEFINE_STANDARD_RTTI(CDM_Application)

protected:

  
  Standard_EXPORT   void SetDocumentVersion (const Handle(CDM_Document)& aDocument, const Handle(CDM_MetaData)& aMetaData)  const;
  
  Standard_EXPORT   void SetReferenceCounter (const Handle(CDM_Document)& aDocument, const Standard_Integer aReferenceCounter) ;



private: 

  
  Standard_EXPORT virtual   Handle(CDM_Document) Retrieve (const Handle(CDM_MetaData)& aMetaData, const Standard_Boolean UseStorageConfiguration)  = 0;
  
  //! returns -1 if the metadata has no modification counter.
  Standard_EXPORT virtual   Standard_Integer DocumentVersion (const Handle(CDM_MetaData)& aMetaData)  = 0;



};







#endif // _CDM_Application_HeaderFile
