1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

12
src/StepSelect/FILES Normal file
View File

@@ -0,0 +1,12 @@
StepSelect_Activator.cxx
StepSelect_Activator.hxx
StepSelect_FileModifier.hxx
StepSelect_FileModifier_0.cxx
StepSelect_FloatFormat.cxx
StepSelect_FloatFormat.hxx
StepSelect_ModelModifier.hxx
StepSelect_ModelModifier_0.cxx
StepSelect_StepType.cxx
StepSelect_StepType.hxx
StepSelect_WorkLibrary.cxx
StepSelect_WorkLibrary.hxx

View File

@@ -1,40 +0,0 @@
-- Created on: 1994-12-22
-- Created by: Christian CAILLET
-- Copyright (c) 1994-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package StepSelect
---Purpose : This package defines the library of the tools used for every
-- kind of STEP Files, i.e. whatever the considered Protocol.
uses MMgt, TCollection, TColStd, Message,
Interface, IFGraph, IFSelect, StepData
is
class StepType;
deferred class ModelModifier instantiates ModelModifier from IFSelect
(StepModel from StepData, Protocol from StepData);
deferred class FileModifier instantiates FileModifier from IFSelect
(StepWriter from StepData);
class FloatFormat;
class WorkLibrary;
class Activator;
end StepSelect;

View File

@@ -1,36 +0,0 @@
-- Created on: 1995-04-20
-- Created by: Christian CAILLET
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Activator from StepSelect inherits Activator from IFSelect
---Purpose : Performs Actions specific to StepSelect, i.e. creation of
-- Step Selections and Counters, plus dumping specific to Step
uses CString, SessionPilot, ReturnStatus
is
Create returns Activator from StepSelect;
Do (me : mutable; number : Integer; pilot : SessionPilot)
returns ReturnStatus;
---Purpose : Executes a Command Line for StepSelect
Help (me; number : Integer) returns CString;
---Purpose : Sends a short help message for StepSelect commands
end Activator;

View File

@@ -11,20 +11,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_ErrorHandler.hxx>
#include <StepSelect_Activator.ixx>
#include <Interface_Macros.hxx>
#include <Standard_Failure.hxx>
#include <IFSelect_SessionPilot.hxx>
#include <IFSelect_WorkSession.hxx>
#include <Interface_Macros.hxx>
#include <StepData_UndefinedEntity.hxx>
#include <StepData_Simple.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Standard_Type.hxx>
#include <StepData_Plex.hxx>
#include <StepData_Simple.hxx>
#include <StepData_UndefinedEntity.hxx>
#include <StepSelect_Activator.hxx>
#include <StepSelect_FloatFormat.hxx>
static int initActivator = 0;

View File

@@ -0,0 +1,72 @@
// Created on: 1995-04-20
// Created by: Christian CAILLET
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepSelect_Activator_HeaderFile
#define _StepSelect_Activator_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <IFSelect_Activator.hxx>
#include <IFSelect_ReturnStatus.hxx>
#include <Standard_Integer.hxx>
#include <Standard_CString.hxx>
class IFSelect_SessionPilot;
class StepSelect_Activator;
DEFINE_STANDARD_HANDLE(StepSelect_Activator, IFSelect_Activator)
//! Performs Actions specific to StepSelect, i.e. creation of
//! Step Selections and Counters, plus dumping specific to Step
class StepSelect_Activator : public IFSelect_Activator
{
public:
Standard_EXPORT StepSelect_Activator();
//! Executes a Command Line for StepSelect
Standard_EXPORT IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle(IFSelect_SessionPilot)& pilot);
//! Sends a short help message for StepSelect commands
Standard_EXPORT Standard_CString Help (const Standard_Integer number) const;
DEFINE_STANDARD_RTTI(StepSelect_Activator,IFSelect_Activator)
protected:
private:
};
#endif // _StepSelect_Activator_HeaderFile

View File

