b311480e |
1 | // Created on: 2001-09-11 |
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 | |
16 | #include <XmlXCAFDrivers.ixx> |
17 | #include <XmlXCAFDrivers_DocumentStorageDriver.hxx> |
18 | #include <XmlXCAFDrivers_DocumentRetrievalDriver.hxx> |
19 | |
20 | #include <Standard_Failure.hxx> |
21 | #include <Standard_GUID.hxx> |
22 | #include <XmlDrivers.hxx> |
23 | #include <Plugin_Macro.hxx> |
24 | |
7fd59977 |
25 | static Standard_GUID XSStorageDriver ("f78ff496-a779-11d5-aab4-0050044b1af1"); |
26 | static Standard_GUID XSRetrievalDriver("f78ff497-a779-11d5-aab4-0050044b1af1"); |
27 | |
28 | Handle(Standard_Transient) XmlXCAFDrivers::Factory(const Standard_GUID& aGUID) |
29 | { |
30 | if(aGUID == XSStorageDriver) |
31 | { |
63c629aa |
32 | #ifdef XMLXCAFDRIVERS_DEB |
7fd59977 |
33 | cout << "XmlXCAFDrivers : Storage Plugin" << endl; |
63c629aa |
34 | #endif |
7fd59977 |
35 | static Handle(XmlXCAFDrivers_DocumentStorageDriver) model_sd |
36 | = new XmlXCAFDrivers_DocumentStorageDriver |
37 | ("Copyright: Open Cascade, 2001-2002"); // default copyright |
38 | return model_sd; |
39 | } |
40 | if(aGUID == XSRetrievalDriver) |
41 | { |
63c629aa |
42 | #ifdef XMLXCAFDRIVERS_DEB |
7fd59977 |
43 | cout << "XmlXCAFDrivers : Retrieval Plugin" << endl; |
63c629aa |
44 | #endif |
7fd59977 |
45 | static Handle (XmlXCAFDrivers_DocumentRetrievalDriver) model_rd |
46 | = new XmlXCAFDrivers_DocumentRetrievalDriver; |
47 | return model_rd; |
48 | } |
49 | |
50 | return XmlDrivers::Factory (aGUID); |
51 | } |
52 | |
498ce76b |
53 | #ifdef _MSC_VER |
54 | #pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ |
55 | #endif |
7fd59977 |
56 | PLUGIN(XmlXCAFDrivers) |