1 // Created on: 2001-09-26
2 // Created by: Julia DOROVSKIKH
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _XmlMDF_ADriverTable_HeaderFile
17 #define _XmlMDF_ADriverTable_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <XmlMDF_TypeADriverMap.hxx>
23 #include <MMgt_TShared.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Type.hxx>
29 class XmlMDF_ADriverTable;
30 DEFINE_STANDARD_HANDLE(XmlMDF_ADriverTable, MMgt_TShared)
32 //! A driver table is an object building links between
33 //! object types and object drivers. In the
34 //! translation process, a driver table is asked to
35 //! give a translation driver for each current object
37 class XmlMDF_ADriverTable : public MMgt_TShared
43 //! Creates a mutable ADriverTable from XmlMDF.
44 Standard_EXPORT XmlMDF_ADriverTable();
46 //! Sets a translation driver: <aDriver>.
47 Standard_EXPORT void AddDriver (const Handle(XmlMDF_ADriver)& anHDriver);
49 //! Gets a map of drivers.
50 Standard_EXPORT const XmlMDF_TypeADriverMap& GetDrivers() const;
52 //! Gets a driver <aDriver> according to <aType>
54 //! Returns True if a driver is found; false otherwise.
55 Standard_EXPORT Standard_Boolean GetDriver (const Handle(Standard_Type)& aType, Handle(XmlMDF_ADriver)& anHDriver) const;
60 DEFINE_STANDARD_RTTI(XmlMDF_ADriverTable,MMgt_TShared)
70 XmlMDF_TypeADriverMap myMap;
81 #endif // _XmlMDF_ADriverTable_HeaderFile