Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:15:51

0001 // Created on: 2005-05-17
0002 // Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
0003 // Copyright (c) 2005-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 _BinMXCAFDoc_LocationDriver_HeaderFile
0017 #define _BinMXCAFDoc_LocationDriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <BinMNaming_NamedShapeDriver.hxx>
0023 #include <BinMDF_ADriver.hxx>
0024 #include <BinObjMgt_RRelocationTable.hxx>
0025 #include <BinObjMgt_SRelocationTable.hxx>
0026 class Message_Messenger;
0027 class TDF_Attribute;
0028 class BinObjMgt_Persistent;
0029 class TopLoc_Location;
0030 
0031 class BinMXCAFDoc_LocationDriver;
0032 DEFINE_STANDARD_HANDLE(BinMXCAFDoc_LocationDriver, BinMDF_ADriver)
0033 
0034 class BinMXCAFDoc_LocationDriver : public BinMDF_ADriver
0035 {
0036 
0037 public:
0038   Standard_EXPORT BinMXCAFDoc_LocationDriver(const Handle(Message_Messenger)& theMsgDriver);
0039 
0040   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0041 
0042   Standard_EXPORT virtual Standard_Boolean Paste(const BinObjMgt_Persistent&  theSource,
0043                                                  const Handle(TDF_Attribute)& theTarget,
0044                                                  BinObjMgt_RRelocationTable&  theRelocTable) const
0045     Standard_OVERRIDE;
0046 
0047   Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& theSource,
0048                                      BinObjMgt_Persistent&        theTarget,
0049                                      BinObjMgt_SRelocationTable&  theRelocTable) const
0050     Standard_OVERRIDE;
0051 
0052   Standard_EXPORT Standard_Boolean Translate(const BinObjMgt_Persistent& theSource,
0053                                              TopLoc_Location&            theLoc,
0054                                              BinObjMgt_RRelocationTable& theMap) const;
0055 
0056   //! Translate transient location to storable
0057   Standard_EXPORT void Translate(const TopLoc_Location&      theLoc,
0058                                  BinObjMgt_Persistent&       theTarget,
0059                                  BinObjMgt_SRelocationTable& theMap) const;
0060 
0061   void SetNSDriver(const Handle(BinMNaming_NamedShapeDriver)& theNSDriver)
0062   {
0063     myNSDriver = theNSDriver;
0064   }
0065 
0066   DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_LocationDriver, BinMDF_ADriver)
0067 
0068 protected:
0069 private:
0070   Handle(BinMNaming_NamedShapeDriver) myNSDriver;
0071 };
0072 
0073 #endif // _BinMXCAFDoc_LocationDriver_HeaderFile