// File generated by CPPExt (Transient)
//
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _CDM_Reference_HeaderFile
#define _CDM_Reference_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_CDM_Reference_HeaderFile
#include <Handle_CDM_Reference.hxx>
#endif

#ifndef _Handle_CDM_Document_HeaderFile
#include <Handle_CDM_Document.hxx>
#endif
#ifndef _CDM_DocumentPointer_HeaderFile
#include <CDM_DocumentPointer.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_CDM_Application_HeaderFile
#include <Handle_CDM_Application.hxx>
#endif
#ifndef _Handle_CDM_MetaData_HeaderFile
#include <Handle_CDM_MetaData.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Transient_HeaderFile
#include <Standard_Transient.hxx>
#endif
class CDM_Document;
class CDM_Application;
class CDM_MetaData;



class CDM_Reference : public Standard_Transient {

public:
 // Methods PUBLIC
 // 


Standard_EXPORT   Handle_CDM_Document FromDocument() ;


Standard_EXPORT   Handle_CDM_Document ToDocument() ;


Standard_EXPORT   Standard_Integer ReferenceIdentifier() ;


Standard_EXPORT   Standard_Integer DocumentVersion() const;


Standard_EXPORT   Standard_Boolean IsReadOnly() const;
//Standard_EXPORT ~CDM_Reference();


friend class CDM_Document;


 // Type management
 //
 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
 //Standard_EXPORT Standard_Boolean	       IsKind(const Handle(Standard_Type)&) const;

protected:

 // Methods PROTECTED
 // 


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


Standard_EXPORT CDM_Reference(const Handle(CDM_Document)& aFromDocument,const Handle(CDM_Document)& aToDocument,const Standard_Integer aReferenceIdentifier,const Standard_Integer aToDocumentVersion);


Standard_EXPORT CDM_Reference(const Handle(CDM_Document)& aFromDocument,const Handle(CDM_MetaData)& aMetaData,const Standard_Integer aReferenceIdentifier,const Handle(CDM_Application)& anApplication,const Standard_Integer aToDocumentVersion,const Standard_Boolean UseStorageConfiguration);


Standard_EXPORT   void Update(const Handle(CDM_MetaData)& aMetaData) ;

//! compares the actual document version with the <br>
//!          document version at the creation of the reference <br>
Standard_EXPORT   Standard_Boolean IsUpToDate() const;


Standard_EXPORT   void SetIsUpToDate() ;


Standard_EXPORT   void UnsetToDocument(const Handle(CDM_MetaData)& aMetaData,const Handle(CDM_Application)& anApplication) ;

//! returns  true if the  ToDocument has been retrieved <br>
//!          and opened. <br>
Standard_EXPORT   Standard_Boolean IsOpened() const;


Standard_EXPORT   Handle_CDM_Document Document() const;


Standard_EXPORT   Handle_CDM_MetaData MetaData() const;


Standard_EXPORT   Handle_CDM_Application Application() const;


Standard_EXPORT   Standard_Boolean UseStorageConfiguration() const;


Standard_EXPORT   Standard_Boolean IsInSession() const;


Standard_EXPORT   Standard_Boolean IsStored() const;


 // Fields PRIVATE
 //
Handle_CDM_Document myToDocument;
CDM_DocumentPointer myFromDocument;
Standard_Integer myReferenceIdentifier;
Handle_CDM_Application myApplication;
Handle_CDM_MetaData myMetaData;
Standard_Integer myDocumentVersion;
Standard_Boolean myUseStorageConfiguration;


};





// other Inline functions and methods (like "C++: function call" methods)
//


#endif
