0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / XmlDrivers / XmlDrivers_DocumentStorageDriver.cxx
CommitLineData
b311480e 1// Created on: 2001-07-09
2// Created by: Julia DOROVSKIKH
973c2be1 3// Copyright (c) 2001-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
42cf5bc1 16
83ae3591 17#include <Message_Messenger.hxx>
42cf5bc1 18#include <Standard_Type.hxx>
19#include <TCollection_ExtendedString.hxx>
20#include <TNaming_NamedShape.hxx>
7fd59977 21#include <XmlDrivers.hxx>
42cf5bc1 22#include <XmlDrivers_DocumentStorageDriver.hxx>
23#include <XmlMDF_ADriverTable.hxx>
7fd59977 24#include <XmlMNaming_NamedShapeDriver.hxx>
7fd59977 25#include <XmlObjMgt_Element.hxx>
42cf5bc1 26
92efcf78 27IMPLEMENT_STANDARD_RTTIEXT(XmlDrivers_DocumentStorageDriver,XmlLDrivers_DocumentStorageDriver)
28
7fd59977 29//=======================================================================
30//function : XmlDrivers_DocumentStorageDriver
31//purpose : Constructor
32//=======================================================================
33XmlDrivers_DocumentStorageDriver::XmlDrivers_DocumentStorageDriver
34 (const TCollection_ExtendedString& theCopyright) :
35 XmlLDrivers_DocumentStorageDriver(theCopyright)
36{
37}
38
39//=======================================================================
40//function : AttributeDrivers
41//purpose :
42//=======================================================================
43Handle(XmlMDF_ADriverTable) XmlDrivers_DocumentStorageDriver::AttributeDrivers
83ae3591 44 (const Handle(Message_Messenger)& theMessageDriver)
7fd59977 45{
46 return XmlDrivers::AttributeDrivers (theMessageDriver);
47}
48
49//=======================================================================
50//function : WriteShapeSection
51//purpose : Implements WriteShapeSection
52//=======================================================================
53Standard_Boolean XmlDrivers_DocumentStorageDriver::WriteShapeSection
54 (XmlObjMgt_Element& theElement)
55{
7fd59977 56 Standard_Boolean isShape(Standard_False);
aa00364d 57 Handle(XmlMDF_ADriver) aDriver;
58 if (myDrivers->GetDriver (STANDARD_TYPE(TNaming_NamedShape), aDriver))
59 {
60 Handle(XmlMNaming_NamedShapeDriver) aNamedShapeDriver =
61 Handle(XmlMNaming_NamedShapeDriver)::DownCast (aDriver);
7fd59977 62 aNamedShapeDriver -> WriteShapeSection (theElement);
63 isShape = Standard_True;
64 }
65 return isShape;
66}