@@ -0,0 +1,65 @@
// Created on: 1994-12-22
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepSelect_FileModifier_HeaderFile
#define _StepSelect_FileModifier_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <IFSelect_GeneralModifier.hxx>
class StepData_StepWriter;
class IFSelect_ContextWrite;
class StepSelect_FileModifier;
DEFINE_STANDARD_HANDLE(StepSelect_FileModifier, IFSelect_GeneralModifier)
class StepSelect_FileModifier : public IFSelect_GeneralModifier
{
public:
Standard_EXPORT virtual void Perform (IFSelect_ContextWrite& ctx, StepData_StepWriter& writer) const = 0;
DEFINE_STANDARD_RTTI(StepSelect_FileModifier,IFSelect_GeneralModifier)
protected:
Standard_EXPORT StepSelect_FileModifier();
private:
};
#endif // _StepSelect_FileModifier_HeaderFile

View File

@@ -0,0 +1,39 @@
// Created on: 1994-12-22
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepSelect_FileModifier.hxx>
#include <Standard_Type.hxx>
#include <StepData_StepWriter.hxx>
#include <IFSelect_ContextWrite.hxx>
#define Writer StepData_StepWriter
#define Writer_hxx <StepData_StepWriter.hxx>
#define IFSelect_FileModifier StepSelect_FileModifier
#define IFSelect_FileModifier_hxx <StepSelect_FileModifier.hxx>
#define Handle_IFSelect_FileModifier Handle(StepSelect_FileModifier)
#include <IFSelect_FileModifier.gxx>

View File

@@ -1,92 +0,0 @@
-- Created on: 1994-06-01
-- Created by: Christian CAILLET
-- Copyright (c) 1994-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class FloatFormat from StepSelect inherits FileModifier from StepSelect
---Purpose : This class gives control out format for floatting values :
-- ZeroSuppress or no, Main Format, Format in Range (for values
-- around 1.), as StepWriter allows to manage it.
-- Formats are given under C-printf form
uses CString, AsciiString from TCollection, HSequenceOfInteger from TColStd,
CheckIterator, StepWriter , ContextWrite
is
Create returns FloatFormat;
---Purpose : Creates a new FloatFormat, with standard options :
-- ZeroSuppress, Main Format = %E,
-- Format between 0.001 and 1000. = %f
SetDefault (me : mutable; digits : Integer = 0);
---Purpose : Sets FloatFormat to default value (see Create) but if <digits>
-- is given positive, it commands Formats (main and range) to
-- ensure <digits> significant digits to be displayed
SetZeroSuppress (me : mutable; mode : Boolean);
---Purpose : Sets ZeroSuppress mode to a new value
SetFormat (me : mutable; format : CString = "%E");
---Purpose : Sets Main Format to a new value
-- Remark : SetFormat, SetZeroSuppress and SetFormatForRange are
-- independant
SetFormatForRange (me : mutable; format : CString = "%f";
Rmin : Real = 0.1; Rmax : Real = 1000.0);
---Purpose : Sets Format for Range to a new value with its range of
-- application.
-- To cancel it, give format as "" (empty string)
-- Remark that if the condition (0. < Rmin < Rmax) is not
-- verified, this secondary format will be ignored.
-- Moreover, this secondary format is intended to be used in a
-- range around 1.
Format (me; zerosup : out Boolean;
mainform : out AsciiString from TCollection;
hasrange : out Boolean;
forminrange : out AsciiString from TCollection;
rangemin, rangemax : out Real);
---Purpose : Returns all recorded parameters :
-- zerosup : ZeroSuppress status
-- mainform : Main Format (which applies out of the range, or
-- for every real if no range is set)
-- hasrange : True if a FormatInRange is set, False else
-- (following parameters do not apply if it is False)
-- forminrange : Secondary Format (it applies inside the range)
-- rangemin, rangemax : the range in which the secondary format
-- applies
Perform (me; ctx : in out ContextWrite;
writer : in out StepWriter);
---Purpose : Sets the Floatting Formats of StepWriter to the recorded
-- parameters
Label (me) returns AsciiString from TCollection;
---Purpose : Returns specific Label : for instance,
-- "Float Format [ZeroSuppress] %E [, in range R1-R2 %f]"
fields
thezerosup : Boolean;
themainform : AsciiString from TCollection;
theformrange : AsciiString from TCollection;
therangemin : Real;
therangemax : Real;
end FloatFormat;

View File

