1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

2
src/XCAFDrivers/FILES Executable file
View File

@@ -0,0 +1,2 @@
FILES
GUID.txt

5
src/XCAFDrivers/GUID.txt Executable file
View File

@@ -0,0 +1,5 @@
GUIDs defined here:
ed8793f8-3142-11d4-b9b5-0060b0ee281b: DECAF storage driver
ed8793f9-3142-11d4-b9b5-0060b0ee281b: DECAF retrieval driver
ed8793fa-3142-11d4-b9b5-0060b0ee281b: XS schema

48
src/XCAFDrivers/XCAFDrivers.cdl Executable file
View File

@@ -0,0 +1,48 @@
-- File: XCAFDrivers.cdl
-- Created: Wed May 24 11:09:20 2000
-- Author: Edward AGAPOV
-- <det@strelox.nnov.matra-dtv.fr>
---Copyright: Matra Datavision 2000
package XCAFDrivers
---Purpose:
uses
TCollection,
CDM,
PCDM,
TDF,
PDF,
MDF,
TDocStd,
MDocStd,
PDocStd
is
class DocumentRetrievalDriver;
class DocumentStorageDriver;
---Category: Factory methods
-- ==============================================================
Factory (aGUID: GUID from Standard)
returns Transient from Standard;
---Purpose: Depending from the ID, returns a list of storage
-- or retrieval attribute drivers. Used for plugin.
--
-- Standard data model drivers
-- ===========================
-- 47b0b826-d931-11d1-b5da-00a0c9064368 Transient-Persistent
-- 47b0b827-d931-11d1-b5da-00a0c9064368 Persistent-Transient
--
-- XCAF data model drivers
-- =================================
-- ed8793f8-3142-11d4-b9b5-0060b0ee281b Transient-Persistent
-- ed8793f9-3142-11d4-b9b5-0060b0ee281b Persistent-Transient
-- ed8793fa-3142-11d4-b9b5-0060b0ee281b XCAFSchema
end XCAFDrivers;

70
src/XCAFDrivers/XCAFDrivers.cxx Executable file
View File

@@ -0,0 +1,70 @@
// File: XSDrivers.cxx
// Created: Wed May 24 11:21:25 2000
// Author: Edward AGAPOV
// <det@strelox.nnov.matra-dtv.fr>
#include <XCAFDrivers.ixx>
#include <XCAFDrivers_DocumentStorageDriver.hxx>
#include <XCAFDrivers_DocumentRetrievalDriver.hxx>
#include <XCAFSchema.hxx>
#include <Standard_Failure.hxx>
#include <Standard_GUID.hxx>
#include <StdDrivers.hxx>
#include <Storage_HArrayOfSchema.hxx>
#include <StdSchema.hxx>
#include <StdLSchema.hxx>
#include <ShapeSchema.hxx>
#include <Plugin_Macro.hxx>
// avoid warnings on 'extern "C"' functions returning C++ classes
#ifdef WNT
#pragma warning(4:4190)
#endif
static Standard_GUID XSStorageDriver ("ed8793f8-3142-11d4-b9b5-0060b0ee281b");
static Standard_GUID XSRetrievalDriver("ed8793f9-3142-11d4-b9b5-0060b0ee281b");
static Standard_GUID XCAFSchemaID ("ed8793fa-3142-11d4-b9b5-0060b0ee281b");
Handle(Standard_Transient) XCAFDrivers::Factory(const Standard_GUID& aGUID) {
if(aGUID == XCAFSchemaID) {
cout << "XCAFSchema : Plugin" << endl;
static Handle(XCAFSchema) model_ss;
static Standard_Boolean IsInitialized = Standard_False;
if (! IsInitialized)
{
IsInitialized = Standard_True;
model_ss = new XCAFSchema;
// nest Standard schema
Handle(Storage_HArrayOfSchema) aSchemaArray = new Storage_HArrayOfSchema (1, 3);
aSchemaArray->SetValue (1, new StdLSchema);
aSchemaArray->SetValue (2, new StdSchema);
aSchemaArray->SetValue (3, new ShapeSchema);
model_ss->SetNestedSchemas (aSchemaArray);
}
return model_ss;
}
if(aGUID == XSStorageDriver)
{
cout << "XCAFDrivers : Storage Plugin" << endl;
static Handle(XCAFDrivers_DocumentStorageDriver) model_sd
= new XCAFDrivers_DocumentStorageDriver;
return model_sd;
}
if(aGUID == XSRetrievalDriver)
{
cout << "XCAFDrivers : Retrieval Plugin" << endl;
static Handle (XCAFDrivers_DocumentRetrievalDriver) model_rd
= new XCAFDrivers_DocumentRetrievalDriver;
return model_rd;
}
return StdDrivers::Factory (aGUID);
}
PLUGIN(XCAFDrivers)

View File

