1 // Created on: 2000-09-07
2 // Created by: TURIN Anatoliy
3 // Copyright (c) 2000-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 #include <StdLDrivers.ixx>
17 #include <StdLDrivers_DocumentStorageDriver.hxx>
18 #include <StdLDrivers_DocumentRetrievalDriver.hxx>
19 #include <ShapeSchema.hxx>
20 #include <Storage_HArrayOfSchema.hxx>
21 #include <StdLSchema.hxx>
23 #include <Standard_Failure.hxx>
24 #include <Standard_GUID.hxx>
25 #include <Plugin_Macro.hxx>
27 static Standard_GUID StdLStorageDriver ("bd696000-5b34-11d1-b5ba-00a0c9064368");
28 static Standard_GUID StdLRetrievalDriver ("bd696001-5b34-11d1-b5ba-00a0c9064368");
29 static Standard_GUID StdLSchemaID ("bd696002-5b34-11d1-b5ba-00a0c9064368");
31 Handle(Standard_Transient) StdLDrivers::Factory(const Standard_GUID& aGUID) {
33 if(aGUID == StdLSchemaID) {
35 cout << "StdLSchema : Plugin" << endl;
37 static Handle(StdLSchema) model_ss = new StdLSchema;
38 Handle(ShapeSchema) aSSchema = new ShapeSchema;
39 Handle(Storage_HArrayOfSchema) aSchemas = new Storage_HArrayOfSchema(0,0);
40 aSchemas->SetValue(0, aSSchema);
41 model_ss->SetNestedSchemas(aSchemas);
46 if(aGUID == StdLStorageDriver) {
48 cout << "StdLDrivers : Storage Plugin" << endl;
50 static Handle(StdLDrivers_DocumentStorageDriver) model_sd = new StdLDrivers_DocumentStorageDriver;
53 if(aGUID == StdLRetrievalDriver) {
55 cout << "StdLDrivers : Retrieval Plugin" << endl;
57 static Handle(StdLDrivers_DocumentRetrievalDriver) model_rd = new StdLDrivers_DocumentRetrievalDriver;
61 Standard_Failure::Raise ("StdLDrivers : unknown GUID");
62 Handle(Standard_Transient) t;
67 #pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
70 // Declare entry point PLUGINFACTORY