Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/XmlMXCAFDoc_LocationDriver.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 //! Attribute Driver.
0033 class XmlMXCAFDoc_LocationDriver : public XmlMDF_ADriver
0034 {
0035 
0036 public:
0037   Standard_EXPORT XmlMXCAFDoc_LocationDriver(
0038     const occ::handle<Message_Messenger>& theMessageDriver);
0039 
0040   Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
0041 
0042   Standard_EXPORT bool Paste(const XmlObjMgt_Persistent&       Source,
0043                              const occ::handle<TDF_Attribute>& Target,
0044                              XmlObjMgt_RRelocationTable&       RelocTable) const override;
0045 
0046   Standard_EXPORT void Paste(const occ::handle<TDF_Attribute>& Source,
0047                              XmlObjMgt_Persistent&             Target,
0048                              XmlObjMgt_SRelocationTable&       RelocTable) const override;
0049 
0050   //! Translate a non storable Location to a storable Location.
0051   Standard_EXPORT void Translate(const TopLoc_Location&      theLoc,
0052                                  XmlObjMgt_Element&          theParent,
0053                                  XmlObjMgt_SRelocationTable& theMap) const;
0054 
0055   //! Translate a storable Location to a non storable Location.
0056   Standard_EXPORT bool Translate(const XmlObjMgt_Element&    theParent,
0057                                  TopLoc_Location&            theLoc,
0058                                  XmlObjMgt_RRelocationTable& theMap) const;
0059 
0060   void SetSharedLocations(const TopTools_LocationSetPtr& theLocations);
0061 
0062   DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_LocationDriver, XmlMDF_ADriver)
0063 
0064 private:
0065   TopTools_LocationSetPtr myLocations;
0066 };
0067 
0068 #include <XmlMXCAFDoc_LocationDriver.lxx>
0069 
0070 #endif // _XmlMXCAFDoc_LocationDriver_HeaderFile