@@ -0,0 +1,25 @@
-- File: XCAFDrivers_DocumentRetrievalDriver.cdl
-- Created: Wed May 24 11:55:16 2000
-- Author: Edward AGAPOV
-- <det@strelox.nnov.matra-dtv.fr>
---Copyright: Matra Datavision 2000
class DocumentRetrievalDriver from XCAFDrivers
inherits DocumentRetrievalDriver from MDocStd
---Purpose: retrieval driver of a XS document
uses
ARDriverTable from MDF,
MessageDriver from CDM
is
Create returns mutable DocumentRetrievalDriver from XCAFDrivers;
AttributeDrivers(me : mutable; theMessageDriver : MessageDriver from CDM)
returns ARDriverTable from MDF
is redefined;
end DocumentRetrievalDriver;

View File

@@ -0,0 +1,38 @@
// File: XCAFDrivers_DocumentRetrievalDriver.cxx
// Created: Wed May 24 11:55:28 2000
// Author: Edward AGAPOV
// <det@strelox.nnov.matra-dtv.fr>
#include <XCAFDrivers_DocumentRetrievalDriver.ixx>
#include <MDF.hxx>
#include <MDataStd.hxx>
#include <MDF_ARDriverHSequence.hxx>
#include <MXCAFDoc.hxx>
#include <StdDrivers_DocumentRetrievalDriver.hxx>
//=======================================================================
//function : XCAFDrivers_DocumentRetrievalDriver
//purpose :
//=======================================================================
XCAFDrivers_DocumentRetrievalDriver::XCAFDrivers_DocumentRetrievalDriver() {}
//=======================================================================
//function : AttributeDrivers
//purpose :
//=======================================================================
Handle(MDF_ARDriverTable) XCAFDrivers_DocumentRetrievalDriver::AttributeDrivers(const Handle(CDM_MessageDriver)& theMessageDriver)
{
// Standard drivers
Handle(StdDrivers_DocumentRetrievalDriver) aDocumentRetrievalDriver = new StdDrivers_DocumentRetrievalDriver;
Handle(MDF_ARDriverTable) aRetrievalTable = aDocumentRetrievalDriver->AttributeDrivers(theMessageDriver);
// Native drivers
Handle(MDF_ARDriverHSequence) anHARSeq = new MDF_ARDriverHSequence();
MXCAFDoc::AddRetrievalDrivers (anHARSeq, theMessageDriver);
//
aRetrievalTable->SetDrivers (anHARSeq); //aRetrievalTable will append Native drivers
return aRetrievalTable;
}

View File

@@ -0,0 +1,25 @@
-- File: XCAFDrivers_DocumentStorageDriver.cdl
-- Created: Wed May 24 11:55:56 2000
-- Author: Edward AGAPOV
-- <det@strelox.nnov.matra-dtv.fr>
---Copyright: Matra Datavision 2000
class DocumentStorageDriver from XCAFDrivers
inherits DocumentStorageDriver from MDocStd
---Purpose: storage driver of a XS document
uses
ASDriverTable from MDF,
MessageDriver from CDM
is
Create returns mutable DocumentStorageDriver from XCAFDrivers;
AttributeDrivers(me : mutable; theMessageDriver : MessageDriver from CDM)
returns ASDriverTable from MDF
is redefined;
end DocumentStorageDriver;

View File

@@ -0,0 +1,41 @@
// File: XCAFDrivers_DocumentStorageDriver.cxx
// Created: Wed May 24 11:56:03 2000
// Author: Edward AGAPOV
// <det@strelox.nnov.matra-dtv.fr>
#include <XCAFDrivers_DocumentStorageDriver.ixx>
#include <MDF.hxx>
#include <MDF_ASDriverHSequence.hxx>
#include <MDF_ASDriverTable.hxx>
#include <MXCAFDoc.hxx>
#include <StdDrivers_DocumentStorageDriver.hxx>
//=======================================================================
//function : XCAFDrivers_DocumentStorageDriver
//purpose :
//=======================================================================
XCAFDrivers_DocumentStorageDriver::XCAFDrivers_DocumentStorageDriver() {}
//=======================================================================
//function : AttributeDrivers
//purpose :
//=======================================================================
Handle(MDF_ASDriverTable) XCAFDrivers_DocumentStorageDriver::AttributeDrivers(const Handle(CDM_MessageDriver)& theMessageDriver)
{
// Standard drivers
Handle(StdDrivers_DocumentStorageDriver) aDocumentStorageDriver =
new StdDrivers_DocumentStorageDriver;
Handle(MDF_ASDriverTable) aStorageTable =
aDocumentStorageDriver->AttributeDrivers(theMessageDriver);
// Native drivers
Handle(MDF_ASDriverHSequence) anHASSeq = new MDF_ASDriverHSequence();
MXCAFDoc::AddStorageDrivers (anHASSeq, theMessageDriver);
//
//aStorageTable will append Native drivers
aStorageTable->SetDrivers (anHASSeq);
return aStorageTable;
}