0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / XmlDrivers / XmlDrivers_DocumentStorageDriver.cxx
1 // Created on: 2001-07-09
2 // Created by: Julia DOROVSKIKH
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16
17 #include <CDM_MessageDriver.hxx>
18 #include <Standard_Type.hxx>
19 #include <TCollection_ExtendedString.hxx>
20 #include <TNaming_NamedShape.hxx>
21 #include <XmlDrivers.hxx>
22 #include <XmlDrivers_DocumentStorageDriver.hxx>
23 #include <XmlMDF_ADriverTable.hxx>
24 #include <XmlMNaming_NamedShapeDriver.hxx>
25 #include <XmlObjMgt_Element.hxx>
26
27 IMPLEMENT_STANDARD_RTTIEXT(XmlDrivers_DocumentStorageDriver,XmlLDrivers_DocumentStorageDriver)
28
29 //=======================================================================
30 //function : XmlDrivers_DocumentStorageDriver
31 //purpose  : Constructor
32 //=======================================================================
33 XmlDrivers_DocumentStorageDriver::XmlDrivers_DocumentStorageDriver
34                                 (const TCollection_ExtendedString& theCopyright) :
35   XmlLDrivers_DocumentStorageDriver(theCopyright)
36
37 }
38
39 //=======================================================================
40 //function : AttributeDrivers
41 //purpose  : 
42 //=======================================================================
43 Handle(XmlMDF_ADriverTable) XmlDrivers_DocumentStorageDriver::AttributeDrivers
44        (const Handle(CDM_MessageDriver)& theMessageDriver) 
45 {
46   return XmlDrivers::AttributeDrivers (theMessageDriver);
47 }
48
49 //=======================================================================
50 //function : WriteShapeSection
51 //purpose  : Implements WriteShapeSection
52 //=======================================================================
53 Standard_Boolean XmlDrivers_DocumentStorageDriver::WriteShapeSection
54                                          (XmlObjMgt_Element&  theElement)
55 {
56   Handle(XmlMNaming_NamedShapeDriver) aNamedShapeDriver;
57   Standard_Boolean isShape(Standard_False);
58   if (myDrivers -> GetDriver (STANDARD_TYPE(TNaming_NamedShape),
59                               aNamedShapeDriver)) {
60     aNamedShapeDriver -> WriteShapeSection (theElement); 
61     isShape = Standard_True;
62   }
63   return isShape;
64 }