Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:19:46

0001 // Created on: 2002-10-29
0002 // Created by: Michael SAZONOV
0003 // Copyright (c) 2002-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BinMDF_ADriver_HeaderFile
0017 #define _BinMDF_ADriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <Standard_Transient.hxx>
0022 #include <BinObjMgt_RRelocationTable.hxx>
0023 #include <BinObjMgt_SRelocationTable.hxx>
0024 class Message_Messenger;
0025 class TDF_Attribute;
0026 class BinObjMgt_Persistent;
0027 
0028 
0029 class BinMDF_ADriver;
0030 DEFINE_STANDARD_HANDLE(BinMDF_ADriver, Standard_Transient)
0031 
0032 //! Attribute Storage/Retrieval Driver.
0033 class BinMDF_ADriver : public Standard_Transient
0034 {
0035 
0036 public:
0037 
0038   
0039   //! Creates a new attribute from TDF.
0040   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const = 0;
0041   
0042   //! Returns the type of source object,
0043   //! inheriting from Attribute from TDF.
0044   Standard_EXPORT virtual const Handle(Standard_Type)& SourceType() const;
0045   
0046   //! Returns the type name of the attribute object
0047     const TCollection_AsciiString& TypeName() const;
0048   
0049   //! Translate the contents of <aSource> and put it
0050   //! into <aTarget>, using the relocation table
0051   //! <aRelocTable> to keep the sharings.
0052   Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& aSource, const Handle(TDF_Attribute)& aTarget, BinObjMgt_RRelocationTable& aRelocTable) const = 0;
0053   
0054   //! Translate the contents of <aSource> and put it
0055   //! into <aTarget>, using the relocation table
0056   //! <aRelocTable> to keep the sharings.
0057   Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& aSource, BinObjMgt_Persistent& aTarget, BinObjMgt_SRelocationTable& aRelocTable) const = 0;
0058 
0059   //! Returns the current message driver of this driver
0060   const Handle(Message_Messenger)& MessageDriver() const { return myMessageDriver; }
0061 
0062   DEFINE_STANDARD_RTTIEXT(BinMDF_ADriver,Standard_Transient)
0063 
0064 protected:
0065 
0066   
0067   Standard_EXPORT BinMDF_ADriver(const Handle(Message_Messenger)& theMsgDriver, const Standard_CString theName = NULL);
0068 
0069   TCollection_AsciiString myTypeName;
0070 
0071   Handle(Message_Messenger) myMessageDriver;
0072 
0073 
0074 };
0075 
0076 
0077 #include <BinMDF_ADriver.lxx>
0078 
0079 
0080 
0081 
0082 
0083 #endif // _BinMDF_ADriver_HeaderFile