@@ -11,12 +11,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepSelect_FloatFormat.ixx>
#include <IFSelect_ContextWrite.hxx>
#include <Interface_FloatWriter.hxx>
#include <Standard_Type.hxx>
#include <StepData_StepWriter.hxx>
#include <StepSelect_FloatFormat.hxx>
#include <TCollection_AsciiString.hxx>
#include <stdio.h>
StepSelect_FloatFormat::StepSelect_FloatFormat ()
: thezerosup (Standard_True) , themainform ("%E") ,
theformrange ("%f") , therangemin (0.1) , therangemax (1000.)

View File

@@ -0,0 +1,121 @@
// Created on: 1994-06-01
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepSelect_FloatFormat_HeaderFile
#define _StepSelect_FloatFormat_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_Real.hxx>
#include <StepSelect_FileModifier.hxx>
#include <Standard_Integer.hxx>
#include <Standard_CString.hxx>
class TCollection_AsciiString;
class IFSelect_ContextWrite;
class StepData_StepWriter;
class StepSelect_FloatFormat;
DEFINE_STANDARD_HANDLE(StepSelect_FloatFormat, StepSelect_FileModifier)
//! This class gives control out format for floatting values :
//! ZeroSuppress or no, Main Format, Format in Range (for values
//! around 1.), as StepWriter allows to manage it.
//! Formats are given under C-printf form
class StepSelect_FloatFormat : public StepSelect_FileModifier
{
public:
//! Creates a new FloatFormat, with standard options :
//! ZeroSuppress, Main Format = %E,
//! Format between 0.001 and 1000. = %f
Standard_EXPORT StepSelect_FloatFormat();
//! Sets FloatFormat to default value (see Create) but if <digits>
//! is given positive, it commands Formats (main and range) to
//! ensure <digits> significant digits to be displayed
Standard_EXPORT void SetDefault (const Standard_Integer digits = 0);
//! Sets ZeroSuppress mode to a new value
Standard_EXPORT void SetZeroSuppress (const Standard_Boolean mode);
//! Sets Main Format to a new value
//! Remark : SetFormat, SetZeroSuppress and SetFormatForRange are
//! independant
Standard_EXPORT void SetFormat (const Standard_CString format = "%E");
//! Sets Format for Range to a new value with its range of
//! application.
//! To cancel it, give format as "" (empty string)
//! Remark that if the condition (0. < Rmin < Rmax) is not
//! verified, this secondary format will be ignored.
//! Moreover, this secondary format is intended to be used in a
//! range around 1.
Standard_EXPORT void SetFormatForRange (const Standard_CString format = "%f", const Standard_Real Rmin = 0.1, const Standard_Real Rmax = 1000.0);
//! Returns all recorded parameters :
//! zerosup : ZeroSuppress status
//! mainform : Main Format (which applies out of the range, or
//! for every real if no range is set)
//! hasrange : True if a FormatInRange is set, False else
//! (following parameters do not apply if it is False)
//! forminrange : Secondary Format (it applies inside the range)
//! rangemin, rangemax : the range in which the secondary format
//! applies
Standard_EXPORT void Format (Standard_Boolean& zerosup, TCollection_AsciiString& mainform, Standard_Boolean& hasrange, TCollection_AsciiString& forminrange, Standard_Real& rangemin, Standard_Real& rangemax) const;
//! Sets the Floatting Formats of StepWriter to the recorded
//! parameters
Standard_EXPORT void Perform (IFSelect_ContextWrite& ctx, StepData_StepWriter& writer) const;
//! Returns specific Label : for instance,
//! "Float Format [ZeroSuppress] %E [, in range R1-R2 %f]"
Standard_EXPORT TCollection_AsciiString Label() const;
DEFINE_STANDARD_RTTI(StepSelect_FloatFormat,StepSelect_FileModifier)
protected:
private:
Standard_Boolean thezerosup;
TCollection_AsciiString themainform;
TCollection_AsciiString theformrange;
Standard_Real therangemin;
Standard_Real therangemax;
};
#endif // _StepSelect_FloatFormat_HeaderFile

View File

