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

25
src/XCAFApp/XCAFApp.cdl Executable file
View File

@@ -0,0 +1,25 @@
-- File: XCAFApp.cdl
-- Created: Fri Aug 11 13:30:20 2000
-- Author: data exchange team
-- <det@doomox>
---Copyright: Matra Datavision 2000
package XCAFApp
---Purpose: Defines application for DECAF document
-- and provides application-specific tools
--
-- The application should be registered before work with DECAF
-- documents by call to XCAFApp_Application::GetApplication()
uses
TColStd,
TDocStd
is
class Application;
---Purpose: Defines application for DECAF documents
end XCAFApp;

View File

@@ -0,0 +1,46 @@
-- File: XCAFApp_Application.cdl
-- Created: Wed May 24 09:27:01 2000
-- Author: data exchange team
-- <det@strelox.nnov.matra-dtv.fr>
---Copyright: Matra Datavision 2000
class Application from XCAFApp inherits Application from TDocStd
---Purpose: Implements an Application for the DECAF documents
uses
SequenceOfExtendedString from TColStd,
Document from TDocStd
is
Create returns mutable Application from XCAFApp is private;
---Purpose: methods from CDF_Application
-- ============================
Formats(me: mutable; Formats: out SequenceOfExtendedString from TColStd)
is redefined;
ResourcesName (me: mutable) returns CString from Standard is redefined;
---Purpose: methods from TDocStd_Application
-- ================================
InitDocument (me; aDoc : Document from TDocStd) is redefined;
---Purpose: Set XCAFDoc_DocumentTool attribute
---API: method for initialisation
GetApplication (myclass) returns Application from XCAFApp;
---Purpose: Initializes (for the first time) and returns the
-- static object (XCAFApp_Application)
-- This is the only valid method to get XCAFApp_Application
-- object, and it should be called at least once before
-- any actions with documents in order to init application
end Application;

View File

@@ -0,0 +1,68 @@
// File: XCAFApp_Application.cxx
// Created: Wed May 24 11:02:31 2000
// Author: data exchange team
// <det@strelox.nnov.matra-dtv.fr>
#include <XCAFApp_Application.ixx>
#include <TPrsStd_DriverTable.hxx>
#include <XCAFPrs_Driver.hxx>
#include <XCAFDoc_DocumentTool.hxx>
#include <TDF_Label.hxx>
//=======================================================================
//function : GetApplication
//purpose :
//=======================================================================
Handle(XCAFApp_Application) XCAFApp_Application::GetApplication()
{
static Handle(XCAFApp_Application) locApp;
if ( locApp.IsNull() ) locApp = new XCAFApp_Application;
return locApp;
}
//=======================================================================
//function : XCAFApp_Application
//purpose :
//=======================================================================
XCAFApp_Application::XCAFApp_Application()
{
// register driver for presentation
Handle(TPrsStd_DriverTable) table = TPrsStd_DriverTable::Get();
table->AddDriver (XCAFPrs_Driver::GetID(), new XCAFPrs_Driver);
}
//=======================================================================
//function : Formats
//purpose :
//=======================================================================
void XCAFApp_Application::Formats(TColStd_SequenceOfExtendedString& Formats)
{
Formats.Append(TCollection_ExtendedString ("MDTV-XCAF"));
Formats.Append(TCollection_ExtendedString ("XmlXCAF"));
Formats.Append(TCollection_ExtendedString ("XmlOcaf"));
Formats.Append(TCollection_ExtendedString ("MDTV-Standard"));
}
//=======================================================================
//function : ResourcesName
//purpose :
//=======================================================================
Standard_CString XCAFApp_Application::ResourcesName()
{
return Standard_CString("XCAF");
// return Standard_CString("Standard");
}
//=======================================================================
//function : InitDocument
//purpose :
//=======================================================================
void XCAFApp_Application::InitDocument(const Handle(TDocStd_Document)& aDoc) const
{
XCAFDoc_DocumentTool::Set(aDoc->Main());
}