0027111: Add generalized copy constructor in handle class for old compilers
[occt.git] / src / XmlXCAFDrivers / XmlXCAFDrivers.cxx
CommitLineData
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
7fd59977 16
42cf5bc1 17#include <Plugin_Macro.hxx>
7fd59977 18#include <Standard_Failure.hxx>
19#include <Standard_GUID.hxx>
42cf5bc1 20#include <Standard_Transient.hxx>
7fd59977 21#include <XmlDrivers.hxx>
42cf5bc1 22#include <XmlXCAFDrivers.hxx>
23#include <XmlXCAFDrivers_DocumentRetrievalDriver.hxx>
24#include <XmlXCAFDrivers_DocumentStorageDriver.hxx>
7fd59977 25
7fd59977 26static Standard_GUID XSStorageDriver ("f78ff496-a779-11d5-aab4-0050044b1af1");
27static Standard_GUID XSRetrievalDriver("f78ff497-a779-11d5-aab4-0050044b1af1");
28
ce8b059a 29const Handle(Standard_Transient)& XmlXCAFDrivers::Factory(const Standard_GUID& aGUID)
7fd59977 30{
31 if(aGUID == XSStorageDriver)
32 {
0797d9d3 33#ifdef OCCT_DEBUG
7fd59977 34 cout << "XmlXCAFDrivers : Storage Plugin" << endl;
63c629aa 35#endif
4796758e 36 static Handle(Standard_Transient) model_sd
7fd59977 37 = new XmlXCAFDrivers_DocumentStorageDriver
38 ("Copyright: Open Cascade, 2001-2002"); // default copyright
39 return model_sd;
40 }
41 if(aGUID == XSRetrievalDriver)
42 {
0797d9d3 43#ifdef OCCT_DEBUG
7fd59977 44 cout << "XmlXCAFDrivers : Retrieval Plugin" << endl;
63c629aa 45#endif
4796758e 46 static Handle (Standard_Transient) model_rd
7fd59977 47 = new XmlXCAFDrivers_DocumentRetrievalDriver;
48 return model_rd;
49 }
50
51 return XmlDrivers::Factory (aGUID);
52}
53
54PLUGIN(XmlXCAFDrivers)