@@ -0,0 +1,74 @@
// Created on: 1994-12-22
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepSelect_ModelModifier_HeaderFile
#define _StepSelect_ModelModifier_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <IFSelect_Modifier.hxx>
#include <Standard_Boolean.hxx>
class StepData_StepModel;
class StepData_Protocol;
class IFSelect_ContextModif;
class Interface_InterfaceModel;
class Interface_Protocol;
class Interface_CopyTool;
class StepSelect_ModelModifier;
DEFINE_STANDARD_HANDLE(StepSelect_ModelModifier, IFSelect_Modifier)
class StepSelect_ModelModifier : public IFSelect_Modifier
{
public:
Standard_EXPORT void Perform (IFSelect_ContextModif& ctx, const Handle(Interface_InterfaceModel)& target, const Handle(Interface_Protocol)& protocol, Interface_CopyTool& TC) const;
Standard_EXPORT virtual void PerformProtocol (IFSelect_ContextModif& ctx, const Handle(StepData_StepModel)& target, const Handle(StepData_Protocol)& proto, Interface_CopyTool& TC) const;
Standard_EXPORT virtual void Performing (IFSelect_ContextModif& ctx, const Handle(StepData_StepModel)& target, Interface_CopyTool& TC) const = 0;
DEFINE_STANDARD_RTTI(StepSelect_ModelModifier,IFSelect_Modifier)
protected:
Standard_EXPORT StepSelect_ModelModifier(const Standard_Boolean maychangegraph);
private:
};
#endif // _StepSelect_ModelModifier_HeaderFile

View File

@@ -0,0 +1,47 @@
// Created on: 1994-12-22
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepSelect_ModelModifier.hxx>
#include <Standard_Type.hxx>
#include <StepData_StepModel.hxx>
#include <StepData_Protocol.hxx>
#include <IFSelect_ContextModif.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_CopyTool.hxx>
#define Handle_Model Handle(StepData_StepModel)
#define Model StepData_StepModel
#define Model_hxx <StepData_StepModel.hxx>
#define Handle_Proto Handle(StepData_Protocol)
#define Proto StepData_Protocol
#define Proto_hxx <StepData_Protocol.hxx>
#define IFSelect_ModelModifier StepSelect_ModelModifier
#define IFSelect_ModelModifier_hxx <StepSelect_ModelModifier.hxx>
#define Handle_IFSelect_ModelModifier Handle(StepSelect_ModelModifier)
#include <IFSelect_ModelModifier.gxx>

View File

@@ -1,57 +0,0 @@
-- Created on: 1994-12-22
-- Created by: Christian CAILLET
-- Copyright (c) 1994-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class StepType from StepSelect inherits Signature from IFSelect
---Purpose : StepType is a Signature specific to Step definitions : it
-- considers the type as defined in STEP Schemas, the same which
-- is used in files.
-- For a Complex Type, if its definition is known, StepType
-- produces the list of basic types, separated by commas, the
-- whole between brackets : "(TYPE1,TYPE2..)".
-- If its precise definition is not known (simply it is known as
-- Complex, it can be recognised, but the list is produced at
-- Write time only), StepType produces : "(..COMPLEX TYPE..)"
uses CString, Transient, AsciiString from TCollection,
Protocol from Interface, InterfaceModel,
Protocol from StepData, WriterLib from StepData
raises InterfaceError
is
Create returns StepType;
---Purpose : Creates a Signature for Step Type. Protocol is undefined here,
-- hence no Signature may yet be produced. The StepType signature
-- requires a Protocol before working
SetProtocol (me : mutable; proto : Protocol from Interface)
---Purpose : Sets the StepType signature to work with a Protocol : this
-- initialises the library
raises InterfaceError;
-- Error if the Protocol is not from StepData
Value (me; ent : any Transient; model : InterfaceModel) returns CString;
---Purpose : Returns the Step Type defined from the Protocol (see above).
-- If <ent> is not recognised, produces "..NOT FROM SCHEMA <name>.."
fields
theproto : Protocol from StepData;
thelib : WriterLib from StepData is protected;
end StepType;

View File

@@ -11,13 +11,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepSelect_StepType.ixx>
#include <TColStd_SequenceOfAsciiString.hxx>
#include <Interface_InterfaceError.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Protocol.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
#include <StepData_Protocol.hxx>
#include <StepData_ReadWriteModule.hxx>
#include <StepData_UndefinedEntity.hxx>
#include <Interface_InterfaceError.hxx>
#include <Interface_Macros.hxx>
#include <StepSelect_StepType.hxx>
#include <TColStd_SequenceOfAsciiString.hxx>
static TCollection_AsciiString lastvalue;

View File

