Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:36

0001 // Created on: 2001-09-11
0002 // Created by: Julia DOROVSKIKH
0003 // Copyright (c) 2001-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 _XmlMXCAFDoc_LocationDriver_HeaderFile
0017 #define _XmlMXCAFDoc_LocationDriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <TopTools_LocationSetPtr.hxx>
0023 #include <XmlMDF_ADriver.hxx>
0024 #include <XmlObjMgt_RRelocationTable.hxx>
0025 #include <XmlObjMgt_SRelocationTable.hxx>
0026 #include <XmlObjMgt_Element.hxx>
0027 class Message_Messenger;
0028 class TDF_Attribute;
0029 class XmlObjMgt_Persistent;
0030 class TopLoc_Location;
0031 
0032 
0033 class XmlMXCAFDoc_LocationDriver;
0034 DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_LocationDriver, XmlMDF_ADriver)
0035 
0036 //! Attribute Driver.
0037 class XmlMXCAFDoc_LocationDriver : public XmlMDF_ADriver
0038 {
0039 
0040 public:
0041 
0042   
0043   Standard_EXPORT XmlMXCAFDoc_LocationDriver(const Handle(Message_Messenger)& theMessageDriver);
0044   
0045   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0046   
0047   Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
0048   
0049   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
0050   
0051   //! Translate a non storable Location to a storable Location.
0052   Standard_EXPORT void Translate (const TopLoc_Location& theLoc, XmlObjMgt_Element& theParent, XmlObjMgt_SRelocationTable& theMap) const;
0053   
0054   //! Translate a storable Location to a non storable Location.
0055   Standard_EXPORT Standard_Boolean Translate (const XmlObjMgt_Element& theParent, TopLoc_Location& theLoc, XmlObjMgt_RRelocationTable& theMap) const;
0056   
0057     void SetSharedLocations (const TopTools_LocationSetPtr& theLocations);
0058 
0059 
0060 
0061 
0062   DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_LocationDriver,XmlMDF_ADriver)
0063 
0064 protected:
0065 
0066 
0067 
0068 
0069 private:
0070 
0071 
0072   TopTools_LocationSetPtr myLocations;
0073 
0074 
0075 };
0076 
0077 
0078 #include <XmlMXCAFDoc_LocationDriver.lxx>
0079 
0080 
0081 
0082 
0083 
0084 #endif // _XmlMXCAFDoc_LocationDriver_HeaderFile