@@ -0,0 +1,89 @@
// Created on: 1994-12-22
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepSelect_StepType_HeaderFile
#define _StepSelect_StepType_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <StepData_WriterLib.hxx>
#include <IFSelect_Signature.hxx>
#include <Standard_CString.hxx>
class StepData_Protocol;
class Interface_InterfaceError;
class Interface_Protocol;
class Standard_Transient;
class Interface_InterfaceModel;
class StepSelect_StepType;
DEFINE_STANDARD_HANDLE(StepSelect_StepType, IFSelect_Signature)
//! StepType is a Signature specific to Step definitions : it
//! considers the type as defined in STEP Schemas, the same which
//! is used in files.
//! For a Complex Type, if its definition is known, StepType
//! produces the list of basic types, separated by commas, the
//! whole between brackets : "(TYPE1,TYPE2..)".
//! If its precise definition is not known (simply it is known as
//! Complex, it can be recognised, but the list is produced at
//! Write time only), StepType produces : "(..COMPLEX TYPE..)"
class StepSelect_StepType : public IFSelect_Signature
{
public:
//! Creates a Signature for Step Type. Protocol is undefined here,
//! hence no Signature may yet be produced. The StepType signature
//! requires a Protocol before working
Standard_EXPORT StepSelect_StepType();
//! Sets the StepType signature to work with a Protocol : this
//! initialises the library
Standard_EXPORT void SetProtocol (const Handle(Interface_Protocol)& proto);
//! Returns the Step Type defined from the Protocol (see above).
//! If <ent> is not recognised, produces "..NOT FROM SCHEMA <name>.."
Standard_EXPORT Standard_CString Value (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const;
DEFINE_STANDARD_RTTI(StepSelect_StepType,IFSelect_Signature)
protected:
StepData_WriterLib thelib;
private:
Handle(StepData_Protocol) theproto;
};
#endif // _StepSelect_StepType_HeaderFile

View File

@@ -1,82 +0,0 @@
-- Created on: 1994-09-14
-- Created by: Christian CAILLET
-- Copyright (c) 1994-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class WorkLibrary from StepSelect inherits WorkLibrary from IFSelect
---Purpose : Performs Read and Write a STEP File with a STEP Model
-- Following the protocols, Copy may be implemented or not
uses CString, Transient,
CheckIterator, InterfaceModel, Protocol from Interface,
Messenger from Message,
EntityIterator, CopyTool,
ContextWrite
is
Create (copymode : Boolean = Standard_True)
returns WorkLibrary from StepSelect;
---Purpose : Creates a STEP WorkLibrary
-- <copymode> precises whether Copy is implemented or not
SetDumpLabel (me : mutable; mode : Integer);
---Purpose : Selects a mode to dump entities
-- 0 (D) : prints numbers, then displays table number/label
-- 1 : prints labels, then displays table label/number
-- 2 : prints labels onky
ReadFile (me; name : CString;
model : out InterfaceModel;
protocol : Protocol from Interface)
returns Integer;
---Purpose : Reads a STEP File and returns a STEP Model (into <mod>),
-- or lets <mod> "Null" in case of Error
-- Returns 0 if OK, 1 if Read Error, -1 if File not opened
WriteFile (me; ctx : in out ContextWrite) returns Boolean;
---Purpose : Writes a File from a STEP Model
-- Returns False (and writes no file) if <ctx> does not bring a
-- STEP Model
CopyModel (me;
original : InterfaceModel;
newmodel : InterfaceModel;
list : EntityIterator;
TC : in out CopyTool)
returns Boolean is redefined;
---Purpose : Performs the copy of entities from an original model to a new
-- one. Works according <copymode> :
-- if True, standard copy is run
-- else nothing is done and returned value is False
DumpEntity (me;
model : InterfaceModel;
protocol : Protocol from Interface;
entity : Transient;
S : Messenger from Message;
level : Integer);
---Purpose : Dumps an entity under STEP form, i.e. as a part of a Step file
-- Works with a StepDumper.
-- Level 0 just displays type; level 1 displays the entity itself
-- and level 2 displays the entity plus its shared ones (one
-- sub-level : immediately shared entities)
fields
thecopymode : Boolean;
thelabmode : Integer;
end WorkLibrary;

View File

@@ -11,35 +11,37 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StepSelect_WorkLibrary.ixx>
#include <sys/stat.h>
#include <errno.h>
#include <StepData_Protocol.hxx>
#include <StepData_StepModel.hxx>
#include <StepFile_Read.hxx>
#include <StepData_StepWriter.hxx>
#include <Interface_CheckIterator.hxx>
#include <StepSelect_FileModifier.hxx>
#include <StepData_UndefinedEntity.hxx>
#include <StepData_StepDumper.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
#include <IFSelect_ContextWrite.hxx>
#include <IFSelect_GeneralModifier.hxx>
#include <Interface_Check.hxx>
#include <Interface_CheckIterator.hxx>
#include <Interface_CopyTool.hxx>
#include <Interface_EntityIterator.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_ParamType.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReportEntity.hxx>
#include <Interface_UndefinedContent.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Check.hxx>
#include <OSD_OpenFile.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
#include <StepData_Protocol.hxx>
#include <StepData_StepDumper.hxx>
#include <StepData_StepModel.hxx>
#include <StepData_StepWriter.hxx>
#include <StepData_UndefinedEntity.hxx>
#include <StepFile_Read.hxx>
#include <StepSelect_FileModifier.hxx>
#include <StepSelect_WorkLibrary.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
#include <errno.h>
#include <sys/stat.h>
StepSelect_WorkLibrary::StepSelect_WorkLibrary
(const Standard_Boolean copymode)
: thecopymode (copymode) , thelabmode (0)

View File

@@ -0,0 +1,105 @@
// Created on: 1994-09-14
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StepSelect_WorkLibrary_HeaderFile
#define _StepSelect_WorkLibrary_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <IFSelect_WorkLibrary.hxx>
#include <Standard_CString.hxx>
class Interface_InterfaceModel;
class Interface_Protocol;
class IFSelect_ContextWrite;
class Interface_EntityIterator;
class Interface_CopyTool;
class Standard_Transient;
class Message_Messenger;
class StepSelect_WorkLibrary;
DEFINE_STANDARD_HANDLE(StepSelect_WorkLibrary, IFSelect_WorkLibrary)
//! Performs Read and Write a STEP File with a STEP Model
//! Following the protocols, Copy may be implemented or not
class StepSelect_WorkLibrary : public IFSelect_WorkLibrary
{
public:
//! Creates a STEP WorkLibrary
//! <copymode> precises whether Copy is implemented or not
Standard_EXPORT StepSelect_WorkLibrary(const Standard_Boolean copymode = Standard_True);
//! Selects a mode to dump entities
//! 0 (D) : prints numbers, then displays table number/label
//! 1 : prints labels, then displays table label/number
//! 2 : prints labels onky
Standard_EXPORT void SetDumpLabel (const Standard_Integer mode);
//! Reads a STEP File and returns a STEP Model (into <mod>),
//! or lets <mod> "Null" in case of Error
//! Returns 0 if OK, 1 if Read Error, -1 if File not opened
Standard_EXPORT Standard_Integer ReadFile (const Standard_CString name, Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol) const;
//! Writes a File from a STEP Model
//! Returns False (and writes no file) if <ctx> does not bring a
//! STEP Model
Standard_EXPORT Standard_Boolean WriteFile (IFSelect_ContextWrite& ctx) const;
//! Performs the copy of entities from an original model to a new
//! one. Works according <copymode> :
//! if True, standard copy is run
//! else nothing is done and returned value is False
Standard_EXPORT virtual Standard_Boolean CopyModel (const Handle(Interface_InterfaceModel)& original, const Handle(Interface_InterfaceModel)& newmodel, const Interface_EntityIterator& list, Interface_CopyTool& TC) const Standard_OVERRIDE;
//! Dumps an entity under STEP form, i.e. as a part of a Step file
//! Works with a StepDumper.
//! Level 0 just displays type; level 1 displays the entity itself
//! and level 2 displays the entity plus its shared ones (one
//! sub-level : immediately shared entities)
Standard_EXPORT void DumpEntity (const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol, const Handle(Standard_Transient)& entity, const Handle(Message_Messenger)& S, const Standard_Integer level) const;
DEFINE_STANDARD_RTTI(StepSelect_WorkLibrary,IFSelect_WorkLibrary)
protected:
private:
Standard_Boolean thecopymode;
Standard_Integer thelabmode;
};
#endif // _StepSelect_WorkLibrary_HeaderFile