mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -1,2 +1,83 @@
|
||||
StepData.cxx
|
||||
StepData.hxx
|
||||
StepData_Array1OfField.hxx
|
||||
StepData_DefaultGeneral.cxx
|
||||
StepData_DefaultGeneral.hxx
|
||||
StepData_DescrGeneral.cxx
|
||||
StepData_DescrGeneral.hxx
|
||||
StepData_Described.cxx
|
||||
StepData_Described.hxx
|
||||
StepData_DescrProtocol.cxx
|
||||
StepData_DescrProtocol.hxx
|
||||
StepData_DescrReadWrite.cxx
|
||||
StepData_DescrReadWrite.hxx
|
||||
StepData_ECDescr.cxx
|
||||
StepData_ECDescr.hxx
|
||||
StepData_EDescr.cxx
|
||||
StepData_EDescr.hxx
|
||||
StepData_EnumTool.cxx
|
||||
StepData_EnumTool.hxx
|
||||
StepData_ESDescr.cxx
|
||||
StepData_ESDescr.hxx
|
||||
StepData_Field.cxx
|
||||
StepData_Field.hxx
|
||||
StepData_FieldList.cxx
|
||||
StepData_FieldList.hxx
|
||||
StepData_FieldList1.cxx
|
||||
StepData_FieldList1.hxx
|
||||
StepData_FieldListD.cxx
|
||||
StepData_FieldListD.hxx
|
||||
StepData_FieldListN.cxx
|
||||
StepData_FieldListN.hxx
|
||||
StepData_FileProtocol.cxx
|
||||
StepData_FileProtocol.hxx
|
||||
StepData_FileRecognizer.hxx
|
||||
StepData_FileRecognizer_0.cxx
|
||||
StepData_FreeFormEntity.cxx
|
||||
StepData_FreeFormEntity.hxx
|
||||
StepData_GeneralModule.cxx
|
||||
StepData_GeneralModule.hxx
|
||||
StepData_GlobalNodeOfWriterLib.hxx
|
||||
StepData_GlobalNodeOfWriterLib_0.cxx
|
||||
StepData_HArray1OfField.hxx
|
||||
StepData_HeaderTool.cxx
|
||||
StepData_HeaderTool.hxx
|
||||
StepData_Logical.hxx
|
||||
StepData_NodeOfWriterLib.hxx
|
||||
StepData_NodeOfWriterLib_0.cxx
|
||||
StepData_PDescr.cxx
|
||||
StepData_PDescr.hxx
|
||||
StepData_Plex.cxx
|
||||
StepData_Plex.hxx
|
||||
StepData_Protocol.cxx
|
||||
StepData_Protocol.hxx
|
||||
StepData_ReadWriteModule.cxx
|
||||
StepData_ReadWriteModule.hxx
|
||||
StepData_SelectArrReal.cxx
|
||||
StepData_SelectArrReal.hxx
|
||||
StepData_SelectInt.cxx
|
||||
StepData_SelectInt.hxx
|
||||
StepData_SelectMember.cxx
|
||||
StepData_SelectMember.hxx
|
||||
StepData_SelectNamed.cxx
|
||||
StepData_SelectNamed.hxx
|
||||
StepData_SelectReal.cxx
|
||||
StepData_SelectReal.hxx
|
||||
StepData_SelectType.cxx
|
||||
StepData_SelectType.hxx
|
||||
StepData_Simple.cxx
|
||||
StepData_Simple.hxx
|
||||
StepData_StepDumper.cxx
|
||||
StepData_StepDumper.hxx
|
||||
StepData_StepModel.cxx
|
||||
StepData_StepModel.hxx
|
||||
StepData_StepReaderData.cxx
|
||||
StepData_StepReaderData.hxx
|
||||
StepData_StepReaderTool.cxx
|
||||
StepData_StepReaderTool.hxx
|
||||
StepData_StepWriter.cxx
|
||||
StepData_StepWriter.hxx
|
||||
StepData_UndefinedEntity.cxx
|
||||
StepData_UndefinedEntity.hxx
|
||||
StepData_WriterLib.hxx
|
||||
StepData_WriterLib_0.cxx
|
||||
|
@@ -1,107 +0,0 @@
|
||||
-- Created on: 1992-02-11
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-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 StepData
|
||||
|
||||
---Purpose : Gives basic data definition for Step Interface.
|
||||
-- Any class of a data model described in EXPRESS Language
|
||||
-- is candidate to be managed by a Step Interface
|
||||
|
||||
uses Standard, MMgt, TCollection, TColStd, Dico, LibCtl, Interface, Message
|
||||
|
||||
is
|
||||
|
||||
class StepModel;
|
||||
class UndefinedEntity;
|
||||
deferred class SelectType;
|
||||
|
||||
enumeration Logical is LFalse, LTrue, LUnknown;
|
||||
---Purpose : A Standard Definition for STEP (which knows Boolean too)
|
||||
|
||||
class Field;
|
||||
class SelectMember;
|
||||
class SelectInt;
|
||||
class SelectReal;
|
||||
class SelectNamed;
|
||||
class SelectArrReal;
|
||||
|
||||
class PDescr;
|
||||
class FieldList; -- basic one (no field)
|
||||
class FieldList1;
|
||||
class FieldListN;
|
||||
class FieldListD;
|
||||
deferred class EDescr;
|
||||
class ESDescr;
|
||||
class ECDescr;
|
||||
deferred class Described;
|
||||
class Simple;
|
||||
class Plex;
|
||||
class FreeFormEntity;
|
||||
|
||||
class Protocol; -- basic protocol for Step
|
||||
deferred class GeneralModule; -- general services
|
||||
|
||||
deferred class FileRecognizer instantiates
|
||||
Recognizer from Interface (AsciiString from TCollection, Transient);
|
||||
|
||||
class FileProtocol;
|
||||
class HeaderTool;
|
||||
class EnumTool;
|
||||
|
||||
class DescrProtocol;
|
||||
class DescrGeneral;
|
||||
class DescrReadWrite;
|
||||
|
||||
class StepReaderData; -- litteral description of Step File
|
||||
class StepReaderTool;
|
||||
deferred class ReadWriteModule;
|
||||
class StepWriter; -- idem but in the other sense
|
||||
class StepDumper;
|
||||
|
||||
class WriterLib instantiates Library from LibCtl
|
||||
(Transient, ReadWriteModule, Protocol from StepData);
|
||||
|
||||
class DefaultGeneral; -- Default Module which processes UnknownEntity
|
||||
|
||||
|
||||
-- General Routines --
|
||||
-- HeaderProtocol/AddHeaderProtocol are used to handle Header items :
|
||||
-- Reading/Writing but also Copying,Checking,Dumping
|
||||
--
|
||||
--
|
||||
-- Init & Protocol encapsulate the general actions required to work with
|
||||
-- this package. While their use is not mandatory, it makes work easier.
|
||||
|
||||
imported Array1OfField;
|
||||
imported transient class HArray1OfField;
|
||||
|
||||
HeaderProtocol returns Protocol from StepData;
|
||||
---Purpose : Returns the recorded HeaderProtocol, which can be :
|
||||
-- - a Null Handle if no Header Protocol was yet defined
|
||||
-- - a simple Protocol if only one was defined
|
||||
-- - a FileProtocol if more than one Protocol was yet defined
|
||||
|
||||
AddHeaderProtocol (headerproto : Protocol from StepData);
|
||||
---Purpose : Adds a new Header Protocol to the Header Definition
|
||||
|
||||
Init;
|
||||
---Purpose : Prepares General Data required to work with this package,
|
||||
-- which are the Protocol and Modules to be loaded into Libraries
|
||||
|
||||
Protocol returns Protocol from StepData;
|
||||
---Purpose : Returns a Protocol from StepData (avoids to create it)
|
||||
|
||||
end StepData;
|
@@ -13,16 +13,14 @@
|
||||
|
||||
// abv 09.04.99 S4136: eliminate parameter step.readaccept.void
|
||||
// svv #2 23.02.00: porting on SIL
|
||||
#include <StepData.ixx>
|
||||
# include <StepData_Protocol.hxx>
|
||||
# include <StepData_DefaultGeneral.hxx>
|
||||
# include <StepData_FileProtocol.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
|
||||
#include <Interface_Statics.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Interface_Statics.hxx>
|
||||
#include <StepData.hxx>
|
||||
#include <StepData_DefaultGeneral.hxx>
|
||||
#include <StepData_FileProtocol.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
|
||||
StaticHandle(StepData_Protocol,proto);
|
||||
//svv #2: StaticHandle(StepData_DefaultGeneral,stmod);
|
||||
|
154
src/StepData/StepData.hxx
Normal file
154
src/StepData/StepData.hxx
Normal file
@@ -0,0 +1,154 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _StepData_HeaderFile
|
||||
#define _StepData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class StepData_Protocol;
|
||||
class StepData_StepModel;
|
||||
class StepData_UndefinedEntity;
|
||||
class StepData_SelectType;
|
||||
class StepData_Field;
|
||||
class StepData_SelectMember;
|
||||
class StepData_SelectInt;
|
||||
class StepData_SelectReal;
|
||||
class StepData_SelectNamed;
|
||||
class StepData_SelectArrReal;
|
||||
class StepData_PDescr;
|
||||
class StepData_FieldList;
|
||||
class StepData_FieldList1;
|
||||
class StepData_FieldListN;
|
||||
class StepData_FieldListD;
|
||||
class StepData_EDescr;
|
||||
class StepData_ESDescr;
|
||||
class StepData_ECDescr;
|
||||
class StepData_Described;
|
||||
class StepData_Simple;
|
||||
class StepData_Plex;
|
||||
class StepData_FreeFormEntity;
|
||||
class StepData_Protocol;
|
||||
class StepData_GeneralModule;
|
||||
class StepData_FileRecognizer;
|
||||
class StepData_FileProtocol;
|
||||
class StepData_HeaderTool;
|
||||
class StepData_EnumTool;
|
||||
class StepData_DescrProtocol;
|
||||
class StepData_DescrGeneral;
|
||||
class StepData_DescrReadWrite;
|
||||
class StepData_StepReaderData;
|
||||
class StepData_StepReaderTool;
|
||||
class StepData_ReadWriteModule;
|
||||
class StepData_StepWriter;
|
||||
class StepData_StepDumper;
|
||||
class StepData_WriterLib;
|
||||
class StepData_DefaultGeneral;
|
||||
class StepData_GlobalNodeOfWriterLib;
|
||||
class StepData_NodeOfWriterLib;
|
||||
|
||||
|
||||
//! Gives basic data definition for Step Interface.
|
||||
//! Any class of a data model described in EXPRESS Language
|
||||
//! is candidate to be managed by a Step Interface
|
||||
class StepData
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the recorded HeaderProtocol, which can be :
|
||||
//! - a Null Handle if no Header Protocol was yet defined
|
||||
//! - a simple Protocol if only one was defined
|
||||
//! - a FileProtocol if more than one Protocol was yet defined
|
||||
Standard_EXPORT static Handle(StepData_Protocol) HeaderProtocol();
|
||||
|
||||
//! Adds a new Header Protocol to the Header Definition
|
||||
Standard_EXPORT static void AddHeaderProtocol (const Handle(StepData_Protocol)& headerproto);
|
||||
|
||||
//! Prepares General Data required to work with this package,
|
||||
//! which are the Protocol and Modules to be loaded into Libraries
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
//! Returns a Protocol from StepData (avoids to create it)
|
||||
Standard_EXPORT static Handle(StepData_Protocol) Protocol();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class StepData_StepModel;
|
||||
friend class StepData_UndefinedEntity;
|
||||
friend class StepData_SelectType;
|
||||
friend class StepData_Field;
|
||||
friend class StepData_SelectMember;
|
||||
friend class StepData_SelectInt;
|
||||
friend class StepData_SelectReal;
|
||||
friend class StepData_SelectNamed;
|
||||
friend class StepData_SelectArrReal;
|
||||
friend class StepData_PDescr;
|
||||
friend class StepData_FieldList;
|
||||
friend class StepData_FieldList1;
|
||||
friend class StepData_FieldListN;
|
||||
friend class StepData_FieldListD;
|
||||
friend class StepData_EDescr;
|
||||
friend class StepData_ESDescr;
|
||||
friend class StepData_ECDescr;
|
||||
friend class StepData_Described;
|
||||
friend class StepData_Simple;
|
||||
friend class StepData_Plex;
|
||||
friend class StepData_FreeFormEntity;
|
||||
friend class StepData_Protocol;
|
||||
friend class StepData_GeneralModule;
|
||||
friend class StepData_FileRecognizer;
|
||||
friend class StepData_FileProtocol;
|
||||
friend class StepData_HeaderTool;
|
||||
friend class StepData_EnumTool;
|
||||
friend class StepData_DescrProtocol;
|
||||
friend class StepData_DescrGeneral;
|
||||
friend class StepData_DescrReadWrite;
|
||||
friend class StepData_StepReaderData;
|
||||
friend class StepData_StepReaderTool;
|
||||
friend class StepData_ReadWriteModule;
|
||||
friend class StepData_StepWriter;
|
||||
friend class StepData_StepDumper;
|
||||
friend class StepData_WriterLib;
|
||||
friend class StepData_DefaultGeneral;
|
||||
friend class StepData_GlobalNodeOfWriterLib;
|
||||
friend class StepData_NodeOfWriterLib;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_HeaderFile
|
@@ -1,53 +0,0 @@
|
||||
-- Created on: 1993-03-26
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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 DefaultGeneral from StepData inherits GeneralModule from StepData
|
||||
|
||||
---Purpose : DefaultGeneral defines a GeneralModule which processes
|
||||
-- Unknown Entity from StepData only
|
||||
|
||||
uses OStream, Transient ,
|
||||
EntityIterator , CopyTool, Check, ShareTool
|
||||
|
||||
is
|
||||
|
||||
Create returns DefaultGeneral;
|
||||
---Purpose : Creates a Default General Module
|
||||
|
||||
-- Reconduction because limitation cdl --
|
||||
|
||||
FillSharedCase (me; casenum : Integer; ent : Transient;
|
||||
iter : in out EntityIterator);
|
||||
---Purpose : Specific filling of the list of Entities shared by an Entity
|
||||
-- <ent>, which is an UnknownEntity from StepData.
|
||||
|
||||
CheckCase (me; casenum : Integer; ent : Transient; shares : ShareTool;
|
||||
ach : in out Check);
|
||||
---Purpose : Specific Checking of an Entity <ent>
|
||||
|
||||
NewVoid (me; CN : Integer; entto : out Transient)
|
||||
returns Boolean;
|
||||
---Purpose : Specific creation of a new void entity
|
||||
|
||||
CopyCase (me; casenum : Integer;
|
||||
entfrom : Transient; entto : Transient;
|
||||
TC : in out CopyTool);
|
||||
---Purpose : Specific Copy ("Deep") from <entfrom> to <entto> (same type)
|
||||
-- by using a CopyTool which provides its working Map.
|
||||
-- Use method Transferred from TransferControl to work
|
||||
|
||||
|
||||
end DefaultGeneral;
|
@@ -11,19 +11,23 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_DefaultGeneral.ixx>
|
||||
#include <StepData.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CopyTool.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_UndefinedEntity.hxx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData.hxx>
|
||||
#include <StepData_DefaultGeneral.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_UndefinedEntity.hxx>
|
||||
|
||||
// DefaultGeneral de StepData reconnait UN SEUL TYPE : UndefinedEntity
|
||||
|
||||
|
||||
StepData_DefaultGeneral::StepData_DefaultGeneral ()
|
||||
{
|
||||
Interface_GeneralLib::SetGlobal (this, StepData::Protocol());
|
||||
|
85
src/StepData/StepData_DefaultGeneral.hxx
Normal file
85
src/StepData/StepData_DefaultGeneral.hxx
Normal file
@@ -0,0 +1,85 @@
|
||||
// Created on: 1993-03-26
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_DefaultGeneral_HeaderFile
|
||||
#define _StepData_DefaultGeneral_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_GeneralModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
class Interface_ShareTool;
|
||||
class Interface_Check;
|
||||
class Interface_CopyTool;
|
||||
|
||||
|
||||
class StepData_DefaultGeneral;
|
||||
DEFINE_STANDARD_HANDLE(StepData_DefaultGeneral, StepData_GeneralModule)
|
||||
|
||||
//! DefaultGeneral defines a GeneralModule which processes
|
||||
//! Unknown Entity from StepData only
|
||||
class StepData_DefaultGeneral : public StepData_GeneralModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a Default General Module
|
||||
Standard_EXPORT StepData_DefaultGeneral();
|
||||
|
||||
//! Specific filling of the list of Entities shared by an Entity
|
||||
//! <ent>, which is an UnknownEntity from StepData.
|
||||
Standard_EXPORT void FillSharedCase (const Standard_Integer casenum, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
|
||||
|
||||
//! Specific Checking of an Entity <ent>
|
||||
Standard_EXPORT void CheckCase (const Standard_Integer casenum, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const;
|
||||
|
||||
//! Specific creation of a new void entity
|
||||
Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const;
|
||||
|
||||
//! Specific Copy ("Deep") from <entfrom> to <entto> (same type)
|
||||
//! by using a CopyTool which provides its working Map.
|
||||
//! Use method Transferred from TransferControl to work
|
||||
Standard_EXPORT void CopyCase (const Standard_Integer casenum, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_DefaultGeneral,StepData_GeneralModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_DefaultGeneral_HeaderFile
|
@@ -1,48 +0,0 @@
|
||||
-- Created on: 1997-05-21
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 DescrGeneral from StepData inherits GeneralModule from StepData
|
||||
|
||||
---Purpose : Works with a Protocol by considering its entity descriptions
|
||||
|
||||
|
||||
uses Transient,
|
||||
EntityIterator from Interface,
|
||||
ShareTool from Interface,
|
||||
Check from Interface,
|
||||
CopyTool from Interface,
|
||||
Protocol from StepData
|
||||
|
||||
is
|
||||
|
||||
Create (proto : Protocol from StepData) returns DescrGeneral;
|
||||
|
||||
FillSharedCase (me; CN : Integer; ent : Transient;
|
||||
iter : in out EntityIterator);
|
||||
|
||||
CheckCase (me; CN : Integer; ent : Transient; shares : ShareTool;
|
||||
ach : in out Check);
|
||||
|
||||
CopyCase (me; CN : Integer; entfrom : Transient; entto : Transient;
|
||||
TC : in out CopyTool);
|
||||
|
||||
NewVoid (me; CN : Integer; ent : out Transient) returns Boolean;
|
||||
|
||||
fields
|
||||
|
||||
theproto : Protocol from StepData;
|
||||
|
||||
end DescrGeneral;
|
@@ -11,10 +11,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_DescrGeneral.ixx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CopyTool.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_DescrGeneral.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
|
||||
StepData_DescrGeneral::StepData_DescrGeneral
|
||||
(const Handle(StepData_Protocol)& proto)
|
||||
|
78
src/StepData/StepData_DescrGeneral.hxx
Normal file
78
src/StepData/StepData_DescrGeneral.hxx
Normal file
@@ -0,0 +1,78 @@
|
||||
// Created on: 1997-05-21
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_DescrGeneral_HeaderFile
|
||||
#define _StepData_DescrGeneral_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_GeneralModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class StepData_Protocol;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
class Interface_ShareTool;
|
||||
class Interface_Check;
|
||||
class Interface_CopyTool;
|
||||
|
||||
|
||||
class StepData_DescrGeneral;
|
||||
DEFINE_STANDARD_HANDLE(StepData_DescrGeneral, StepData_GeneralModule)
|
||||
|
||||
//! Works with a Protocol by considering its entity descriptions
|
||||
class StepData_DescrGeneral : public StepData_GeneralModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_DescrGeneral(const Handle(StepData_Protocol)& proto);
|
||||
|
||||
Standard_EXPORT void FillSharedCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
|
||||
|
||||
Standard_EXPORT void CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const;
|
||||
|
||||
Standard_EXPORT void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& ent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_DescrGeneral,StepData_GeneralModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(StepData_Protocol) theproto;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_DescrGeneral_HeaderFile
|
@@ -1,53 +0,0 @@
|
||||
-- Created on: 1997-05-21
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 DescrProtocol from StepData inherits FileProtocol from StepData
|
||||
|
||||
---Purpose : A DescrProtocol is a protocol dynamically (at execution time)
|
||||
-- defined with :
|
||||
-- - a list of resources (inherits FileProtocol)
|
||||
-- - a list of entity descriptions
|
||||
-- i.e. it can be defined with only C++ writing to initialize it
|
||||
-- Its initialization must :
|
||||
-- - set its schema name
|
||||
-- - define its resources (which can also be other DescrProtocol)
|
||||
-- - define its entity descriptions
|
||||
-- - record it in the system by calling RecordLib
|
||||
|
||||
uses CString, AsciiString from TCollection
|
||||
|
||||
is
|
||||
|
||||
Create returns DescrProtocol;
|
||||
|
||||
SetSchemaName (me : mutable; name : CString);
|
||||
---Purpose : Defines a specific Schema Name for this Protocol
|
||||
|
||||
LibRecord (me);
|
||||
---Purpose : Records this Protocol in the service libraries, with a
|
||||
-- DescrGeneral and a DescrReadWrite
|
||||
-- Does nothing if the Protocol brings no proper description
|
||||
|
||||
SchemaName (me) returns CString is redefined;
|
||||
---Purpose : Returns the Schema Name attached to each class of Protocol
|
||||
-- here, returns the SchemaName set by SetSchemaName
|
||||
-- was C++ : return const
|
||||
|
||||
fields
|
||||
|
||||
thename : AsciiString;
|
||||
|
||||
end DescrProtocol;
|
@@ -11,14 +11,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_DescrProtocol.ixx>
|
||||
#include <StepData_DescrGeneral.hxx>
|
||||
#include <StepData_DescrReadWrite.hxx>
|
||||
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_ReaderLib.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_DescrGeneral.hxx>
|
||||
#include <StepData_DescrProtocol.hxx>
|
||||
#include <StepData_DescrReadWrite.hxx>
|
||||
#include <StepData_WriterLib.hxx>
|
||||
|
||||
|
||||
StepData_DescrProtocol::StepData_DescrProtocol () { }
|
||||
|
||||
void StepData_DescrProtocol::SetSchemaName (const Standard_CString name)
|
||||
|
86
src/StepData/StepData_DescrProtocol.hxx
Normal file
86
src/StepData/StepData_DescrProtocol.hxx
Normal file
@@ -0,0 +1,86 @@
|
||||
// Created on: 1997-05-21
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_DescrProtocol_HeaderFile
|
||||
#define _StepData_DescrProtocol_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <StepData_FileProtocol.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
|
||||
|
||||
class StepData_DescrProtocol;
|
||||
DEFINE_STANDARD_HANDLE(StepData_DescrProtocol, StepData_FileProtocol)
|
||||
|
||||
//! A DescrProtocol is a protocol dynamically (at execution time)
|
||||
//! defined with :
|
||||
//! - a list of resources (inherits FileProtocol)
|
||||
//! - a list of entity descriptions
|
||||
//! i.e. it can be defined with only C++ writing to initialize it
|
||||
//! Its initialization must :
|
||||
//! - set its schema name
|
||||
//! - define its resources (which can also be other DescrProtocol)
|
||||
//! - define its entity descriptions
|
||||
//! - record it in the system by calling RecordLib
|
||||
class StepData_DescrProtocol : public StepData_FileProtocol
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_DescrProtocol();
|
||||
|
||||
//! Defines a specific Schema Name for this Protocol
|
||||
Standard_EXPORT void SetSchemaName (const Standard_CString name);
|
||||
|
||||
//! Records this Protocol in the service libraries, with a
|
||||
//! DescrGeneral and a DescrReadWrite
|
||||
//! Does nothing if the Protocol brings no proper description
|
||||
Standard_EXPORT void LibRecord() const;
|
||||
|
||||
//! Returns the Schema Name attached to each class of Protocol
|
||||
//! here, returns the SchemaName set by SetSchemaName
|
||||
//! was C++ : return const
|
||||
Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_DescrProtocol,StepData_FileProtocol)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TCollection_AsciiString thename;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_DescrProtocol_HeaderFile
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 1997-05-21
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 DescrReadWrite from StepData inherits ReadWriteModule from StepData
|
||||
|
||||
uses Transient,
|
||||
SequenceOfAsciiString from TColStd,
|
||||
AsciiString from TCollection,
|
||||
Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Protocol from StepData
|
||||
|
||||
is
|
||||
|
||||
Create (proto : Protocol from StepData) returns DescrReadWrite from StepData;
|
||||
|
||||
CaseStep (me; atype : AsciiString from TCollection) returns Integer;
|
||||
|
||||
CaseStep(me; types : SequenceOfAsciiString from TColStd) returns Integer
|
||||
is redefined;
|
||||
|
||||
IsComplex (me; CN : Integer) returns Boolean is redefined;
|
||||
|
||||
StepType (me; CN : Integer) returns AsciiString from TCollection;
|
||||
---C++ : return const &
|
||||
|
||||
ComplexType (me; CN : Integer;
|
||||
types : in out SequenceOfAsciiString from TColStd)
|
||||
returns Boolean is redefined;
|
||||
|
||||
ReadStep (me; CN : Integer; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : Transient);
|
||||
|
||||
WriteStep (me; CN : Integer; SW : in out StepWriter; ent : Transient);
|
||||
|
||||
fields
|
||||
|
||||
theproto : Protocol from StepData;
|
||||
|
||||
end DescrReadWrite;
|
@@ -11,15 +11,23 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_DescrReadWrite.ixx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
#include <StepData_Plex.hxx>
|
||||
#include <StepData_FieldListN.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_DescrReadWrite.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_FieldListN.hxx>
|
||||
#include <StepData_Plex.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
|
||||
static TCollection_AsciiString nocp("?");
|
||||
|
||||
|
85
src/StepData/StepData_DescrReadWrite.hxx
Normal file
85
src/StepData/StepData_DescrReadWrite.hxx
Normal file
@@ -0,0 +1,85 @@
|
||||
// Created on: 1997-05-21
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_DescrReadWrite_HeaderFile
|
||||
#define _StepData_DescrReadWrite_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_ReadWriteModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class StepData_Protocol;
|
||||
class TCollection_AsciiString;
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class Standard_Transient;
|
||||
class StepData_StepWriter;
|
||||
|
||||
|
||||
class StepData_DescrReadWrite;
|
||||
DEFINE_STANDARD_HANDLE(StepData_DescrReadWrite, StepData_ReadWriteModule)
|
||||
|
||||
|
||||
class StepData_DescrReadWrite : public StepData_ReadWriteModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_DescrReadWrite(const Handle(StepData_Protocol)& proto);
|
||||
|
||||
Standard_EXPORT Standard_Integer CaseStep (const TCollection_AsciiString& atype) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer CaseStep (const TColStd_SequenceOfAsciiString& types) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsComplex (const Standard_Integer CN) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT const TCollection_AsciiString& StepType (const Standard_Integer CN) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean ComplexType (const Standard_Integer CN, TColStd_SequenceOfAsciiString& types) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT void ReadStep (const Standard_Integer CN, const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
Standard_EXPORT void WriteStep (const Standard_Integer CN, StepData_StepWriter& SW, const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_DescrReadWrite,StepData_ReadWriteModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(StepData_Protocol) theproto;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_DescrReadWrite_HeaderFile
|
@@ -1,77 +0,0 @@
|
||||
-- Created on: 1997-05-09
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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.
|
||||
|
||||
deferred class Described from StepData inherits TShared from MMgt
|
||||
|
||||
---Purpose : General frame to describe entities with Description (Simple or
|
||||
-- Complex)
|
||||
|
||||
uses CString,
|
||||
Check from Interface, EntityIterator from Interface,
|
||||
Field from StepData, EDescr from StepData, Simple from StepData
|
||||
|
||||
raises InterfaceMismatch from Interface
|
||||
|
||||
is
|
||||
|
||||
Initialize (descr : EDescr);
|
||||
---Purpose : Initializes a Described Entity from a Description
|
||||
-- (i.e. puts it in a field ...)
|
||||
|
||||
Description (me) returns EDescr;
|
||||
---Purpose : Returns the Description used to define this entity
|
||||
|
||||
IsComplex (me) returns Boolean is deferred;
|
||||
---Purpose : Tells if a described entity is complex
|
||||
|
||||
Matches (me; steptype : CString) returns Boolean is deferred;
|
||||
---Purpose : Tells if a step type is matched by <me>
|
||||
-- For a Simple Entity : own type or super type
|
||||
-- For a Complex Entity : one of the members
|
||||
|
||||
As (me; steptype : CString) returns Simple is deferred;
|
||||
---Purpose : Returns a Simple Entity which matches with a Type in <me> :
|
||||
-- For a Simple Entity : me if it matches, else a null handle
|
||||
-- For a Complex Entity : the member which matches, else null
|
||||
|
||||
HasField (me; name : CString) returns Boolean is deferred;
|
||||
---Purpose : Tells if a Field brings a given name
|
||||
|
||||
Field (me; name : CString) returns Field
|
||||
---Purpose : Returns a Field from its name; read-only
|
||||
raises InterfaceMismatch is deferred;
|
||||
-- raises if no Field for <name>
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : mutable; name : CString) returns Field
|
||||
---Purpose : Returns a Field from its name; read or write
|
||||
raises InterfaceMismatch is deferred;
|
||||
-- raises if no Field for <name>
|
||||
---C++ : return &
|
||||
|
||||
--
|
||||
|
||||
Check (me; ach : in out Check from Interface) is deferred;
|
||||
---Purpose : Fills a Check by using its Description
|
||||
|
||||
Shared (me; list : in out EntityIterator from Interface) is deferred;
|
||||
---Purpose : Fills an EntityIterator with entities shared by <me>
|
||||
|
||||
fields
|
||||
|
||||
thedescr : EDescr;
|
||||
|
||||
end Described;
|
@@ -11,7 +11,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_Described.ixx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceMismatch.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
|
||||
StepData_Described::StepData_Described (const Handle(StepData_EDescr)& descr)
|
||||
: thedescr (descr) { }
|
||||
|
104
src/StepData/StepData_Described.hxx
Normal file
104
src/StepData/StepData_Described.hxx
Normal file
@@ -0,0 +1,104 @@
|
||||
// Created on: 1997-05-09
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_Described_HeaderFile
|
||||
#define _StepData_Described_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class StepData_EDescr;
|
||||
class Interface_InterfaceMismatch;
|
||||
class StepData_Simple;
|
||||
class StepData_Field;
|
||||
class Interface_Check;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
class StepData_Described;
|
||||
DEFINE_STANDARD_HANDLE(StepData_Described, MMgt_TShared)
|
||||
|
||||
//! General frame to describe entities with Description (Simple or
|
||||
//! Complex)
|
||||
class StepData_Described : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns the Description used to define this entity
|
||||
Standard_EXPORT Handle(StepData_EDescr) Description() const;
|
||||
|
||||
//! Tells if a described entity is complex
|
||||
Standard_EXPORT virtual Standard_Boolean IsComplex() const = 0;
|
||||
|
||||
//! Tells if a step type is matched by <me>
|
||||
//! For a Simple Entity : own type or super type
|
||||
//! For a Complex Entity : one of the members
|
||||
Standard_EXPORT virtual Standard_Boolean Matches (const Standard_CString steptype) const = 0;
|
||||
|
||||
//! Returns a Simple Entity which matches with a Type in <me> :
|
||||
//! For a Simple Entity : me if it matches, else a null handle
|
||||
//! For a Complex Entity : the member which matches, else null
|
||||
Standard_EXPORT virtual Handle(StepData_Simple) As (const Standard_CString steptype) const = 0;
|
||||
|
||||
//! Tells if a Field brings a given name
|
||||
Standard_EXPORT virtual Standard_Boolean HasField (const Standard_CString name) const = 0;
|
||||
|
||||
//! Returns a Field from its name; read-only
|
||||
Standard_EXPORT virtual const StepData_Field& Field (const Standard_CString name) const = 0;
|
||||
|
||||
//! Returns a Field from its name; read or write
|
||||
Standard_EXPORT virtual StepData_Field& CField (const Standard_CString name) = 0;
|
||||
|
||||
//! Fills a Check by using its Description
|
||||
Standard_EXPORT virtual void Check (Handle(Interface_Check)& ach) const = 0;
|
||||
|
||||
//! Fills an EntityIterator with entities shared by <me>
|
||||
Standard_EXPORT virtual void Shared (Interface_EntityIterator& list) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_Described,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Initializes a Described Entity from a Description
|
||||
//! (i.e. puts it in a field ...)
|
||||
Standard_EXPORT StepData_Described(const Handle(StepData_EDescr)& descr);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(StepData_EDescr) thedescr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_Described_HeaderFile
|
@@ -1,59 +0,0 @@
|
||||
-- Created on: 1997-05-09
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 ECDescr from StepData inherits EDescr from StepData
|
||||
|
||||
---Purpose : Describes a Complex Entity (Plex) as a list of Simple ones
|
||||
|
||||
uses HSequenceOfAsciiString from TColStd, SequenceOfTransient from TColStd,
|
||||
ESDescr from StepData, Described from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns ECDescr;
|
||||
---Purpose : Creates an ECDescr, empty
|
||||
|
||||
Add (me : mutable; member : ESDescr);
|
||||
---Purpose : Adds a member
|
||||
-- Warning : members are added in alphabetic order
|
||||
|
||||
NbMembers (me) returns Integer;
|
||||
---Purpose : Returns the count of members
|
||||
|
||||
Member (me; num : Integer) returns ESDescr;
|
||||
---Purpose : Returns a Member from its rank
|
||||
|
||||
TypeList (me) returns HSequenceOfAsciiString;
|
||||
---Purpose : Returns the ordered list of types
|
||||
|
||||
|
||||
-- inherited
|
||||
|
||||
Matches (me; steptype : CString) returns Boolean;
|
||||
---Purpose : Tells if a ESDescr matches a step type : exact or super type
|
||||
|
||||
IsComplex (me) returns Boolean;
|
||||
---Purpose : Returns True
|
||||
|
||||
NewEntity (me) returns Described;
|
||||
---Purpose : Creates a described entity (i.e. a complex one, made of one
|
||||
-- simple entity per member)
|
||||
|
||||
fields
|
||||
|
||||
thelist : SequenceOfTransient;
|
||||
|
||||
end ECDescr;
|
@@ -11,11 +11,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_ECDescr.ixx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <StepData_Plex.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_Plex.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
StepData_ECDescr::StepData_ECDescr () { }
|
||||
|
||||
|
93
src/StepData/StepData_ECDescr.hxx
Normal file
93
src/StepData/StepData_ECDescr.hxx
Normal file
@@ -0,0 +1,93 @@
|
||||
// Created on: 1997-05-09
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_ECDescr_HeaderFile
|
||||
#define _StepData_ECDescr_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_SequenceOfTransient.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class StepData_ESDescr;
|
||||
class StepData_Described;
|
||||
|
||||
|
||||
class StepData_ECDescr;
|
||||
DEFINE_STANDARD_HANDLE(StepData_ECDescr, StepData_EDescr)
|
||||
|
||||
//! Describes a Complex Entity (Plex) as a list of Simple ones
|
||||
class StepData_ECDescr : public StepData_EDescr
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an ECDescr, empty
|
||||
Standard_EXPORT StepData_ECDescr();
|
||||
|
||||
//! Adds a member
|
||||
//! Warning : members are added in alphabetic order
|
||||
Standard_EXPORT void Add (const Handle(StepData_ESDescr)& member);
|
||||
|
||||
//! Returns the count of members
|
||||
Standard_EXPORT Standard_Integer NbMembers() const;
|
||||
|
||||
//! Returns a Member from its rank
|
||||
Standard_EXPORT Handle(StepData_ESDescr) Member (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the ordered list of types
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) TypeList() const;
|
||||
|
||||
//! Tells if a ESDescr matches a step type : exact or super type
|
||||
Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const;
|
||||
|
||||
//! Returns True
|
||||
Standard_EXPORT Standard_Boolean IsComplex() const;
|
||||
|
||||
//! Creates a described entity (i.e. a complex one, made of one
|
||||
//! simple entity per member)
|
||||
Standard_EXPORT Handle(StepData_Described) NewEntity() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_ECDescr,StepData_EDescr)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TColStd_SequenceOfTransient thelist;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_ECDescr_HeaderFile
|
@@ -1,36 +0,0 @@
|
||||
-- Created on: 1997-04-02
|
||||
-- Created by: Administrateur Atelier XSTEP
|
||||
-- Copyright (c) 1997-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.
|
||||
|
||||
deferred class EDescr from StepData inherits TShared
|
||||
|
||||
---Purpose : This class is intended to describe the authorized form for an
|
||||
-- entity, either Simple or Plex
|
||||
|
||||
uses CString,
|
||||
Described from StepData
|
||||
|
||||
is
|
||||
|
||||
Matches (me; steptype : CString) returns Boolean is deferred;
|
||||
---Purpose : Tells if a ESDescr matches a step type : exact or super type
|
||||
|
||||
IsComplex (me) returns Boolean is deferred;
|
||||
---Purpose : Tells if a EDescr is complex (ECDescr) or simple (ESDescr)
|
||||
|
||||
NewEntity (me) returns Described is deferred;
|
||||
---Purpose : Creates a described entity (i.e. a simple one)
|
||||
|
||||
end EDescr;
|
@@ -11,4 +11,7 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_EDescr.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
|
72
src/StepData/StepData_EDescr.hxx
Normal file
72
src/StepData/StepData_EDescr.hxx
Normal file
@@ -0,0 +1,72 @@
|
||||
// Created on: 1997-04-02
|
||||
// Created by: Administrateur Atelier XSTEP
|
||||
// Copyright (c) 1997-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 _StepData_EDescr_HeaderFile
|
||||
#define _StepData_EDescr_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class StepData_Described;
|
||||
|
||||
|
||||
class StepData_EDescr;
|
||||
DEFINE_STANDARD_HANDLE(StepData_EDescr, MMgt_TShared)
|
||||
|
||||
//! This class is intended to describe the authorized form for an
|
||||
//! entity, either Simple or Plex
|
||||
class StepData_EDescr : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Tells if a ESDescr matches a step type : exact or super type
|
||||
Standard_EXPORT virtual Standard_Boolean Matches (const Standard_CString steptype) const = 0;
|
||||
|
||||
//! Tells if a EDescr is complex (ECDescr) or simple (ESDescr)
|
||||
Standard_EXPORT virtual Standard_Boolean IsComplex() const = 0;
|
||||
|
||||
//! Creates a described entity (i.e. a simple one)
|
||||
Standard_EXPORT virtual Handle(StepData_Described) NewEntity() const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_EDescr,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_EDescr_HeaderFile
|
@@ -1,98 +0,0 @@
|
||||
-- Created on: 1997-05-09
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 ESDescr from StepData inherits EDescr
|
||||
|
||||
---Purpose : This class is intended to describe the authorized form for a
|
||||
-- Simple (not Plex) Entity, as a list of fields
|
||||
|
||||
uses CString, AsciiString from TCollection,
|
||||
HArray1OfTransient from TColStd, DictionaryOfInteger from Dico,
|
||||
PDescr from StepData, Described from StepData
|
||||
|
||||
is
|
||||
|
||||
Create (name : CString) returns ESDescr;
|
||||
---Purpose : Creates an ESDescr with a type name
|
||||
|
||||
SetNbFields (me : mutable; nb : Integer);
|
||||
---Purpose : Sets a new count of fields
|
||||
-- Each one is described by a PDescr
|
||||
|
||||
SetField (me : mutable; num : Integer; name : CString; descr : PDescr);
|
||||
---Purpose : Sets a PDescr to describe a field
|
||||
-- A Field is designated by its rank and name
|
||||
|
||||
SetBase (me : mutable; base : ESDescr);
|
||||
---Purpose : Sets an ESDescr as based on another one
|
||||
-- Hence, if there are inherited fields, the derived ESDescr
|
||||
-- cumulates all them, while the base just records its own ones
|
||||
|
||||
SetSuper (me : mutable; super : ESDescr);
|
||||
---Purpose : Sets an ESDescr as "super-type". Applies an a base (non
|
||||
-- derived) ESDescr
|
||||
|
||||
TypeName (me) returns CString;
|
||||
---Purpose : Returns the type name given at creation time
|
||||
|
||||
StepType (me) returns AsciiString from TCollection;
|
||||
---Purpose : Returns the type name as an AsciiString
|
||||
---C++ : return const &
|
||||
|
||||
Base (me) returns ESDescr;
|
||||
---Purpose : Returns the basic ESDescr, null if <me> is not derived
|
||||
|
||||
Super (me) returns ESDescr;
|
||||
---Purpose : Returns the super-type ESDescr, null if <me> is root
|
||||
|
||||
IsSub (me; other : ESDescr) returns Boolean;
|
||||
---Purpose : Tells if <me> is sub-type of (or equal to) another one
|
||||
|
||||
NbFields (me) returns Integer;
|
||||
---Purpose : Returns the count of fields
|
||||
|
||||
Rank (me; name : CString) returns Integer;
|
||||
---Purpose : Returns the rank of a field from its name. 0 if unknown
|
||||
|
||||
Name (me; num : Integer) returns CString;
|
||||
---Purpose : Returns the name of a field from its rank. empty if outofrange
|
||||
|
||||
Field (me; num : Integer) returns PDescr;
|
||||
---Purpose : Returns the PDescr for the field <num> (or Null)
|
||||
|
||||
NamedField (me; name : CString) returns PDescr;
|
||||
---Purpose : Returns the PDescr for the field named <name> (or Null)
|
||||
|
||||
-- inherited
|
||||
|
||||
Matches (me; steptype : CString) returns Boolean;
|
||||
---Purpose : Tells if a ESDescr matches a step type : exact or super type
|
||||
|
||||
IsComplex (me) returns Boolean;
|
||||
---Purpose : Returns False
|
||||
|
||||
NewEntity (me) returns Described;
|
||||
---Purpose : Creates a described entity (i.e. a simple one)
|
||||
|
||||
fields
|
||||
|
||||
thenom : AsciiString;
|
||||
thedescr : HArray1OfTransient;
|
||||
thenames : DictionaryOfInteger;
|
||||
thebase : ESDescr;
|
||||
thesuper : ESDescr;
|
||||
|
||||
end ESDescr;
|
@@ -11,10 +11,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_ESDescr.ixx>
|
||||
#include <StepData_Simple.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
#include <Dico_DictionaryOfInteger.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_PDescr.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
StepData_ESDescr::StepData_ESDescr (const Standard_CString name)
|
||||
: thenom (name) { thenames = new Dico_DictionaryOfInteger; }
|
||||
|
133
src/StepData/StepData_ESDescr.hxx
Normal file
133
src/StepData/StepData_ESDescr.hxx
Normal file
@@ -0,0 +1,133 @@
|
||||
// Created on: 1997-05-09
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_ESDescr_HeaderFile
|
||||
#define _StepData_ESDescr_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColStd_HArray1OfTransient.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Dico_DictionaryOfInteger;
|
||||
class StepData_PDescr;
|
||||
class TCollection_AsciiString;
|
||||
class StepData_Described;
|
||||
|
||||
|
||||
class StepData_ESDescr;
|
||||
DEFINE_STANDARD_HANDLE(StepData_ESDescr, StepData_EDescr)
|
||||
|
||||
//! This class is intended to describe the authorized form for a
|
||||
//! Simple (not Plex) Entity, as a list of fields
|
||||
class StepData_ESDescr : public StepData_EDescr
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an ESDescr with a type name
|
||||
Standard_EXPORT StepData_ESDescr(const Standard_CString name);
|
||||
|
||||
//! Sets a new count of fields
|
||||
//! Each one is described by a PDescr
|
||||
Standard_EXPORT void SetNbFields (const Standard_Integer nb);
|
||||
|
||||
//! Sets a PDescr to describe a field
|
||||
//! A Field is designated by its rank and name
|
||||
Standard_EXPORT void SetField (const Standard_Integer num, const Standard_CString name, const Handle(StepData_PDescr)& descr);
|
||||
|
||||
//! Sets an ESDescr as based on another one
|
||||
//! Hence, if there are inherited fields, the derived ESDescr
|
||||
//! cumulates all them, while the base just records its own ones
|
||||
Standard_EXPORT void SetBase (const Handle(StepData_ESDescr)& base);
|
||||
|
||||
//! Sets an ESDescr as "super-type". Applies an a base (non
|
||||
//! derived) ESDescr
|
||||
Standard_EXPORT void SetSuper (const Handle(StepData_ESDescr)& super);
|
||||
|
||||
//! Returns the type name given at creation time
|
||||
Standard_EXPORT Standard_CString TypeName() const;
|
||||
|
||||
//! Returns the type name as an AsciiString
|
||||
Standard_EXPORT const TCollection_AsciiString& StepType() const;
|
||||
|
||||
//! Returns the basic ESDescr, null if <me> is not derived
|
||||
Standard_EXPORT Handle(StepData_ESDescr) Base() const;
|
||||
|
||||
//! Returns the super-type ESDescr, null if <me> is root
|
||||
Standard_EXPORT Handle(StepData_ESDescr) Super() const;
|
||||
|
||||
//! Tells if <me> is sub-type of (or equal to) another one
|
||||
Standard_EXPORT Standard_Boolean IsSub (const Handle(StepData_ESDescr)& other) const;
|
||||
|
||||
//! Returns the count of fields
|
||||
Standard_EXPORT Standard_Integer NbFields() const;
|
||||
|
||||
//! Returns the rank of a field from its name. 0 if unknown
|
||||
Standard_EXPORT Standard_Integer Rank (const Standard_CString name) const;
|
||||
|
||||
//! Returns the name of a field from its rank. empty if outofrange
|
||||
Standard_EXPORT Standard_CString Name (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the PDescr for the field <num> (or Null)
|
||||
Standard_EXPORT Handle(StepData_PDescr) Field (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the PDescr for the field named <name> (or Null)
|
||||
Standard_EXPORT Handle(StepData_PDescr) NamedField (const Standard_CString name) const;
|
||||
|
||||
//! Tells if a ESDescr matches a step type : exact or super type
|
||||
Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const;
|
||||
|
||||
//! Returns False
|
||||
Standard_EXPORT Standard_Boolean IsComplex() const;
|
||||
|
||||
//! Creates a described entity (i.e. a simple one)
|
||||
Standard_EXPORT Handle(StepData_Described) NewEntity() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_ESDescr,StepData_EDescr)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TCollection_AsciiString thenom;
|
||||
Handle(TColStd_HArray1OfTransient) thedescr;
|
||||
Handle(Dico_DictionaryOfInteger) thenames;
|
||||
Handle(StepData_ESDescr) thebase;
|
||||
Handle(StepData_ESDescr) thesuper;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_ESDescr_HeaderFile
|
@@ -1,112 +0,0 @@
|
||||
-- Created on: 1995-10-25
|
||||
-- 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 EnumTool from StepData
|
||||
|
||||
---Purpose : This class gives a way of conversion between the value of an
|
||||
-- enumeration and its representation in STEP
|
||||
-- An enumeration corresponds to an integer with reserved values,
|
||||
-- which begin to 0
|
||||
-- In STEP, it is represented by a name in capital letter and
|
||||
-- limited by two dots, e.g. .UNKNOWN.
|
||||
--
|
||||
-- EnumTool works with integers, it is just required to cast
|
||||
-- between an integer and an enumeration of required type.
|
||||
--
|
||||
-- Its definition is intended to allow static creation in once,
|
||||
-- without having to recreate once for each use.
|
||||
--
|
||||
-- It is possible to define subclasses on it, which directly give
|
||||
-- the good list of definition texts, and accepts a enumeration
|
||||
-- of the good type instead of an integer
|
||||
|
||||
uses CString, AsciiString, SequenceOfAsciiString
|
||||
|
||||
is
|
||||
|
||||
Create (e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19,e20,e21,e22,e23,e24,e25,e26,e27,e28,e29,e30,e31,e32,e33,e34,e35,e36,e37,e38,e39 : CString = "")
|
||||
returns EnumTool;
|
||||
---Purpose : Creates an EnumTool with definitions given by e0 .. e<max>
|
||||
-- Each definition string can bring one term, or several
|
||||
-- separated by blanks. Each term corresponds to one value of the
|
||||
-- enumeration, if dots are not presents they are added
|
||||
--
|
||||
-- Such a static constructor allows to build a static description
|
||||
-- as : static StepData_EnumTool myenumtool("e0","e1"...);
|
||||
-- then use it without having to initialise it
|
||||
--
|
||||
-- A null definition can be input by given "$" :the corresponding
|
||||
-- position is attached to "null/undefined" value (as one
|
||||
-- particular item of the enumeration list)
|
||||
|
||||
AddDefinition (me : in out; term : CString);
|
||||
---Purpose : Processes a definition, splits it according blanks if any
|
||||
-- empty definitions are ignored
|
||||
-- A null definition can be input by given "$" :the corresponding
|
||||
-- position is attached to "null/undefined" value (as one
|
||||
-- particular item of the enumeration list)
|
||||
-- See also IsSet
|
||||
|
||||
IsSet (me) returns Boolean;
|
||||
---Purpose : Returns True if at least one definition has been entered after
|
||||
-- creation time (i.e. by AddDefinition only)
|
||||
--
|
||||
-- This allows to build a static description by a first pass :
|
||||
-- static StepData_EnumTool myenumtool("e0" ...);
|
||||
-- ...
|
||||
-- if (!myenumtool.IsSet()) { for further inits
|
||||
-- myenumtool.AddDefinition("e21");
|
||||
-- ...
|
||||
-- }
|
||||
|
||||
MaxValue (me) returns Integer;
|
||||
---Purpose : Returns the maximum integer for a suitable value
|
||||
-- Remark : while values begin at zero, MaxValue is the count of
|
||||
-- recorded values minus one
|
||||
|
||||
Optional (me : in out; mode : Boolean);
|
||||
---Purpose : Sets or Unsets the EnumTool to accept undefined value (for
|
||||
-- optional field). Ignored if no null value is defined (by "$")
|
||||
-- Can be changed during execution (to read each field),
|
||||
-- Default is True (if a null value is defined)
|
||||
|
||||
NullValue (me) returns Integer;
|
||||
---Purpose : Returns the value attached to "null/undefined value"
|
||||
-- If none is specified or if Optional has been set to False,
|
||||
-- returns -1
|
||||
-- Null Value has been specified by definition "$"
|
||||
|
||||
Text (me; num : Integer) returns AsciiString;
|
||||
---Purpose : Returns the text which corresponds to a given numeric value
|
||||
-- It is limited by dots
|
||||
-- If num is out of range, returns an empty string
|
||||
---C++ : return const &
|
||||
|
||||
Value (me; txt : CString) returns Integer;
|
||||
---Purpose : Returns the numeric value found for a text
|
||||
-- The text must be in capitals and limited by dots
|
||||
-- A non-suitable text gives a negative value to be returned
|
||||
|
||||
Value (me; txt : AsciiString) returns Integer;
|
||||
---Purpose : Same as above but works on an AsciiString
|
||||
|
||||
fields
|
||||
|
||||
thetexts : SequenceOfAsciiString;
|
||||
theinit : Integer;
|
||||
theopt : Boolean;
|
||||
|
||||
end EnumTool;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_EnumTool.ixx>
|
||||
|
||||
#include <StepData_EnumTool.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
static TCollection_AsciiString nulstr("");
|
||||
|
||||
|
144
src/StepData/StepData_EnumTool.hxx
Normal file
144
src/StepData/StepData_EnumTool.hxx
Normal file
@@ -0,0 +1,144 @@
|
||||
// Created on: 1995-10-25
|
||||
// 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 _StepData_EnumTool_HeaderFile
|
||||
#define _StepData_EnumTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class TCollection_AsciiString;
|
||||
|
||||
|
||||
//! This class gives a way of conversion between the value of an
|
||||
//! enumeration and its representation in STEP
|
||||
//! An enumeration corresponds to an integer with reserved values,
|
||||
//! which begin to 0
|
||||
//! In STEP, it is represented by a name in capital letter and
|
||||
//! limited by two dots, e.g. .UNKNOWN.
|
||||
//!
|
||||
//! EnumTool works with integers, it is just required to cast
|
||||
//! between an integer and an enumeration of required type.
|
||||
//!
|
||||
//! Its definition is intended to allow static creation in once,
|
||||
//! without having to recreate once for each use.
|
||||
//!
|
||||
//! It is possible to define subclasses on it, which directly give
|
||||
//! the good list of definition texts, and accepts a enumeration
|
||||
//! of the good type instead of an integer
|
||||
class StepData_EnumTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates an EnumTool with definitions given by e0 .. e<max>
|
||||
//! Each definition string can bring one term, or several
|
||||
//! separated by blanks. Each term corresponds to one value of the
|
||||
//! enumeration, if dots are not presents they are added
|
||||
//!
|
||||
//! Such a static constructor allows to build a static description
|
||||
//! as : static StepData_EnumTool myenumtool("e0","e1"...);
|
||||
//! then use it without having to initialise it
|
||||
//!
|
||||
//! A null definition can be input by given "$" :the corresponding
|
||||
//! position is attached to "null/undefined" value (as one
|
||||
//! particular item of the enumeration list)
|
||||
Standard_EXPORT StepData_EnumTool(const Standard_CString e0 = "", const Standard_CString e1 = "", const Standard_CString e2 = "", const Standard_CString e3 = "", const Standard_CString e4 = "", const Standard_CString e5 = "", const Standard_CString e6 = "", const Standard_CString e7 = "", const Standard_CString e8 = "", const Standard_CString e9 = "", const Standard_CString e10 = "", const Standard_CString e11 = "", const Standard_CString e12 = "", const Standard_CString e13 = "", const Standard_CString e14 = "", const Standard_CString e15 = "", const Standard_CString e16 = "", const Standard_CString e17 = "", const Standard_CString e18 = "", const Standard_CString e19 = "", const Standard_CString e20 = "", const Standard_CString e21 = "", const Standard_CString e22 = "", const Standard_CString e23 = "", const Standard_CString e24 = "", const Standard_CString e25 = "", const Standard_CString e26 = "", const Standard_CString e27 = "", const Standard_CString e28 = "", const Standard_CString e29 = "", const Standard_CString e30 = "", const Standard_CString e31 = "", const Standard_CString e32 = "", const Standard_CString e33 = "", const Standard_CString e34 = "", const Standard_CString e35 = "", const Standard_CString e36 = "", const Standard_CString e37 = "", const Standard_CString e38 = "", const Standard_CString e39 = "");
|
||||
|
||||
//! Processes a definition, splits it according blanks if any
|
||||
//! empty definitions are ignored
|
||||
//! A null definition can be input by given "$" :the corresponding
|
||||
//! position is attached to "null/undefined" value (as one
|
||||
//! particular item of the enumeration list)
|
||||
//! See also IsSet
|
||||
Standard_EXPORT void AddDefinition (const Standard_CString term);
|
||||
|
||||
//! Returns True if at least one definition has been entered after
|
||||
//! creation time (i.e. by AddDefinition only)
|
||||
//!
|
||||
//! This allows to build a static description by a first pass :
|
||||
//! static StepData_EnumTool myenumtool("e0" ...);
|
||||
//! ...
|
||||
//! if (!myenumtool.IsSet()) { for further inits
|
||||
//! myenumtool.AddDefinition("e21");
|
||||
//! ...
|
||||
//! }
|
||||
Standard_EXPORT Standard_Boolean IsSet() const;
|
||||
|
||||
//! Returns the maximum integer for a suitable value
|
||||
//! Remark : while values begin at zero, MaxValue is the count of
|
||||
//! recorded values minus one
|
||||
Standard_EXPORT Standard_Integer MaxValue() const;
|
||||
|
||||
//! Sets or Unsets the EnumTool to accept undefined value (for
|
||||
//! optional field). Ignored if no null value is defined (by "$")
|
||||
//! Can be changed during execution (to read each field),
|
||||
//! Default is True (if a null value is defined)
|
||||
Standard_EXPORT void Optional (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the value attached to "null/undefined value"
|
||||
//! If none is specified or if Optional has been set to False,
|
||||
//! returns -1
|
||||
//! Null Value has been specified by definition "$"
|
||||
Standard_EXPORT Standard_Integer NullValue() const;
|
||||
|
||||
//! Returns the text which corresponds to a given numeric value
|
||||
//! It is limited by dots
|
||||
//! If num is out of range, returns an empty string
|
||||
Standard_EXPORT const TCollection_AsciiString& Text (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the numeric value found for a text
|
||||
//! The text must be in capitals and limited by dots
|
||||
//! A non-suitable text gives a negative value to be returned
|
||||
Standard_EXPORT Standard_Integer Value (const Standard_CString txt) const;
|
||||
|
||||
//! Same as above but works on an AsciiString
|
||||
Standard_EXPORT Standard_Integer Value (const TCollection_AsciiString& txt) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TColStd_SequenceOfAsciiString thetexts;
|
||||
Standard_Integer theinit;
|
||||
Standard_Boolean theopt;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_EnumTool_HeaderFile
|
@@ -1,188 +0,0 @@
|
||||
-- Created on: 1996-12-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-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 Field from StepData
|
||||
|
||||
---Purpose : Defines a generally defined Field for STEP data : can be used
|
||||
-- either in any kind of entity to implement it or in free format
|
||||
-- entities in a "late-binding" mode
|
||||
-- A field can have : no value (or derived), a single value of
|
||||
-- any kind, a list of value : single or double list
|
||||
--
|
||||
-- When a field is set, this defines its new kind (Integer etc..)
|
||||
-- A single value is immediately set. A list of value is, firstly
|
||||
-- declared as for a kind (Integer String etc), then declared as
|
||||
-- a list with its initial size, after this its items are set
|
||||
-- Also it can be set in once if the HArray is ready
|
||||
|
||||
uses Transient, HAsciiString, CString,
|
||||
HArray1OfInteger from TColStd, HArray1OfReal from TColStd,
|
||||
HArray1OfTransient from TColStd, HArray1OfHAsciiString from Interface,
|
||||
Logical from StepData, SelectMember from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns Field;
|
||||
---Purpose : Creates a Field, empty ("no value defined")
|
||||
|
||||
Create (other : Field; copy : Boolean = Standard_False) returns Field;
|
||||
---Purpose : Creates a Field from another one. If <copy> is True, Handled
|
||||
-- data (Select,String,List, not entities) are copied
|
||||
|
||||
CopyFrom (me : in out; other : Field);
|
||||
---Purpose : Gets the copy of the values of another field
|
||||
|
||||
Clear (me : in out; kind : Integer = 0);
|
||||
---Purpose : Clears the field, to set it as "no value defined"
|
||||
-- Just before SetList, predeclares it as "any"
|
||||
-- A Kind can be directly set here to declare a type
|
||||
|
||||
-- Setting a Single Value, or predeclaring a list
|
||||
|
||||
SetDerived (me : in out);
|
||||
---Purpose : Codes a Field as derived (no proper value)
|
||||
|
||||
SetInt (me : in out; val : Integer);
|
||||
---Purpose : Directly sets the Integer value, if its Kind matches
|
||||
-- Integer, Boolean, Logical, or Enum (does not change Kind)
|
||||
|
||||
SetInteger (me : in out; val : Integer = 0);
|
||||
---Purpose : Sets an Integer value (before SetList* declares it as Integer)
|
||||
|
||||
SetBoolean (me : in out; val : Boolean = Standard_False);
|
||||
---Purpose : Sets a Boolean value (or predeclares a list as boolean)
|
||||
|
||||
SetLogical (me : in out; val : Logical = StepData_LFalse);
|
||||
---Purpose : Sets a Logical Value (or predeclares a list as logical)
|
||||
|
||||
SetReal (me : in out; val : Real = 0.0);
|
||||
---Purpose : Sets a Real Value (or predeclares a list as Real);
|
||||
|
||||
SetString (me : in out; val : CString = "");
|
||||
---Purpose : Sets a String Value (or predeclares a list as String)
|
||||
-- Does not redefine the Kind if it is alread String or Enum
|
||||
|
||||
SetEnum (me : in out; val : Integer = -1; text : CString = "");
|
||||
---Purpose : Sets an Enum Value (as its integer counterpart)
|
||||
-- (or predeclares a list as Enum)
|
||||
-- If <text> is given , also sets its textual expression
|
||||
-- <val> negative means unknown (known values begin at 0)
|
||||
|
||||
SetSelectMember (me : in out; val : SelectMember);
|
||||
---Purpose : Sets a SelectMember (for Integer,Boolean,Enum,Real,Logical)
|
||||
-- Hence, the value of the field is accessed through this member
|
||||
|
||||
SetEntity (me : in out; val : Transient);
|
||||
---Purpose : Sets an Entity Value
|
||||
|
||||
SetEntity (me : in out);
|
||||
---Purpose : Predeclares a list as of entity
|
||||
|
||||
SetList (me : in out; size : Integer; first : Integer = 1);
|
||||
---Purpose : Declares a field as a list, with an initial size
|
||||
-- Initial lower is defaulted as 1, can be defined
|
||||
-- The list starts empty, typed by the last Set*
|
||||
-- If no Set* before, sets it as "any" (transient/select)
|
||||
|
||||
SetList2 (me : in out; siz1, siz2 : Integer; f1,f2 : Integer = 1);
|
||||
---Purpose : Declares a field as an homogeneous square list, with initial\
|
||||
-- sizes, and initial lowers
|
||||
|
||||
Set (me : in out; val : Transient);
|
||||
---Purpose : Sets an undetermined value : can be String, SelectMember,
|
||||
-- HArray(1-2) ... else, an Entity
|
||||
-- In case of an HArray, determines and records its size(s)
|
||||
|
||||
-- Setting List Items : Single List
|
||||
|
||||
ClearItem (me : in out; num : Integer);
|
||||
---Purpose : Declares an item of the list as undefined
|
||||
-- (ignored if list not defined as String,Entity or Any)
|
||||
|
||||
SetInt (me : in out; num : Integer; val : Integer; kind : Integer);
|
||||
---Purpose : Internal access to an Integer Value for a list, plus its kind
|
||||
|
||||
SetInteger (me : in out; num : Integer; val : Integer);
|
||||
---Purpose : Sets an Integer Value for a list (rank num)
|
||||
-- (recognizes a SelectMember)
|
||||
|
||||
SetBoolean (me : in out; num : Integer; val : Boolean);
|
||||
|
||||
SetLogical (me : in out; num : Integer; val : Logical);
|
||||
|
||||
SetEnum (me : in out; num : Integer; val : Integer; text: CString = "");
|
||||
---Purpose : Sets an Enum Value (Integer counterpart), also its text
|
||||
-- expression if known (if list has been set as "any")
|
||||
|
||||
SetReal (me : in out; num : Integer; val : Real);
|
||||
|
||||
SetString (me : in out; num : Integer; val : CString);
|
||||
|
||||
SetEntity (me : in out; num : Integer; val : Transient);
|
||||
|
||||
-- Quering Value
|
||||
-- For a Single field, n1 and n2 are ignored
|
||||
-- For a Single List, n1 is considered and n2 is ignored
|
||||
|
||||
IsSet (me; n1, n2 : Integer = 1) returns Boolean;
|
||||
|
||||
ItemKind (me; n1, n2 : Integer = 1) returns Integer;
|
||||
---Purpose : Returns the kind of an item in a list or double list
|
||||
-- It is the kind of the list, except if it is "Any", in such a
|
||||
-- case the true kind is determined and returned
|
||||
|
||||
Kind (me; type : Boolean = Standard_True) returns Integer; -- enum ?
|
||||
---Purpose : Returns the kind of the field
|
||||
-- <type> True (D) : returns only the type itself
|
||||
-- else, returns the complete kind
|
||||
|
||||
Arity (me) returns Integer; -- 0:single 1:list 2:list2
|
||||
|
||||
Length (me; index : Integer = 1) returns Integer; -- for index 1 or 2
|
||||
-- True Length, not simply the reserved one
|
||||
|
||||
Lower (me; index : Integer = 1) returns Integer; -- for index 1 or 2
|
||||
|
||||
-- Single :
|
||||
|
||||
Int (me) returns Integer; -- the field Integer itself
|
||||
|
||||
Integer (me; n1, n2 : Integer = 1) returns Integer;
|
||||
|
||||
Boolean (me; n1, n2 : Integer = 1) returns Boolean;
|
||||
|
||||
Logical (me; n1, n2 : Integer = 1) returns Logical;
|
||||
|
||||
Real (me; n1, n2 : Integer = 1) returns Real;
|
||||
|
||||
String (me; n1, n2 : Integer = 1) returns CString;
|
||||
|
||||
Enum (me; n1, n2 : Integer = 1) returns Integer;
|
||||
|
||||
EnumText (me; n1, n2 : Integer = 1) returns CString; -- "" if unknown
|
||||
|
||||
Entity (me; n1, n2 : Integer = 1) returns Transient;
|
||||
|
||||
Transient (me) returns Transient; -- the fields itself
|
||||
|
||||
fields
|
||||
|
||||
thekind : Integer;
|
||||
theint : Integer;
|
||||
thereal : Real;
|
||||
theany : Transient;
|
||||
|
||||
end Field;
|
@@ -11,30 +11,30 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_Field.ixx>
|
||||
|
||||
#include <Interface_HArray1OfHAsciiString.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_SelectInt.hxx>
|
||||
#include <StepData_SelectReal.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
#include <StepData_SelectNamed.hxx>
|
||||
#include <StepData_SelectReal.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColStd_HArray1OfTransient.hxx>
|
||||
#include <Interface_HArray1OfHAsciiString.hxx>
|
||||
#include <TColStd_HArray2OfInteger.hxx>
|
||||
#include <TColStd_HArray2OfReal.hxx>
|
||||
#include <TColStd_HArray2OfTransient.hxx>
|
||||
|
||||
// Le kind code le type de donnee, le mode d acces (direct ou via Select),
|
||||
// l arite (simple, liste, carre)
|
||||
|
||||
// Valeurs pour Kind : 0 = Clear/Undefined
|
||||
// KindInteger KindBoolean KindLogical KindEnum KindReal KindString KindEntity
|
||||
// + KindSelect qui s y substitue et peut s y combiner
|
||||
// + KindList et KindList2 qui peuvent s y combiner
|
||||
// (sur masque KindArity et decalage ShiftArity)
|
||||
|
||||
#define KindInteger 1
|
||||
#define KindBoolean 2
|
||||
#define KindLogical 3
|
||||
|
210
src/StepData/StepData_Field.hxx
Normal file
210
src/StepData/StepData_Field.hxx
Normal file
@@ -0,0 +1,210 @@
|
||||
// Created on: 1996-12-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-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 _StepData_Field_HeaderFile
|
||||
#define _StepData_Field_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Standard_Transient;
|
||||
class StepData_SelectMember;
|
||||
|
||||
|
||||
//! Defines a generally defined Field for STEP data : can be used
|
||||
//! either in any kind of entity to implement it or in free format
|
||||
//! entities in a "late-binding" mode
|
||||
//! A field can have : no value (or derived), a single value of
|
||||
//! any kind, a list of value : single or double list
|
||||
//!
|
||||
//! When a field is set, this defines its new kind (Integer etc..)
|
||||
//! A single value is immediately set. A list of value is, firstly
|
||||
//! declared as for a kind (Integer String etc), then declared as
|
||||
//! a list with its initial size, after this its items are set
|
||||
//! Also it can be set in once if the HArray is ready
|
||||
class StepData_Field
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a Field, empty ("no value defined")
|
||||
Standard_EXPORT StepData_Field();
|
||||
|
||||
//! Creates a Field from another one. If <copy> is True, Handled
|
||||
//! data (Select,String,List, not entities) are copied
|
||||
Standard_EXPORT StepData_Field(const StepData_Field& other, const Standard_Boolean copy = Standard_False);
|
||||
|
||||
//! Gets the copy of the values of another field
|
||||
Standard_EXPORT void CopyFrom (const StepData_Field& other);
|
||||
|
||||
//! Clears the field, to set it as "no value defined"
|
||||
//! Just before SetList, predeclares it as "any"
|
||||
//! A Kind can be directly set here to declare a type
|
||||
Standard_EXPORT void Clear (const Standard_Integer kind = 0);
|
||||
|
||||
//! Codes a Field as derived (no proper value)
|
||||
Standard_EXPORT void SetDerived();
|
||||
|
||||
//! Directly sets the Integer value, if its Kind matches
|
||||
//! Integer, Boolean, Logical, or Enum (does not change Kind)
|
||||
Standard_EXPORT void SetInt (const Standard_Integer val);
|
||||
|
||||
//! Sets an Integer value (before SetList* declares it as Integer)
|
||||
Standard_EXPORT void SetInteger (const Standard_Integer val = 0);
|
||||
|
||||
//! Sets a Boolean value (or predeclares a list as boolean)
|
||||
Standard_EXPORT void SetBoolean (const Standard_Boolean val = Standard_False);
|
||||
|
||||
//! Sets a Logical Value (or predeclares a list as logical)
|
||||
Standard_EXPORT void SetLogical (const StepData_Logical val = StepData_LFalse);
|
||||
|
||||
//! Sets a Real Value (or predeclares a list as Real);
|
||||
Standard_EXPORT void SetReal (const Standard_Real val = 0.0);
|
||||
|
||||
//! Sets a String Value (or predeclares a list as String)
|
||||
//! Does not redefine the Kind if it is alread String or Enum
|
||||
Standard_EXPORT void SetString (const Standard_CString val = "");
|
||||
|
||||
//! Sets an Enum Value (as its integer counterpart)
|
||||
//! (or predeclares a list as Enum)
|
||||
//! If <text> is given , also sets its textual expression
|
||||
//! <val> negative means unknown (known values begin at 0)
|
||||
Standard_EXPORT void SetEnum (const Standard_Integer val = -1, const Standard_CString text = "");
|
||||
|
||||
//! Sets a SelectMember (for Integer,Boolean,Enum,Real,Logical)
|
||||
//! Hence, the value of the field is accessed through this member
|
||||
Standard_EXPORT void SetSelectMember (const Handle(StepData_SelectMember)& val);
|
||||
|
||||
//! Sets an Entity Value
|
||||
Standard_EXPORT void SetEntity (const Handle(Standard_Transient)& val);
|
||||
|
||||
//! Predeclares a list as of entity
|
||||
Standard_EXPORT void SetEntity();
|
||||
|
||||
//! Declares a field as a list, with an initial size
|
||||
//! Initial lower is defaulted as 1, can be defined
|
||||
//! The list starts empty, typed by the last Set*
|
||||
//! If no Set* before, sets it as "any" (transient/select)
|
||||
Standard_EXPORT void SetList (const Standard_Integer size, const Standard_Integer first = 1);
|
||||
|
||||
//! Declares a field as an homogeneous square list, with initial
|
||||
//! sizes, and initial lowers
|
||||
Standard_EXPORT void SetList2 (const Standard_Integer siz1, const Standard_Integer siz2, const Standard_Integer f1 = 1, const Standard_Integer f2 = 1);
|
||||
|
||||
//! Sets an undetermined value : can be String, SelectMember,
|
||||
//! HArray(1-2) ... else, an Entity
|
||||
//! In case of an HArray, determines and records its size(s)
|
||||
Standard_EXPORT void Set (const Handle(Standard_Transient)& val);
|
||||
|
||||
//! Declares an item of the list as undefined
|
||||
//! (ignored if list not defined as String,Entity or Any)
|
||||
Standard_EXPORT void ClearItem (const Standard_Integer num);
|
||||
|
||||
//! Internal access to an Integer Value for a list, plus its kind
|
||||
Standard_EXPORT void SetInt (const Standard_Integer num, const Standard_Integer val, const Standard_Integer kind);
|
||||
|
||||
//! Sets an Integer Value for a list (rank num)
|
||||
//! (recognizes a SelectMember)
|
||||
Standard_EXPORT void SetInteger (const Standard_Integer num, const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetBoolean (const Standard_Integer num, const Standard_Boolean val);
|
||||
|
||||
Standard_EXPORT void SetLogical (const Standard_Integer num, const StepData_Logical val);
|
||||
|
||||
//! Sets an Enum Value (Integer counterpart), also its text
|
||||
//! expression if known (if list has been set as "any")
|
||||
Standard_EXPORT void SetEnum (const Standard_Integer num, const Standard_Integer val, const Standard_CString text = "");
|
||||
|
||||
Standard_EXPORT void SetReal (const Standard_Integer num, const Standard_Real val);
|
||||
|
||||
Standard_EXPORT void SetString (const Standard_Integer num, const Standard_CString val);
|
||||
|
||||
Standard_EXPORT void SetEntity (const Standard_Integer num, const Handle(Standard_Transient)& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsSet (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
//! Returns the kind of an item in a list or double list
|
||||
//! It is the kind of the list, except if it is "Any", in such a
|
||||
//! case the true kind is determined and returned
|
||||
Standard_EXPORT Standard_Integer ItemKind (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
//! Returns the kind of the field
|
||||
//! <type> True (D) : returns only the type itself
|
||||
//! else, returns the complete kind
|
||||
Standard_EXPORT Standard_Integer Kind (const Standard_Boolean type = Standard_True) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer Arity() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer Length (const Standard_Integer index = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer Lower (const Standard_Integer index = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer Int() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer Integer (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Boolean (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT StepData_Logical Logical (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Real (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_CString String (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer Enum (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Standard_CString EnumText (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Handle(Standard_Transient) Entity (const Standard_Integer n1 = 1, const Standard_Integer n2 = 1) const;
|
||||
|
||||
Standard_EXPORT Handle(Standard_Transient) Transient() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer thekind;
|
||||
Standard_Integer theint;
|
||||
Standard_Real thereal;
|
||||
Handle(Standard_Transient) theany;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_Field_HeaderFile
|
@@ -1,53 +0,0 @@
|
||||
-- Created on: 1997-04-01
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 FieldList from StepData
|
||||
|
||||
---Purpose : Describes a list of fields, in a general way
|
||||
-- This basic class is for a null size list
|
||||
-- Subclasses are for 1, N (fixed) or Dynamic sizes
|
||||
|
||||
uses Field from StepData, EntityIterator from Interface
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create returns FieldList;
|
||||
---Purpose : Creates a FieldList of 0 Field
|
||||
|
||||
NbFields (me) returns Integer is virtual;
|
||||
---Purpose : Returns the count of fields. Here, returns 0
|
||||
|
||||
Field (me; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is virtual;
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : in out; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
-- modify its content
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is virtual;
|
||||
---C++ : return &
|
||||
|
||||
FillShared (me; iter : in out EntityIterator);
|
||||
---Purpose : Fills an iterator with the entities shared by <me>
|
||||
|
||||
end FieldList;
|
@@ -11,9 +11,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_FieldList.ixx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FieldList.hxx>
|
||||
|
||||
static StepData_Field nulfild;
|
||||
|
||||
|
79
src/StepData/StepData_FieldList.hxx
Normal file
79
src/StepData/StepData_FieldList.hxx
Normal file
@@ -0,0 +1,79 @@
|
||||
// Created on: 1997-04-01
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_FieldList_HeaderFile
|
||||
#define _StepData_FieldList_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class StepData_Field;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
//! Describes a list of fields, in a general way
|
||||
//! This basic class is for a null size list
|
||||
//! Subclasses are for 1, N (fixed) or Dynamic sizes
|
||||
class StepData_FieldList
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a FieldList of 0 Field
|
||||
Standard_EXPORT StepData_FieldList();
|
||||
|
||||
//! Returns the count of fields. Here, returns 0
|
||||
Standard_EXPORT virtual Standard_Integer NbFields() const;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
Standard_EXPORT virtual const StepData_Field& Field (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
//! modify its content
|
||||
Standard_EXPORT virtual StepData_Field& CField (const Standard_Integer num);
|
||||
|
||||
//! Fills an iterator with the entities shared by <me>
|
||||
Standard_EXPORT void FillShared (Interface_EntityIterator& iter) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FieldList_HeaderFile
|
@@ -1,55 +0,0 @@
|
||||
-- Created on: 1997-04-01
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 FieldList1 from StepData inherits FieldList from StepData
|
||||
|
||||
---Purpose : Describes a list of ONE field
|
||||
|
||||
uses Field from StepData
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create returns FieldList1;
|
||||
---Purpose : Creates a FieldList of 1 Field
|
||||
|
||||
NbFields (me) returns Integer is redefined;
|
||||
---Purpose : Returns the count of fields. Here, returns 1
|
||||
|
||||
Field (me; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is redefined;
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : in out; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
-- modify its content
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is redefined;
|
||||
---C++ : return &
|
||||
|
||||
Destroy (me: in out) is virtual;
|
||||
---C++ : alias "Standard_EXPORT virtual ~StepData_FieldList1() { Destroy(); }"
|
||||
|
||||
fields
|
||||
|
||||
thefield : Field from StepData;
|
||||
|
||||
end FieldList1;
|
@@ -11,9 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_FieldList1.ixx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FieldList1.hxx>
|
||||
|
||||
StepData_FieldList1::StepData_FieldList1 () { }
|
||||
|
||||
|
79
src/StepData/StepData_FieldList1.hxx
Normal file
79
src/StepData/StepData_FieldList1.hxx
Normal file
@@ -0,0 +1,79 @@
|
||||
// Created on: 1997-04-01
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_FieldList1_HeaderFile
|
||||
#define _StepData_FieldList1_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FieldList.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class StepData_Field;
|
||||
|
||||
|
||||
//! Describes a list of ONE field
|
||||
class StepData_FieldList1 : public StepData_FieldList
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a FieldList of 1 Field
|
||||
Standard_EXPORT StepData_FieldList1();
|
||||
|
||||
//! Returns the count of fields. Here, returns 1
|
||||
Standard_EXPORT virtual Standard_Integer NbFields() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
Standard_EXPORT virtual const StepData_Field& Field (const Standard_Integer num) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
//! modify its content
|
||||
Standard_EXPORT virtual StepData_Field& CField (const Standard_Integer num) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
Standard_EXPORT virtual ~StepData_FieldList1() { Destroy(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
StepData_Field thefield;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FieldList1_HeaderFile
|
@@ -1,61 +0,0 @@
|
||||
-- Created on: 1997-04-01
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 FieldListD from StepData inherits FieldList from StepData
|
||||
|
||||
---Purpose : Describes a list of fields, in a general way
|
||||
-- This basic class is for a null size list
|
||||
-- Subclasses are for 1, N (fixed) or Dynamic sizes
|
||||
|
||||
uses Field from StepData, HArray1OfField from StepData
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create (nb : Integer) returns FieldListD;
|
||||
---Purpose : Creates a FieldListD of <nb> Fields
|
||||
|
||||
SetNb (me : in out; nb : Integer);
|
||||
---Purpose : Sets a new count of Fields. Former contents are lost
|
||||
|
||||
NbFields (me) returns Integer is redefined;
|
||||
---Purpose : Returns the count of fields. Here, returns starting <nb>
|
||||
|
||||
Field (me; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is redefined;
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : in out; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
-- modify its content
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is redefined;
|
||||
---C++ : return &
|
||||
|
||||
Destroy (me: in out) is virtual;
|
||||
---C++ : alias "Standard_EXPORT virtual ~StepData_FieldListD() { Destroy(); }"
|
||||
|
||||
|
||||
fields
|
||||
|
||||
thefields : HArray1OfField;
|
||||
|
||||
end FieldListD;
|
@@ -11,9 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_FieldListD.ixx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FieldListD.hxx>
|
||||
|
||||
StepData_FieldListD::StepData_FieldListD (const Standard_Integer nb)
|
||||
{ if (nb > 0) thefields = new StepData_HArray1OfField (1,nb); }
|
||||
|
84
src/StepData/StepData_FieldListD.hxx
Normal file
84
src/StepData/StepData_FieldListD.hxx
Normal file
@@ -0,0 +1,84 @@
|
||||
// Created on: 1997-04-01
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_FieldListD_HeaderFile
|
||||
#define _StepData_FieldListD_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <StepData_HArray1OfField.hxx>
|
||||
#include <StepData_FieldList.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class StepData_Field;
|
||||
|
||||
|
||||
//! Describes a list of fields, in a general way
|
||||
//! This basic class is for a null size list
|
||||
//! Subclasses are for 1, N (fixed) or Dynamic sizes
|
||||
class StepData_FieldListD : public StepData_FieldList
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a FieldListD of <nb> Fields
|
||||
Standard_EXPORT StepData_FieldListD(const Standard_Integer nb);
|
||||
|
||||
//! Sets a new count of Fields. Former contents are lost
|
||||
Standard_EXPORT void SetNb (const Standard_Integer nb);
|
||||
|
||||
//! Returns the count of fields. Here, returns starting <nb>
|
||||
Standard_EXPORT virtual Standard_Integer NbFields() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
Standard_EXPORT virtual const StepData_Field& Field (const Standard_Integer num) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
//! modify its content
|
||||
Standard_EXPORT virtual StepData_Field& CField (const Standard_Integer num) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
Standard_EXPORT virtual ~StepData_FieldListD() { Destroy(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(StepData_HArray1OfField) thefields;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FieldListD_HeaderFile
|
@@ -1,58 +0,0 @@
|
||||
-- Created on: 1997-04-01
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 FieldListN from StepData inherits FieldList from StepData
|
||||
|
||||
---Purpose : Describes a list of fields, in a general way
|
||||
-- This basic class is for a null size list
|
||||
-- Subclasses are for 1, N (fixed) or Dynamic sizes
|
||||
|
||||
uses Field from StepData, Array1OfField from StepData
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create (nb : Integer) returns FieldListN;
|
||||
---Purpose : Creates a FieldListN of <nb> Fields
|
||||
|
||||
NbFields (me) returns Integer is redefined;
|
||||
---Purpose : Returns the count of fields. Here, returns starting <nb>
|
||||
|
||||
Field (me; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is redefined;
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : in out; num : Integer) returns Field
|
||||
---Purpose : Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
-- modify its content
|
||||
raises OutOfRange
|
||||
-- Error if <num> out of range
|
||||
is redefined;
|
||||
---C++ : return &
|
||||
|
||||
Destroy (me: in out) is virtual;
|
||||
---C++ : alias "Standard_EXPORT virtual ~StepData_FieldListN() { Destroy(); }"
|
||||
|
||||
|
||||
fields
|
||||
|
||||
thefields : Array1OfField;
|
||||
|
||||
end FieldListN;
|
@@ -11,9 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_FieldListN.ixx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FieldListN.hxx>
|
||||
|
||||
StepData_FieldListN::StepData_FieldListN (const Standard_Integer nb)
|
||||
: thefields ( (nb == 0 ? 0 : 1),nb) { }
|
||||
|
81
src/StepData/StepData_FieldListN.hxx
Normal file
81
src/StepData/StepData_FieldListN.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1997-04-01
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_FieldListN_HeaderFile
|
||||
#define _StepData_FieldListN_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <StepData_Array1OfField.hxx>
|
||||
#include <StepData_FieldList.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class StepData_Field;
|
||||
|
||||
|
||||
//! Describes a list of fields, in a general way
|
||||
//! This basic class is for a null size list
|
||||
//! Subclasses are for 1, N (fixed) or Dynamic sizes
|
||||
class StepData_FieldListN : public StepData_FieldList
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a FieldListN of <nb> Fields
|
||||
Standard_EXPORT StepData_FieldListN(const Standard_Integer nb);
|
||||
|
||||
//! Returns the count of fields. Here, returns starting <nb>
|
||||
Standard_EXPORT virtual Standard_Integer NbFields() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields (read only)
|
||||
Standard_EXPORT virtual const StepData_Field& Field (const Standard_Integer num) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the field n0 <num> between 1 and NbFields, in order to
|
||||
//! modify its content
|
||||
Standard_EXPORT virtual StepData_Field& CField (const Standard_Integer num) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
Standard_EXPORT virtual ~StepData_FieldListN() { Destroy(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
StepData_Array1OfField thefields;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FieldListN_HeaderFile
|
@@ -1,68 +0,0 @@
|
||||
-- Created on: 1993-07-23
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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 FileProtocol from StepData inherits Protocol from StepData
|
||||
|
||||
---Purpose : A FileProtocol is defined as the addition of several already
|
||||
-- existing Protocols. It corresponds to the definition of a
|
||||
-- SchemaName with several Names, each one being attached to a
|
||||
-- specific Protocol. Thus, a File defined with a compound Schema
|
||||
-- is processed as any other one, once built the equivalent
|
||||
-- compound Protocol, a FileProtocol
|
||||
|
||||
uses Type, CString, SequenceOfTransient,
|
||||
Graph from Interface, Check from Interface,
|
||||
Protocol from Interface, Protocol from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns FileProtocol;
|
||||
---Purpose : Creates an empty FileProtocol
|
||||
|
||||
Add (me : mutable; protocol : Protocol from StepData);
|
||||
---Purpose : Adds a Protocol to the definition list of the FileProtocol
|
||||
-- But ensures that each class of Protocol is present only once
|
||||
-- in this list
|
||||
|
||||
NbResources (me) returns Integer is redefined;
|
||||
---Purpose : Gives the count of Protocols used as Resource (can be zero)
|
||||
-- i.e. the count of Protocol recorded by calling the method Add
|
||||
|
||||
Resource (me; num : Integer) returns Protocol from Interface is redefined;
|
||||
---Purpose : Returns a Resource, given a rank. Here, rank of calling Add
|
||||
|
||||
TypeNumber (me; atype : any Type) returns Integer is redefined;
|
||||
---Purpose : Returns a Case Number, specific of each recognized Type
|
||||
-- Here, NO Type at all is recognized properly : all Types are
|
||||
-- recognized by the resources
|
||||
|
||||
GlobalCheck (me; G : Graph; ach : in out Check)
|
||||
returns Boolean is redefined;
|
||||
---Purpose : Calls GlobalCheck for each of its recorded ressources
|
||||
|
||||
-- -- Specific for StepData -- --
|
||||
|
||||
SchemaName (me) returns CString is redefined;
|
||||
---Purpose : Returns the Schema Name attached to each class of Protocol
|
||||
-- To be redefined by each sub-class
|
||||
-- Here, SchemaName returns "" (empty String)
|
||||
-- was C++ : return const
|
||||
|
||||
fields
|
||||
|
||||
thecomps : SequenceOfTransient;
|
||||
|
||||
end FileProtocol;
|
@@ -11,9 +11,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_FileProtocol.ixx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_FileProtocol.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
|
||||
//static TCollection_AsciiString thename("");
|
||||
static Standard_CString thename = "";
|
||||
|
103
src/StepData/StepData_FileProtocol.hxx
Normal file
103
src/StepData/StepData_FileProtocol.hxx
Normal file
@@ -0,0 +1,103 @@
|
||||
// Created on: 1993-07-23
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_FileProtocol_HeaderFile
|
||||
#define _StepData_FileProtocol_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_SequenceOfTransient.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class StepData_Protocol;
|
||||
class Interface_Protocol;
|
||||
class Interface_Graph;
|
||||
class Interface_Check;
|
||||
|
||||
|
||||
class StepData_FileProtocol;
|
||||
DEFINE_STANDARD_HANDLE(StepData_FileProtocol, StepData_Protocol)
|
||||
|
||||
//! A FileProtocol is defined as the addition of several already
|
||||
//! existing Protocols. It corresponds to the definition of a
|
||||
//! SchemaName with several Names, each one being attached to a
|
||||
//! specific Protocol. Thus, a File defined with a compound Schema
|
||||
//! is processed as any other one, once built the equivalent
|
||||
//! compound Protocol, a FileProtocol
|
||||
class StepData_FileProtocol : public StepData_Protocol
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an empty FileProtocol
|
||||
Standard_EXPORT StepData_FileProtocol();
|
||||
|
||||
//! Adds a Protocol to the definition list of the FileProtocol
|
||||
//! But ensures that each class of Protocol is present only once
|
||||
//! in this list
|
||||
Standard_EXPORT void Add (const Handle(StepData_Protocol)& protocol);
|
||||
|
||||
//! Gives the count of Protocols used as Resource (can be zero)
|
||||
//! i.e. the count of Protocol recorded by calling the method Add
|
||||
Standard_EXPORT virtual Standard_Integer NbResources() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a Resource, given a rank. Here, rank of calling Add
|
||||
Standard_EXPORT virtual Handle(Interface_Protocol) Resource (const Standard_Integer num) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a Case Number, specific of each recognized Type
|
||||
//! Here, NO Type at all is recognized properly : all Types are
|
||||
//! recognized by the resources
|
||||
Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE;
|
||||
|
||||
//! Calls GlobalCheck for each of its recorded ressources
|
||||
Standard_EXPORT virtual Standard_Boolean GlobalCheck (const Interface_Graph& G, Handle(Interface_Check)& ach) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the Schema Name attached to each class of Protocol
|
||||
//! To be redefined by each sub-class
|
||||
//! Here, SchemaName returns "" (empty String)
|
||||
//! was C++ : return const
|
||||
Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_FileProtocol,StepData_Protocol)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TColStd_SequenceOfTransient thecomps;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FileProtocol_HeaderFile
|
80
src/StepData/StepData_FileRecognizer.hxx
Normal file
80
src/StepData/StepData_FileRecognizer.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _StepData_FileRecognizer_HeaderFile
|
||||
#define _StepData_FileRecognizer_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
class Standard_Transient;
|
||||
class Standard_NoSuchObject;
|
||||
class TCollection_AsciiString;
|
||||
|
||||
|
||||
class StepData_FileRecognizer;
|
||||
DEFINE_STANDARD_HANDLE(StepData_FileRecognizer, Standard_Transient)
|
||||
|
||||
|
||||
class StepData_FileRecognizer : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean Evaluate (const TCollection_AsciiString& akey, Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT Handle(Standard_Transient) Result() const;
|
||||
|
||||
Standard_EXPORT void Add (const Handle(StepData_FileRecognizer)& reco);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_FileRecognizer,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_FileRecognizer();
|
||||
|
||||
Standard_EXPORT void SetOK (const Handle(Standard_Transient)& aresult);
|
||||
|
||||
Standard_EXPORT void SetKO();
|
||||
|
||||
Standard_EXPORT virtual void Eval (const TCollection_AsciiString& akey) = 0;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Standard_Transient) theres;
|
||||
Standard_Boolean hasnext;
|
||||
Handle(StepData_FileRecognizer) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FileRecognizer_HeaderFile
|
44
src/StepData/StepData_FileRecognizer_0.cxx
Normal file
44
src/StepData/StepData_FileRecognizer_0.cxx
Normal file
@@ -0,0 +1,44 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 <StepData_FileRecognizer.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <StepData_FileRecognizer.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheKey TCollection_AsciiString
|
||||
#define TheKey_hxx <TCollection_AsciiString.hxx>
|
||||
#define Handle_TheResul Handle(Standard_Transient)
|
||||
#define TheResul Standard_Transient
|
||||
#define TheResul_hxx <Standard_Transient.hxx>
|
||||
#define Interface_Recognizer StepData_FileRecognizer
|
||||
#define Interface_Recognizer_hxx <StepData_FileRecognizer.hxx>
|
||||
#define Handle_Interface_Recognizer Handle(StepData_FileRecognizer)
|
||||
#include <Interface_Recognizer.gxx>
|
||||
|
@@ -1,91 +0,0 @@
|
||||
-- Created on: 1997-01-03
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 FreeFormEntity from StepData inherits TShared
|
||||
|
||||
---Purpose : A Free Form Entity allows to record any kind of STEP
|
||||
-- parameters, in any way of typing
|
||||
-- It is implemented with an array of fields
|
||||
-- A Complex entity can be defined, as a chain of FreeFormEntity
|
||||
-- (see Next and As)
|
||||
|
||||
uses CString, AsciiString from TCollection,
|
||||
HSequenceOfAsciiString from TColStd,
|
||||
Field from StepData, HArray1OfField from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns FreeFormEntity;
|
||||
---Purpose : Creates a FreeFormEntity, with no field, no type
|
||||
|
||||
SetStepType (me : mutable; typenam : CString);
|
||||
---Purpose : Sets the type of an entity
|
||||
-- For a complex one, the type of this member
|
||||
|
||||
StepType (me) returns CString;
|
||||
---Purpose : Returns the recorded StepType
|
||||
-- For a complex one, the type of this member
|
||||
|
||||
SetNext (me : mutable; next : FreeFormEntity; last : Boolean = Standard_True);
|
||||
---Purpose : Sets a next member, in order to define or complete a Complex
|
||||
-- entity
|
||||
-- If <last> is True (D), this next will be set as last of list
|
||||
-- Else, it is inserted just as next of <me>
|
||||
-- If <next> is Null, Next is cleared
|
||||
|
||||
Next (me) returns FreeFormEntity;
|
||||
---Purpose : Returns the next member of a Complex entity
|
||||
-- (remark : the last member has none)
|
||||
|
||||
IsComplex (me) returns Boolean;
|
||||
---Purpose : Returns True if a FreeFormEntity is Complex (i.e. has Next)
|
||||
|
||||
Typed (me; typenam : CString) returns FreeFormEntity;
|
||||
---Purpose : Returns the member of a FreeFormEntity of which the type name
|
||||
-- is given (exact match, no sub-type)
|
||||
|
||||
TypeList (me) returns HSequenceOfAsciiString;
|
||||
---Purpose : Returns the list of types (one type for a simple entity),
|
||||
-- as is (non reordered)
|
||||
|
||||
Reorder (myclass; ent : in out FreeFormEntity) returns Boolean;
|
||||
---Purpose : Reorders a Complex entity if required, i.e. if member types
|
||||
-- are not in alphabetic order
|
||||
-- Returns False if nothing done (order was OK or simple entity),
|
||||
-- True plus modified <ent> if <ent> has been reordered
|
||||
|
||||
|
||||
SetNbFields (me : mutable; nb : Integer);
|
||||
---Purpose : Sets a count of Fields, from scratch
|
||||
|
||||
NbFields (me) returns Integer;
|
||||
---Purpose : Returns the count of fields
|
||||
|
||||
Field (me; num : Integer) returns Field;
|
||||
---Purpose : Returns a field from its rank, for read-only use
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : mutable; num : Integer) returns Field;
|
||||
---Purpose : Returns a field from its rank, in order to modify it
|
||||
---C++ : return &
|
||||
|
||||
fields
|
||||
|
||||
thetype : AsciiString from TCollection;
|
||||
thefields : HArray1OfField;
|
||||
thenext : FreeFormEntity;
|
||||
|
||||
end FreeFormEntity;
|
@@ -11,12 +11,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_FreeFormEntity.ixx>
|
||||
|
||||
#include <Dico_DictionaryOfTransient.hxx>
|
||||
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FreeFormEntity.hxx>
|
||||
|
||||
void StepData_FreeFormEntity::SetStepType (const Standard_CString typenam)
|
||||
{ thetype.Clear(); thetype.AssignCat (typenam); }
|
||||
|
124
src/StepData/StepData_FreeFormEntity.hxx
Normal file
124
src/StepData/StepData_FreeFormEntity.hxx
Normal file
@@ -0,0 +1,124 @@
|
||||
// Created on: 1997-01-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_FreeFormEntity_HeaderFile
|
||||
#define _StepData_FreeFormEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <StepData_HArray1OfField.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class StepData_Field;
|
||||
|
||||
|
||||
class StepData_FreeFormEntity;
|
||||
DEFINE_STANDARD_HANDLE(StepData_FreeFormEntity, MMgt_TShared)
|
||||
|
||||
//! A Free Form Entity allows to record any kind of STEP
|
||||
//! parameters, in any way of typing
|
||||
//! It is implemented with an array of fields
|
||||
//! A Complex entity can be defined, as a chain of FreeFormEntity
|
||||
//! (see Next and As)
|
||||
class StepData_FreeFormEntity : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a FreeFormEntity, with no field, no type
|
||||
Standard_EXPORT StepData_FreeFormEntity();
|
||||
|
||||
//! Sets the type of an entity
|
||||
//! For a complex one, the type of this member
|
||||
Standard_EXPORT void SetStepType (const Standard_CString typenam);
|
||||
|
||||
//! Returns the recorded StepType
|
||||
//! For a complex one, the type of this member
|
||||
Standard_EXPORT Standard_CString StepType() const;
|
||||
|
||||
//! Sets a next member, in order to define or complete a Complex
|
||||
//! entity
|
||||
//! If <last> is True (D), this next will be set as last of list
|
||||
//! Else, it is inserted just as next of <me>
|
||||
//! If <next> is Null, Next is cleared
|
||||
Standard_EXPORT void SetNext (const Handle(StepData_FreeFormEntity)& next, const Standard_Boolean last = Standard_True);
|
||||
|
||||
//! Returns the next member of a Complex entity
|
||||
//! (remark : the last member has none)
|
||||
Standard_EXPORT Handle(StepData_FreeFormEntity) Next() const;
|
||||
|
||||
//! Returns True if a FreeFormEntity is Complex (i.e. has Next)
|
||||
Standard_EXPORT Standard_Boolean IsComplex() const;
|
||||
|
||||
//! Returns the member of a FreeFormEntity of which the type name
|
||||
//! is given (exact match, no sub-type)
|
||||
Standard_EXPORT Handle(StepData_FreeFormEntity) Typed (const Standard_CString typenam) const;
|
||||
|
||||
//! Returns the list of types (one type for a simple entity),
|
||||
//! as is (non reordered)
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) TypeList() const;
|
||||
|
||||
//! Reorders a Complex entity if required, i.e. if member types
|
||||
//! are not in alphabetic order
|
||||
//! Returns False if nothing done (order was OK or simple entity),
|
||||
//! True plus modified <ent> if <ent> has been reordered
|
||||
Standard_EXPORT static Standard_Boolean Reorder (Handle(StepData_FreeFormEntity)& ent);
|
||||
|
||||
//! Sets a count of Fields, from scratch
|
||||
Standard_EXPORT void SetNbFields (const Standard_Integer nb);
|
||||
|
||||
//! Returns the count of fields
|
||||
Standard_EXPORT Standard_Integer NbFields() const;
|
||||
|
||||
//! Returns a field from its rank, for read-only use
|
||||
Standard_EXPORT const StepData_Field& Field (const Standard_Integer num) const;
|
||||
|
||||
//! Returns a field from its rank, in order to modify it
|
||||
Standard_EXPORT StepData_Field& CField (const Standard_Integer num);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_FreeFormEntity,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TCollection_AsciiString thetype;
|
||||
Handle(StepData_HArray1OfField) thefields;
|
||||
Handle(StepData_FreeFormEntity) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_FreeFormEntity_HeaderFile
|
@@ -1,53 +0,0 @@
|
||||
-- Created on: 1993-02-02
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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.
|
||||
|
||||
deferred class GeneralModule from StepData
|
||||
inherits GeneralModule from Interface
|
||||
|
||||
---Purpose : Specific features for General Services adapted to STEP
|
||||
|
||||
uses Transient ,
|
||||
EntityIterator , CopyTool, Check, ShareTool
|
||||
|
||||
is
|
||||
|
||||
-- Reconduction because limitation cdl --
|
||||
|
||||
FillSharedCase (me; casenum : Integer; ent : Transient;
|
||||
iter : in out EntityIterator) is deferred;
|
||||
---Purpose : Specific filling of the list of Entities shared by an Entity
|
||||
-- <ent>. Can use the internal utility method Share, below
|
||||
|
||||
CheckCase (me; casenum : Integer; ent : Transient; shares : ShareTool;
|
||||
ach : in out Check) is deferred;
|
||||
---Purpose : Specific Checking of an Entity <ent>
|
||||
|
||||
CopyCase (me; casenum : Integer;
|
||||
entfrom : Transient; entto : Transient;
|
||||
TC : in out CopyTool) is deferred;
|
||||
---Purpose : Specific Copy ("Deep") from <entfrom> to <entto> (same type)
|
||||
-- by using a TransferControl which provides its working Map.
|
||||
-- Use method Transferred from TransferControl to work
|
||||
|
||||
-- ImpliedCase (me; casenum : Integer;
|
||||
-- entfrom : Transient; entto : Transient;
|
||||
-- TC : CopyTool);
|
||||
---Purpose : Specific Copying of Implied References
|
||||
-- A Default is provided which does nothing (must current case !)
|
||||
-- Already copied references (by CopyFrom) must remain unchanged
|
||||
-- Use method Search from TransferControl to work
|
||||
|
||||
end GeneralModule;
|
@@ -11,4 +11,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_GeneralModule.ixx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CopyTool.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_GeneralModule.hxx>
|
||||
|
81
src/StepData/StepData_GeneralModule.hxx
Normal file
81
src/StepData/StepData_GeneralModule.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1993-02-02
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_GeneralModule_HeaderFile
|
||||
#define _StepData_GeneralModule_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_GeneralModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
class Interface_ShareTool;
|
||||
class Interface_Check;
|
||||
class Interface_CopyTool;
|
||||
|
||||
|
||||
class StepData_GeneralModule;
|
||||
DEFINE_STANDARD_HANDLE(StepData_GeneralModule, Interface_GeneralModule)
|
||||
|
||||
//! Specific features for General Services adapted to STEP
|
||||
class StepData_GeneralModule : public Interface_GeneralModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Specific filling of the list of Entities shared by an Entity
|
||||
//! <ent>. Can use the internal utility method Share, below
|
||||
Standard_EXPORT virtual void FillSharedCase (const Standard_Integer casenum, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const = 0;
|
||||
|
||||
//! Specific Checking of an Entity <ent>
|
||||
Standard_EXPORT virtual void CheckCase (const Standard_Integer casenum, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const = 0;
|
||||
|
||||
//! Specific Copy ("Deep") from <entfrom> to <entto> (same type)
|
||||
//! by using a TransferControl which provides its working Map.
|
||||
//! Use method Transferred from TransferControl to work
|
||||
//! Specific Copying of Implied References
|
||||
//! A Default is provided which does nothing (must current case !)
|
||||
//! Already copied references (by CopyFrom) must remain unchanged
|
||||
//! Use method Search from TransferControl to work
|
||||
Standard_EXPORT virtual void CopyCase (const Standard_Integer casenum, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_GeneralModule,Interface_GeneralModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_GeneralModule_HeaderFile
|
77
src/StepData/StepData_GlobalNodeOfWriterLib.hxx
Normal file
77
src/StepData/StepData_GlobalNodeOfWriterLib.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _StepData_GlobalNodeOfWriterLib_HeaderFile
|
||||
#define _StepData_GlobalNodeOfWriterLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
class StepData_ReadWriteModule;
|
||||
class StepData_Protocol;
|
||||
class Standard_Transient;
|
||||
class StepData_WriterLib;
|
||||
class StepData_NodeOfWriterLib;
|
||||
|
||||
|
||||
class StepData_GlobalNodeOfWriterLib;
|
||||
DEFINE_STANDARD_HANDLE(StepData_GlobalNodeOfWriterLib, Standard_Transient)
|
||||
|
||||
|
||||
class StepData_GlobalNodeOfWriterLib : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_GlobalNodeOfWriterLib();
|
||||
|
||||
Standard_EXPORT void Add (const Handle(StepData_ReadWriteModule)& amodule, const Handle(StepData_Protocol)& aprotocol);
|
||||
|
||||
Standard_EXPORT const Handle(StepData_ReadWriteModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(StepData_Protocol)& Protocol() const;
|
||||
|
||||
Standard_EXPORT const Handle(StepData_GlobalNodeOfWriterLib)& Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_GlobalNodeOfWriterLib,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(StepData_ReadWriteModule) themod;
|
||||
Handle(StepData_Protocol) theprot;
|
||||
Handle(StepData_GlobalNodeOfWriterLib) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_GlobalNodeOfWriterLib_HeaderFile
|
54
src/StepData/StepData_GlobalNodeOfWriterLib_0.cxx
Normal file
54
src/StepData/StepData_GlobalNodeOfWriterLib_0.cxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 <StepData_GlobalNodeOfWriterLib.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_ReadWriteModule.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_GlobalNodeOfWriterLib.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <StepData_WriterLib.hxx>
|
||||
#include <StepData_NodeOfWriterLib.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheObject Handle(Standard_Transient)
|
||||
#define TheObject_hxx <Standard_Transient.hxx>
|
||||
#define Handle_TheModule Handle(StepData_ReadWriteModule)
|
||||
#define TheModule StepData_ReadWriteModule
|
||||
#define TheModule_hxx <StepData_ReadWriteModule.hxx>
|
||||
#define Handle_TheProtocol Handle(StepData_Protocol)
|
||||
#define TheProtocol StepData_Protocol
|
||||
#define TheProtocol_hxx <StepData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode StepData_GlobalNodeOfWriterLib
|
||||
#define LibCtl_GlobalNode_hxx <StepData_GlobalNodeOfWriterLib.hxx>
|
||||
#define LibCtl_Node StepData_NodeOfWriterLib
|
||||
#define LibCtl_Node_hxx <StepData_NodeOfWriterLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(StepData_GlobalNodeOfWriterLib)
|
||||
#define Handle_LibCtl_Node Handle(StepData_NodeOfWriterLib)
|
||||
#define LibCtl_Library StepData_WriterLib
|
||||
#define LibCtl_Library_hxx <StepData_WriterLib.hxx>
|
||||
#include <LibCtl_GlobalNode.gxx>
|
||||
|
@@ -1,88 +0,0 @@
|
||||
-- Created on: 1993-07-23
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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 HeaderTool from StepData
|
||||
|
||||
---Purpose : HeaderTool exploits data from Header to build a Protocol :
|
||||
-- it uses the Header Entity FileSchema to do this.
|
||||
-- It builds a Protocol from the Global List of Protocols
|
||||
-- stored in the Library ReaderLib
|
||||
|
||||
uses OStream, AsciiString from TCollection, SequenceOfAsciiString from TColStd,
|
||||
StepReaderData, Protocol from StepData, FileProtocol
|
||||
|
||||
is
|
||||
|
||||
Create (data : StepReaderData) returns HeaderTool;
|
||||
---Purpose : Creates a HeaderTool from data read from a File. Computes the
|
||||
-- list of Schema Names. The Protocol will be computed later
|
||||
-- (because there are several options)
|
||||
|
||||
Create (names : SequenceOfAsciiString from TColStd) returns HeaderTool;
|
||||
---Purpose : Creates a HeaderTool directly from a list of Schema Names
|
||||
|
||||
NbSchemaNames (me) returns Integer;
|
||||
---Purpose : Returns the count of SchemaNames
|
||||
|
||||
SchemaName (me; num : Integer) returns AsciiString from TCollection;
|
||||
---Purpose : Returns a SchemaName, given its rank
|
||||
---C++ : return const &
|
||||
|
||||
NamedProtocol (me; name : AsciiString from TCollection)
|
||||
returns Protocol from StepData;
|
||||
---Purpose : Returns the Protocol which corresponds to a Schema Name
|
||||
-- Returns a Null Handle if this Schema Name is attached to no
|
||||
-- Protocol recorded in the Global List of ReaderLib
|
||||
|
||||
-- Building a Protocol --
|
||||
|
||||
Build (me : in out; protocol : FileProtocol);
|
||||
---Purpose : Fills a FileProtocol with the list of Protocols attached to
|
||||
-- the list of Schema Names. It can remain empty ...
|
||||
|
||||
Protocol (me : in out) returns Protocol from StepData;
|
||||
---Purpose : Returns a Protocol computed from the list of Schema Names :
|
||||
-- - a Null Handle if no SchemaName has been recognized (or list
|
||||
-- empty)
|
||||
-- - a single Protocol if only one SchemaName has been recognized
|
||||
-- - a FileProtocol with its componants if several SchemaNames
|
||||
-- have been recognized
|
||||
---See also : method Ignored, to see if some SchemaNames were not
|
||||
-- recognized, then they remain Ignored
|
||||
|
||||
IsDone (me) returns Boolean;
|
||||
---Purpose : Returns True if either Build or Protocol has been called
|
||||
-- If it is False, Ignored and NbIgnored should not be called
|
||||
|
||||
NbIgnoreds (me) returns Integer;
|
||||
---Purpose : Returns the count of ignored SchemaNames (0 if all were OK)
|
||||
|
||||
Ignored (me; num : Integer) returns AsciiString from TCollection;
|
||||
---Purpose : Returns an ignored SchemaName, given its rank in the list of
|
||||
-- Ignored SchemaNames (not in the total list)
|
||||
---C++ : return const &
|
||||
|
||||
Print (me; S : in out OStream);
|
||||
---Purpose : Sends the state of the HeaderTool in a comprehensive way,
|
||||
-- to an output stream
|
||||
|
||||
fields
|
||||
|
||||
thenames : SequenceOfAsciiString from TColStd;
|
||||
thedone : Boolean;
|
||||
theignored : SequenceOfAsciiString from TColStd;
|
||||
|
||||
end HeaderTool;
|
@@ -11,20 +11,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_HeaderTool.ixx>
|
||||
#include <Interface_ReaderLib.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Interface_ReaderLib.hxx>
|
||||
#include <StepData_FileProtocol.hxx>
|
||||
#include <StepData_HeaderTool.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
// HeaderTool prend en charge le Schema de Donnees utilise pour un Fichier
|
||||
// Ce Schema peut etre compose de un ou plusieurs Protocoles, chacun etant
|
||||
// designe par une String. Les Strings correspondent au type "SCHEMA_NAME"
|
||||
// (typedef) et le Schema est une entite de Header de type "FILE_SCHEMA",
|
||||
// il a cette forme dans le fichier :
|
||||
|
||||
|
||||
|
||||
static Interface_ReaderLib lib;
|
||||
|
||||
|
||||
|
117
src/StepData/StepData_HeaderTool.hxx
Normal file
117
src/StepData/StepData_HeaderTool.hxx
Normal file
@@ -0,0 +1,117 @@
|
||||
// Created on: 1993-07-23
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_HeaderTool_HeaderFile
|
||||
#define _StepData_HeaderTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class TCollection_AsciiString;
|
||||
class StepData_Protocol;
|
||||
class StepData_FileProtocol;
|
||||
|
||||
|
||||
//! HeaderTool exploits data from Header to build a Protocol :
|
||||
//! it uses the Header Entity FileSchema to do this.
|
||||
//! It builds a Protocol from the Global List of Protocols
|
||||
//! stored in the Library ReaderLib
|
||||
class StepData_HeaderTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a HeaderTool from data read from a File. Computes the
|
||||
//! list of Schema Names. The Protocol will be computed later
|
||||
//! (because there are several options)
|
||||
Standard_EXPORT StepData_HeaderTool(const Handle(StepData_StepReaderData)& data);
|
||||
|
||||
//! Creates a HeaderTool directly from a list of Schema Names
|
||||
Standard_EXPORT StepData_HeaderTool(const TColStd_SequenceOfAsciiString& names);
|
||||
|
||||
//! Returns the count of SchemaNames
|
||||
Standard_EXPORT Standard_Integer NbSchemaNames() const;
|
||||
|
||||
//! Returns a SchemaName, given its rank
|
||||
Standard_EXPORT const TCollection_AsciiString& SchemaName (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the Protocol which corresponds to a Schema Name
|
||||
//! Returns a Null Handle if this Schema Name is attached to no
|
||||
//! Protocol recorded in the Global List of ReaderLib
|
||||
Standard_EXPORT Handle(StepData_Protocol) NamedProtocol (const TCollection_AsciiString& name) const;
|
||||
|
||||
//! Fills a FileProtocol with the list of Protocols attached to
|
||||
//! the list of Schema Names. It can remain empty ...
|
||||
Standard_EXPORT void Build (const Handle(StepData_FileProtocol)& protocol);
|
||||
|
||||
//! Returns a Protocol computed from the list of Schema Names :
|
||||
//! - a Null Handle if no SchemaName has been recognized (or list
|
||||
//! empty)
|
||||
//! - a single Protocol if only one SchemaName has been recognized
|
||||
//! - a FileProtocol with its componants if several SchemaNames
|
||||
//! have been recognized
|
||||
Standard_EXPORT Handle(StepData_Protocol) Protocol();
|
||||
|
||||
//! Returns True if either Build or Protocol has been called
|
||||
//! If it is False, Ignored and NbIgnored should not be called
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
//! Returns the count of ignored SchemaNames (0 if all were OK)
|
||||
Standard_EXPORT Standard_Integer NbIgnoreds() const;
|
||||
|
||||
//! Returns an ignored SchemaName, given its rank in the list of
|
||||
//! Ignored SchemaNames (not in the total list)
|
||||
Standard_EXPORT const TCollection_AsciiString& Ignored (const Standard_Integer num) const;
|
||||
|
||||
//! Sends the state of the HeaderTool in a comprehensive way,
|
||||
//! to an output stream
|
||||
Standard_EXPORT void Print (Standard_OStream& S) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TColStd_SequenceOfAsciiString thenames;
|
||||
Standard_Boolean thedone;
|
||||
TColStd_SequenceOfAsciiString theignored;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_HeaderTool_HeaderFile
|
28
src/StepData/StepData_Logical.hxx
Normal file
28
src/StepData/StepData_Logical.hxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _StepData_Logical_HeaderFile
|
||||
#define _StepData_Logical_HeaderFile
|
||||
|
||||
//! A Standard Definition for STEP (which knows Boolean too)
|
||||
enum StepData_Logical
|
||||
{
|
||||
StepData_LFalse,
|
||||
StepData_LTrue,
|
||||
StepData_LUnknown
|
||||
};
|
||||
|
||||
#endif // _StepData_Logical_HeaderFile
|
76
src/StepData/StepData_NodeOfWriterLib.hxx
Normal file
76
src/StepData/StepData_NodeOfWriterLib.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _StepData_NodeOfWriterLib_HeaderFile
|
||||
#define _StepData_NodeOfWriterLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
class StepData_GlobalNodeOfWriterLib;
|
||||
class Standard_Transient;
|
||||
class StepData_ReadWriteModule;
|
||||
class StepData_Protocol;
|
||||
class StepData_WriterLib;
|
||||
|
||||
|
||||
class StepData_NodeOfWriterLib;
|
||||
DEFINE_STANDARD_HANDLE(StepData_NodeOfWriterLib, MMgt_TShared)
|
||||
|
||||
|
||||
class StepData_NodeOfWriterLib : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_NodeOfWriterLib();
|
||||
|
||||
Standard_EXPORT void AddNode (const Handle(StepData_GlobalNodeOfWriterLib)& anode);
|
||||
|
||||
Standard_EXPORT const Handle(StepData_ReadWriteModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(StepData_Protocol)& Protocol() const;
|
||||
|
||||
Standard_EXPORT const Handle(StepData_NodeOfWriterLib)& Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_NodeOfWriterLib,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(StepData_GlobalNodeOfWriterLib) thenode;
|
||||
Handle(StepData_NodeOfWriterLib) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_NodeOfWriterLib_HeaderFile
|
54
src/StepData/StepData_NodeOfWriterLib_0.cxx
Normal file
54
src/StepData/StepData_NodeOfWriterLib_0.cxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Created on: 1992-02-11
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 <StepData_NodeOfWriterLib.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_GlobalNodeOfWriterLib.hxx>
|
||||
#include <StepData_NodeOfWriterLib.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <StepData_ReadWriteModule.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_WriterLib.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheObject Handle(Standard_Transient)
|
||||
#define TheObject_hxx <Standard_Transient.hxx>
|
||||
#define Handle_TheModule Handle(StepData_ReadWriteModule)
|
||||
#define TheModule StepData_ReadWriteModule
|
||||
#define TheModule_hxx <StepData_ReadWriteModule.hxx>
|
||||
#define Handle_TheProtocol Handle(StepData_Protocol)
|
||||
#define TheProtocol StepData_Protocol
|
||||
#define TheProtocol_hxx <StepData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode StepData_GlobalNodeOfWriterLib
|
||||
#define LibCtl_GlobalNode_hxx <StepData_GlobalNodeOfWriterLib.hxx>
|
||||
#define LibCtl_Node StepData_NodeOfWriterLib
|
||||
#define LibCtl_Node_hxx <StepData_NodeOfWriterLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(StepData_GlobalNodeOfWriterLib)
|
||||
#define Handle_LibCtl_Node Handle(StepData_NodeOfWriterLib)
|
||||
#define LibCtl_Library StepData_WriterLib
|
||||
#define LibCtl_Library_hxx <StepData_WriterLib.hxx>
|
||||
#include <LibCtl_Node.gxx>
|
||||
|
@@ -1,218 +0,0 @@
|
||||
-- Created on: 1997-01-03
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 PDescr from StepData inherits TShared
|
||||
|
||||
---Purpose : This class is intended to describe the authorized form for a
|
||||
-- parameter, as a type or a value for a field
|
||||
--
|
||||
-- A PDescr firstly describes a type, which can be SELECT, i.e.
|
||||
-- have several members
|
||||
|
||||
uses CString, Type from Standard, AsciiString from TCollection,
|
||||
Check from Interface,
|
||||
EnumTool from StepData, Field from StepData, EDescr from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns PDescr;
|
||||
|
||||
SetName (me : mutable; name : CString);
|
||||
Name (me) returns CString;
|
||||
|
||||
-- basic settings
|
||||
|
||||
Kind (me) returns Integer is private;
|
||||
|
||||
SetSelect (me : mutable);
|
||||
---Purpose : Declares this PDescr to be a Select, hence to have members
|
||||
-- <me> itself can be the first member
|
||||
|
||||
AddMember (me : mutable; member : PDescr);
|
||||
---Purpose : Adds a member to a SELECT description
|
||||
|
||||
SetMemberName (me : mutable; memname : CString);
|
||||
---Purpose : Sets a name for SELECT member. To be used if a member is for
|
||||
-- an immediate type
|
||||
|
||||
SetInteger (me : mutable);
|
||||
---Purpose : Sets <me> for an Integer value
|
||||
|
||||
SetReal (me : mutable);
|
||||
---Purpose : Sets <me> for a Real value
|
||||
|
||||
SetString (me : mutable);
|
||||
---Purpose : Sets <me> for a String value
|
||||
|
||||
SetBoolean (me : mutable);
|
||||
---Purpose : Sets <me> for a Boolean value (false,true)
|
||||
|
||||
SetLogical (me : mutable);
|
||||
---Purpose : Sets <me> for a Logical value (false,true,unknown)
|
||||
|
||||
SetEnum (me : mutable);
|
||||
---Purpose : Sets <me> for an Enum value
|
||||
-- Then, call AddEnumDef ordered from the first one (value 0)
|
||||
|
||||
AddEnumDef (me : mutable; enumdef : CString);
|
||||
---Purpose : Adds an enum value as a string
|
||||
|
||||
SetType (me : mutable; atype : Type from Standard);
|
||||
---Purpose : Sets <me> for an Entity which must match a Type (early-bound)
|
||||
|
||||
SetDescr (me : mutable; dscnam : CString);
|
||||
---Purpose : Sets <me> for a Described Entity, whose Description must match
|
||||
-- the type name <dscnam>
|
||||
|
||||
AddArity (me : mutable; arity : Integer = 1);
|
||||
---Purpose : Adds an arity count to <me>, by default 1
|
||||
-- 1 : a simple field passes to a LIST/ARRAY etc
|
||||
-- or a LIST to a LIST OF LIST
|
||||
-- 2 : a simple field passes to a LIST OF LIST
|
||||
|
||||
SetArity (me : mutable; arity : Integer = 1);
|
||||
---Purpose : Directly sets the arity count
|
||||
-- 0 : simple field
|
||||
-- 1 : LIST or ARRAY etc
|
||||
-- 2 : LIST OF LIST
|
||||
|
||||
-- complements
|
||||
|
||||
SetFrom (me : mutable; other : PDescr);
|
||||
---Purpose : Sets <me> as <other> but duplicated
|
||||
-- Hence, some definition may be changed
|
||||
|
||||
SetOptional (me : mutable; opt : Boolean = Standard_True);
|
||||
---Purpose : Sets/Unsets <me> to accept undefined values
|
||||
|
||||
SetDerived (me : mutable; der : Boolean = Standard_True);
|
||||
---Purpose : Sets/Unsets <me> to be for a derived field
|
||||
|
||||
SetField (me : mutable; name : CString; rank : Integer);
|
||||
---Purpose : Sets <me> to describe a field of an entity
|
||||
-- With a name and a rank
|
||||
|
||||
-- querying
|
||||
|
||||
IsSelect (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for a SELECT
|
||||
|
||||
Member (me; name : CString) returns PDescr;
|
||||
---Purpose : For a SELECT, returns the member whose name matches <name>
|
||||
-- To this member, the following question can then be asked
|
||||
-- Null Handle if <name> not matched or <me> not a SELECT
|
||||
--
|
||||
-- Remark : not to be asked for an entity type
|
||||
-- Hence, following IsInteger .. Enum* only apply on <me> and
|
||||
-- require Member
|
||||
-- While IsType applies on <me> and all Select Members
|
||||
|
||||
IsInteger (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for an Integer
|
||||
|
||||
IsReal (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for a Real value
|
||||
|
||||
IsString (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for a String value
|
||||
|
||||
IsBoolean (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for a Boolean value (false,true)
|
||||
|
||||
IsLogical (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for a Logical value (false,true,unknown)
|
||||
|
||||
IsEnum (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for an Enum value
|
||||
-- Then, call AddEnumDef ordered from the first one (value 0)
|
||||
-- Managed by an EnumTool
|
||||
|
||||
EnumMax (me) returns Integer;
|
||||
---Purpose : Returns the maximum integer for a suitable value (count - 1)
|
||||
|
||||
EnumValue (me; name : CString) returns Integer;
|
||||
---Purpose : Returns the numeric value found for an enum text
|
||||
-- The text must be in capitals and limited by dots
|
||||
-- A non-suitable text gives a negative value to be returned
|
||||
|
||||
EnumText (me; val : Integer) returns CString;
|
||||
---Purpose : Returns the text which corresponds to a numeric value,
|
||||
-- between 0 and EnumMax. It is limited by dots
|
||||
|
||||
IsEntity (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is for an Entity, either Described or CDL Type
|
||||
|
||||
IsType (me; atype : Type from Standard) returns Boolean;
|
||||
---Purpose : Tells if <me> is for an entity of a given CDL type (early-bnd)
|
||||
-- (works for <me> + nexts if <me> is a Select)
|
||||
|
||||
Type (me) returns Type from Standard;
|
||||
---Purpose : Returns the type to match (IsKind), for a CDL Entity
|
||||
-- (else, null handle)
|
||||
|
||||
IsDescr (me; descr : EDescr from StepData) returns Boolean;
|
||||
---Purpose : Tells if <me> is for a Described entity of a given EDescr
|
||||
-- (does this EDescr match description name ?). For late-bnd
|
||||
-- (works for <me> + nexts if <me> is a Select)
|
||||
|
||||
DescrName (me) returns CString;
|
||||
---Purpose : Returns the description (type name) to match, for a Described
|
||||
-- (else, empty string)
|
||||
|
||||
Arity (me) returns Integer;
|
||||
---Purpose : Returns the arity of <me>
|
||||
|
||||
Simple (me) returns PDescr;
|
||||
---Purpose : For a LIST or LIST OF LIST, Returns the PDescr for the simpler
|
||||
-- PDescr. Else, returns <me>
|
||||
-- This allows to have different attributes for Optional for
|
||||
-- instance, on a field, and on the parameter of a LIST :
|
||||
-- [OPTIONAL] LIST OF [OPTIONAL] ...
|
||||
|
||||
IsOptional (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is Optional
|
||||
|
||||
IsDerived (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is Derived
|
||||
|
||||
IsField (me) returns Boolean;
|
||||
---Purpose : Tells if <me> is a Field. Else it is a Type
|
||||
|
||||
FieldName (me) returns CString;
|
||||
FieldRank (me) returns Integer;
|
||||
|
||||
Check (me; afild : Field; ach : in out Check) is virtual;
|
||||
---Purpose : Semantic Check of a Field : does it complies with the given
|
||||
-- description ?
|
||||
|
||||
fields
|
||||
|
||||
thename : AsciiString from TCollection;
|
||||
thesel : Integer; -- 0 no 1 entity 2 immediate 3 heterog. 4 unknown
|
||||
thesnam : AsciiString from TCollection;
|
||||
thenext : PDescr; -- list of members
|
||||
thekind : Integer; -- as Field
|
||||
theenum : EnumTool from StepData;
|
||||
thetype : Type from Standard;
|
||||
thednam : AsciiString from TCollection;
|
||||
thearit : Integer;
|
||||
thefrom : PDescr; -- for SetFrom
|
||||
theopt : Boolean;
|
||||
theder : Boolean;
|
||||
thefnam : AsciiString from TCollection;
|
||||
thefnum : Integer;
|
||||
|
||||
end PDescr;
|
@@ -11,7 +11,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_PDescr.ixx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_PDescr.hxx>
|
||||
|
||||
#define KindInteger 1
|
||||
#define KindBoolean 2
|
||||
|
252
src/StepData/StepData_PDescr.hxx
Normal file
252
src/StepData/StepData_PDescr.hxx
Normal file
@@ -0,0 +1,252 @@
|
||||
// Created on: 1997-01-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_PDescr_HeaderFile
|
||||
#define _StepData_PDescr_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <StepData_EnumTool.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class StepData_EDescr;
|
||||
class StepData_Field;
|
||||
class Interface_Check;
|
||||
|
||||
|
||||
class StepData_PDescr;
|
||||
DEFINE_STANDARD_HANDLE(StepData_PDescr, MMgt_TShared)
|
||||
|
||||
//! This class is intended to describe the authorized form for a
|
||||
//! parameter, as a type or a value for a field
|
||||
//!
|
||||
//! A PDescr firstly describes a type, which can be SELECT, i.e.
|
||||
//! have several members
|
||||
class StepData_PDescr : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_PDescr();
|
||||
|
||||
Standard_EXPORT void SetName (const Standard_CString name);
|
||||
|
||||
Standard_EXPORT Standard_CString Name() const;
|
||||
|
||||
//! Declares this PDescr to be a Select, hence to have members
|
||||
//! <me> itself can be the first member
|
||||
Standard_EXPORT void SetSelect();
|
||||
|
||||
//! Adds a member to a SELECT description
|
||||
Standard_EXPORT void AddMember (const Handle(StepData_PDescr)& member);
|
||||
|
||||
//! Sets a name for SELECT member. To be used if a member is for
|
||||
//! an immediate type
|
||||
Standard_EXPORT void SetMemberName (const Standard_CString memname);
|
||||
|
||||
//! Sets <me> for an Integer value
|
||||
Standard_EXPORT void SetInteger();
|
||||
|
||||
//! Sets <me> for a Real value
|
||||
Standard_EXPORT void SetReal();
|
||||
|
||||
//! Sets <me> for a String value
|
||||
Standard_EXPORT void SetString();
|
||||
|
||||
//! Sets <me> for a Boolean value (false,true)
|
||||
Standard_EXPORT void SetBoolean();
|
||||
|
||||
//! Sets <me> for a Logical value (false,true,unknown)
|
||||
Standard_EXPORT void SetLogical();
|
||||
|
||||
//! Sets <me> for an Enum value
|
||||
//! Then, call AddEnumDef ordered from the first one (value 0)
|
||||
Standard_EXPORT void SetEnum();
|
||||
|
||||
//! Adds an enum value as a string
|
||||
Standard_EXPORT void AddEnumDef (const Standard_CString enumdef);
|
||||
|
||||
//! Sets <me> for an Entity which must match a Type (early-bound)
|
||||
Standard_EXPORT void SetType (const Handle(Standard_Type)& atype);
|
||||
|
||||
//! Sets <me> for a Described Entity, whose Description must match
|
||||
//! the type name <dscnam>
|
||||
Standard_EXPORT void SetDescr (const Standard_CString dscnam);
|
||||
|
||||
//! Adds an arity count to <me>, by default 1
|
||||
//! 1 : a simple field passes to a LIST/ARRAY etc
|
||||
//! or a LIST to a LIST OF LIST
|
||||
//! 2 : a simple field passes to a LIST OF LIST
|
||||
Standard_EXPORT void AddArity (const Standard_Integer arity = 1);
|
||||
|
||||
//! Directly sets the arity count
|
||||
//! 0 : simple field
|
||||
//! 1 : LIST or ARRAY etc
|
||||
//! 2 : LIST OF LIST
|
||||
Standard_EXPORT void SetArity (const Standard_Integer arity = 1);
|
||||
|
||||
//! Sets <me> as <other> but duplicated
|
||||
//! Hence, some definition may be changed
|
||||
Standard_EXPORT void SetFrom (const Handle(StepData_PDescr)& other);
|
||||
|
||||
//! Sets/Unsets <me> to accept undefined values
|
||||
Standard_EXPORT void SetOptional (const Standard_Boolean opt = Standard_True);
|
||||
|
||||
//! Sets/Unsets <me> to be for a derived field
|
||||
Standard_EXPORT void SetDerived (const Standard_Boolean der = Standard_True);
|
||||
|
||||
//! Sets <me> to describe a field of an entity
|
||||
//! With a name and a rank
|
||||
Standard_EXPORT void SetField (const Standard_CString name, const Standard_Integer rank);
|
||||
|
||||
//! Tells if <me> is for a SELECT
|
||||
Standard_EXPORT Standard_Boolean IsSelect() const;
|
||||
|
||||
//! For a SELECT, returns the member whose name matches <name>
|
||||
//! To this member, the following question can then be asked
|
||||
//! Null Handle if <name> not matched or <me> not a SELECT
|
||||
//!
|
||||
//! Remark : not to be asked for an entity type
|
||||
//! Hence, following IsInteger .. Enum* only apply on <me> and
|
||||
//! require Member
|
||||
//! While IsType applies on <me> and all Select Members
|
||||
Standard_EXPORT Handle(StepData_PDescr) Member (const Standard_CString name) const;
|
||||
|
||||
//! Tells if <me> is for an Integer
|
||||
Standard_EXPORT Standard_Boolean IsInteger() const;
|
||||
|
||||
//! Tells if <me> is for a Real value
|
||||
Standard_EXPORT Standard_Boolean IsReal() const;
|
||||
|
||||
//! Tells if <me> is for a String value
|
||||
Standard_EXPORT Standard_Boolean IsString() const;
|
||||
|
||||
//! Tells if <me> is for a Boolean value (false,true)
|
||||
Standard_EXPORT Standard_Boolean IsBoolean() const;
|
||||
|
||||
//! Tells if <me> is for a Logical value (false,true,unknown)
|
||||
Standard_EXPORT Standard_Boolean IsLogical() const;
|
||||
|
||||
//! Tells if <me> is for an Enum value
|
||||
//! Then, call AddEnumDef ordered from the first one (value 0)
|
||||
//! Managed by an EnumTool
|
||||
Standard_EXPORT Standard_Boolean IsEnum() const;
|
||||
|
||||
//! Returns the maximum integer for a suitable value (count - 1)
|
||||
Standard_EXPORT Standard_Integer EnumMax() const;
|
||||
|
||||
//! Returns the numeric value found for an enum text
|
||||
//! The text must be in capitals and limited by dots
|
||||
//! A non-suitable text gives a negative value to be returned
|
||||
Standard_EXPORT Standard_Integer EnumValue (const Standard_CString name) const;
|
||||
|
||||
//! Returns the text which corresponds to a numeric value,
|
||||
//! between 0 and EnumMax. It is limited by dots
|
||||
Standard_EXPORT Standard_CString EnumText (const Standard_Integer val) const;
|
||||
|
||||
//! Tells if <me> is for an Entity, either Described or CDL Type
|
||||
Standard_EXPORT Standard_Boolean IsEntity() const;
|
||||
|
||||
//! Tells if <me> is for an entity of a given CDL type (early-bnd)
|
||||
//! (works for <me> + nexts if <me> is a Select)
|
||||
Standard_EXPORT Standard_Boolean IsType (const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! Returns the type to match (IsKind), for a CDL Entity
|
||||
//! (else, null handle)
|
||||
Standard_EXPORT Handle(Standard_Type) Type() const;
|
||||
|
||||
//! Tells if <me> is for a Described entity of a given EDescr
|
||||
//! (does this EDescr match description name ?). For late-bnd
|
||||
//! (works for <me> + nexts if <me> is a Select)
|
||||
Standard_EXPORT Standard_Boolean IsDescr (const Handle(StepData_EDescr)& descr) const;
|
||||
|
||||
//! Returns the description (type name) to match, for a Described
|
||||
//! (else, empty string)
|
||||
Standard_EXPORT Standard_CString DescrName() const;
|
||||
|
||||
//! Returns the arity of <me>
|
||||
Standard_EXPORT Standard_Integer Arity() const;
|
||||
|
||||
//! For a LIST or LIST OF LIST, Returns the PDescr for the simpler
|
||||
//! PDescr. Else, returns <me>
|
||||
//! This allows to have different attributes for Optional for
|
||||
//! instance, on a field, and on the parameter of a LIST :
|
||||
//! [OPTIONAL] LIST OF [OPTIONAL] ...
|
||||
Standard_EXPORT Handle(StepData_PDescr) Simple() const;
|
||||
|
||||
//! Tells if <me> is Optional
|
||||
Standard_EXPORT Standard_Boolean IsOptional() const;
|
||||
|
||||
//! Tells if <me> is Derived
|
||||
Standard_EXPORT Standard_Boolean IsDerived() const;
|
||||
|
||||
//! Tells if <me> is a Field. Else it is a Type
|
||||
Standard_EXPORT Standard_Boolean IsField() const;
|
||||
|
||||
Standard_EXPORT Standard_CString FieldName() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer FieldRank() const;
|
||||
|
||||
//! Semantic Check of a Field : does it complies with the given
|
||||
//! description ?
|
||||
Standard_EXPORT virtual void Check (const StepData_Field& afild, Handle(Interface_Check)& ach) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_PDescr,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer Kind() const;
|
||||
|
||||
TCollection_AsciiString thename;
|
||||
Standard_Integer thesel;
|
||||
TCollection_AsciiString thesnam;
|
||||
Handle(StepData_PDescr) thenext;
|
||||
Standard_Integer thekind;
|
||||
StepData_EnumTool theenum;
|
||||
Handle(Standard_Type) thetype;
|
||||
TCollection_AsciiString thednam;
|
||||
Standard_Integer thearit;
|
||||
Handle(StepData_PDescr) thefrom;
|
||||
Standard_Boolean theopt;
|
||||
Standard_Boolean theder;
|
||||
TCollection_AsciiString thefnam;
|
||||
Standard_Integer thefnum;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_PDescr_HeaderFile
|
@@ -1,97 +0,0 @@
|
||||
-- Created on: 1997-05-09
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 Plex from StepData inherits Described from StepData
|
||||
|
||||
---Purpose : A Plex (for Complex) Entity is defined as a list of Simple
|
||||
-- Members ("external mapping")
|
||||
-- The types of these members must be in alphabetic order
|
||||
|
||||
uses CString,
|
||||
SequenceOfTransient from TColStd,
|
||||
HSequenceOfAsciiString from TColStd,
|
||||
Check from Interface, EntityIterator from Interface,
|
||||
ECDescr from StepData, Simple from StepData, Field from StepData
|
||||
|
||||
raises InterfaceMismatch
|
||||
|
||||
is
|
||||
|
||||
Create (descr : ECDescr) returns Plex;
|
||||
---Purpose : Creates a Plex (empty). The complete creation is made by the
|
||||
-- ECDescr itself, by calling Add
|
||||
|
||||
Add (me : mutable; member : Simple);
|
||||
---Purpose : Adds a member to <me>
|
||||
|
||||
ECDescr (me) returns ECDescr;
|
||||
---Purpose : Returns the Description as for a Plex
|
||||
|
||||
-- inherited
|
||||
|
||||
IsComplex (me) returns Boolean;
|
||||
---Purpose : Returns False
|
||||
|
||||
|
||||
Matches (me; steptype : CString) returns Boolean;
|
||||
---Purpose : Tells if a step type is matched by <me>
|
||||
-- For a Simple Entity : own type or super type
|
||||
-- For a Complex Entity : one of the members
|
||||
|
||||
As (me; steptype : CString) returns Simple;
|
||||
---Purpose : Returns a Simple Entity which matches with a Type in <me> :
|
||||
-- For a Simple Entity : me if it matches, else a null handle
|
||||
-- For a Complex Entity : the member which matches, else null
|
||||
|
||||
HasField (me; name : CString) returns Boolean;
|
||||
---Purpose : Tells if a Field brings a given name
|
||||
|
||||
Field (me; name : CString) returns Field
|
||||
---Purpose : Returns a Field from its name; read-only
|
||||
raises InterfaceMismatch;
|
||||
-- raises if no Field for <name>
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : mutable; name : CString) returns Field
|
||||
---Purpose : Returns a Field from its name; read or write
|
||||
raises InterfaceMismatch;
|
||||
-- raises if no Field for <name>
|
||||
---C++ : return &
|
||||
|
||||
-- more specific
|
||||
|
||||
NbMembers (me) returns Integer;
|
||||
---Purpose : Returns the count of simple members
|
||||
|
||||
Member (me; num : Integer) returns Simple;
|
||||
---Purpose : Returns a simple member from its rank
|
||||
|
||||
TypeList (me) returns HSequenceOfAsciiString;
|
||||
---Purpose : Returns the actual list of members types
|
||||
|
||||
--
|
||||
|
||||
Check (me; ach : in out Check from Interface);
|
||||
---Purpose : Fills a Check by using its Description
|
||||
|
||||
Shared (me; list : in out EntityIterator from Interface);
|
||||
---Purpose : Fills an EntityIterator with entities shared by <me>
|
||||
|
||||
fields
|
||||
|
||||
themembers : SequenceOfTransient;
|
||||
|
||||
end Plex;
|
@@ -11,12 +11,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_Plex.ixx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Interface_InterfaceMismatch.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceMismatch.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_Plex.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
static StepData_Field bid;
|
||||
|
||||
|
120
src/StepData/StepData_Plex.hxx
Normal file
120
src/StepData/StepData_Plex.hxx
Normal file
@@ -0,0 +1,120 @@
|
||||
// Created on: 1997-05-09
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_Plex_HeaderFile
|
||||
#define _StepData_Plex_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_SequenceOfTransient.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
class Interface_InterfaceMismatch;
|
||||
class StepData_ECDescr;
|
||||
class StepData_Simple;
|
||||
class StepData_Field;
|
||||
class Interface_Check;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
class StepData_Plex;
|
||||
DEFINE_STANDARD_HANDLE(StepData_Plex, StepData_Described)
|
||||
|
||||
//! A Plex (for Complex) Entity is defined as a list of Simple
|
||||
//! Members ("external mapping")
|
||||
//! The types of these members must be in alphabetic order
|
||||
class StepData_Plex : public StepData_Described
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a Plex (empty). The complete creation is made by the
|
||||
//! ECDescr itself, by calling Add
|
||||
Standard_EXPORT StepData_Plex(const Handle(StepData_ECDescr)& descr);
|
||||
|
||||
//! Adds a member to <me>
|
||||
Standard_EXPORT void Add (const Handle(StepData_Simple)& member);
|
||||
|
||||
//! Returns the Description as for a Plex
|
||||
Standard_EXPORT Handle(StepData_ECDescr) ECDescr() const;
|
||||
|
||||
//! Returns False
|
||||
Standard_EXPORT Standard_Boolean IsComplex() const;
|
||||
|
||||
//! Tells if a step type is matched by <me>
|
||||
//! For a Simple Entity : own type or super type
|
||||
//! For a Complex Entity : one of the members
|
||||
Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const;
|
||||
|
||||
//! Returns a Simple Entity which matches with a Type in <me> :
|
||||
//! For a Simple Entity : me if it matches, else a null handle
|
||||
//! For a Complex Entity : the member which matches, else null
|
||||
Standard_EXPORT Handle(StepData_Simple) As (const Standard_CString steptype) const;
|
||||
|
||||
//! Tells if a Field brings a given name
|
||||
Standard_EXPORT Standard_Boolean HasField (const Standard_CString name) const;
|
||||
|
||||
//! Returns a Field from its name; read-only
|
||||
Standard_EXPORT const StepData_Field& Field (const Standard_CString name) const;
|
||||
|
||||
//! Returns a Field from its name; read or write
|
||||
Standard_EXPORT StepData_Field& CField (const Standard_CString name);
|
||||
|
||||
//! Returns the count of simple members
|
||||
Standard_EXPORT Standard_Integer NbMembers() const;
|
||||
|
||||
//! Returns a simple member from its rank
|
||||
Standard_EXPORT Handle(StepData_Simple) Member (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the actual list of members types
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) TypeList() const;
|
||||
|
||||
//! Fills a Check by using its Description
|
||||
Standard_EXPORT void Check (Handle(Interface_Check)& ach) const;
|
||||
|
||||
//! Fills an EntityIterator with entities shared by <me>
|
||||
Standard_EXPORT void Shared (Interface_EntityIterator& list) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_Plex,StepData_Described)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TColStd_SequenceOfTransient themembers;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_Plex_HeaderFile
|
@@ -1,137 +0,0 @@
|
||||
-- Created on: 1993-02-03
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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 Protocol from StepData inherits Protocol from Interface
|
||||
|
||||
---Purpose : Description of Basic Protocol for Step
|
||||
-- The class Protocol from StepData itself describes a default
|
||||
-- Protocol, which recognizes only UnknownEntities.
|
||||
-- Sub-classes will redefine CaseNumber and, if necessary,
|
||||
-- NbResources and Resources.
|
||||
|
||||
uses CString, Type,
|
||||
SequenceOfAsciiString from TColStd, DictionaryOfTransient from Dico,
|
||||
DataMapOfTransientInteger from Interface,
|
||||
InterfaceModel from Interface,
|
||||
EDescr from StepData, ESDescr from StepData, ECDescr from StepData,
|
||||
PDescr from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns Protocol from StepData;
|
||||
|
||||
NbResources (me) returns Integer;
|
||||
---Purpose : Gives the count of Protocols used as Resource (can be zero)
|
||||
-- Here, No resource
|
||||
|
||||
Resource (me; num : Integer) returns Protocol from Interface;
|
||||
---Purpose : Returns a Resource, given a rank. Here, none
|
||||
|
||||
CaseNumber (me; obj : any Transient) returns Integer is redefined;
|
||||
---Purpose : Returns a unique positive number for any recognized entity
|
||||
-- Redefined to work by calling both TypeNumber and, for a
|
||||
-- Described Entity (late binding) DescrNumber
|
||||
|
||||
TypeNumber (me; atype : any Type) returns Integer;
|
||||
---Purpose : Returns a Case Number, specific of each recognized Type
|
||||
-- Here, only Unknown Entity is recognized
|
||||
|
||||
-- -- Specific for StepData -- --
|
||||
|
||||
SchemaName (me) returns CString is virtual;
|
||||
---Purpose : Returns the Schema Name attached to each class of Protocol
|
||||
-- To be redefined by each sub-class
|
||||
-- Here, SchemaName returns "(DEFAULT)"
|
||||
-- was C++ : return const
|
||||
|
||||
-- -- General Services (defined at Norm level) -- --
|
||||
|
||||
NewModel (me) returns InterfaceModel;
|
||||
---Purpose : Creates an empty Model for Step Norm
|
||||
|
||||
IsSuitableModel (me; model : InterfaceModel) returns Boolean;
|
||||
---Purpose : Returns True if <model> is a Model of Step Norm
|
||||
|
||||
UnknownEntity (me) returns Transient;
|
||||
---Purpose : Creates a new Unknown Entity for Step (UndefinedEntity)
|
||||
|
||||
IsUnknownEntity (me; ent : Transient) returns Boolean;
|
||||
---Purpose : Returns True if <ent> is an Unknown Entity for the Norm, i.e.
|
||||
-- Type UndefinedEntity, status Unknown
|
||||
|
||||
-- -- About Descriptions (late binding)
|
||||
|
||||
DescrNumber (me; adescr : any EDescr) returns Integer is virtual;
|
||||
---Purpose : Returns a unique positive CaseNumber for types described by
|
||||
-- an EDescr (late binding)
|
||||
-- Warning : TypeNumber and DescrNumber must give together a unique
|
||||
-- positive case number for each distinct case, type or descr
|
||||
|
||||
AddDescr (me : mutable; adescr : EDescr; CN : Integer);
|
||||
---Purpose : Records an EDescr with its case number
|
||||
-- Also records its name for an ESDescr (simple type): an ESDescr
|
||||
-- is then used, for case number, or for type name
|
||||
|
||||
HasDescr (me) returns Boolean;
|
||||
---Purpose : Tells if a Protocol brings at least one ESDescr, i.e. if it
|
||||
-- defines at least one entity description by ESDescr mechanism
|
||||
|
||||
Descr (me; num : Integer) returns EDescr;
|
||||
---Purpose : Returns the description attached to a case number, or null
|
||||
|
||||
Descr (me; name : CString; anylevel : Boolean = Standard_True)
|
||||
returns EDescr;
|
||||
---Purpose : Returns a description according to its name
|
||||
-- <anylevel> True (D) : for <me> and its resources
|
||||
-- <anylevel> False : for <me> only
|
||||
|
||||
ESDescr (me; name : CString; anylevel : Boolean = Standard_True)
|
||||
returns ESDescr;
|
||||
---Purpose : Idem as Descr but cast to simple description
|
||||
|
||||
ECDescr (me; names : SequenceOfAsciiString from TColStd;
|
||||
anylevel : Boolean = Standard_True) returns ECDescr;
|
||||
---Purpose : Returns a complex description according to list of names
|
||||
-- <anylevel> True (D) : for <me> and its resources
|
||||
-- <anylevel> False : for <me> only
|
||||
|
||||
|
||||
AddPDescr (me : mutable; pdescr : PDescr);
|
||||
---Purpose : Records an PDescr
|
||||
|
||||
PDescr (me; name : CString; anylevel : Boolean = Standard_True)
|
||||
returns PDescr;
|
||||
---Purpose : Returns a parameter description according to its name
|
||||
-- <anylevel> True (D) : for <me> and its resources
|
||||
-- <anylevel> False : for <me> only
|
||||
|
||||
AddBasicDescr (me : mutable; esdescr : ESDescr);
|
||||
---Purpose : Records an ESDescr, intended to build complex descriptions
|
||||
|
||||
BasicDescr (me; name : CString; anylevel : Boolean = Standard_True)
|
||||
returns EDescr;
|
||||
---Purpose : Returns a basic description according to its name
|
||||
-- <anylevel> True (D) : for <me> and its resources
|
||||
-- <anylevel> False : for <me> only
|
||||
|
||||
fields
|
||||
|
||||
thedscnum : DataMapOfTransientInteger from Interface;
|
||||
thedscnam : DictionaryOfTransient from Dico;
|
||||
thepdescr : DictionaryOfTransient from Dico;
|
||||
thedscbas : DictionaryOfTransient from Dico;
|
||||
|
||||
end Protocol;
|
@@ -11,18 +11,24 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_Protocol.ixx>
|
||||
|
||||
#include <Dico_DictionaryOfTransient.hxx>
|
||||
#include <Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
#include <StepData_EDescr.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_PDescr.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_StepModel.hxx>
|
||||
#include <StepData_UndefinedEntity.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_ECDescr.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
// Le Protocol de base reconnait UnknownEntity
|
||||
|
||||
//static TCollection_AsciiString thename("(DEFAULT)");
|
||||
static Standard_CString thename = "(DEFAULT)";
|
||||
|
||||
|
165
src/StepData/StepData_Protocol.hxx
Normal file
165
src/StepData/StepData_Protocol.hxx
Normal file
@@ -0,0 +1,165 @@
|
||||
// Created on: 1993-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_Protocol_HeaderFile
|
||||
#define _StepData_Protocol_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_DataMapOfTransientInteger.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
class Dico_DictionaryOfTransient;
|
||||
class Interface_Protocol;
|
||||
class Standard_Transient;
|
||||
class Interface_InterfaceModel;
|
||||
class StepData_EDescr;
|
||||
class StepData_ESDescr;
|
||||
class StepData_ECDescr;
|
||||
class StepData_PDescr;
|
||||
|
||||
|
||||
class StepData_Protocol;
|
||||
DEFINE_STANDARD_HANDLE(StepData_Protocol, Interface_Protocol)
|
||||
|
||||
//! Description of Basic Protocol for Step
|
||||
//! The class Protocol from StepData itself describes a default
|
||||
//! Protocol, which recognizes only UnknownEntities.
|
||||
//! Sub-classes will redefine CaseNumber and, if necessary,
|
||||
//! NbResources and Resources.
|
||||
class StepData_Protocol : public Interface_Protocol
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_Protocol();
|
||||
|
||||
//! Gives the count of Protocols used as Resource (can be zero)
|
||||
//! Here, No resource
|
||||
Standard_EXPORT Standard_Integer NbResources() const;
|
||||
|
||||
//! Returns a Resource, given a rank. Here, none
|
||||
Standard_EXPORT Handle(Interface_Protocol) Resource (const Standard_Integer num) const;
|
||||
|
||||
//! Returns a unique positive number for any recognized entity
|
||||
//! Redefined to work by calling both TypeNumber and, for a
|
||||
//! Described Entity (late binding) DescrNumber
|
||||
Standard_EXPORT virtual Standard_Integer CaseNumber (const Handle(Standard_Transient)& obj) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a Case Number, specific of each recognized Type
|
||||
//! Here, only Unknown Entity is recognized
|
||||
Standard_EXPORT Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! Returns the Schema Name attached to each class of Protocol
|
||||
//! To be redefined by each sub-class
|
||||
//! Here, SchemaName returns "(DEFAULT)"
|
||||
//! was C++ : return const
|
||||
Standard_EXPORT virtual Standard_CString SchemaName() const;
|
||||
|
||||
//! Creates an empty Model for Step Norm
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const;
|
||||
|
||||
//! Returns True if <model> is a Model of Step Norm
|
||||
Standard_EXPORT Standard_Boolean IsSuitableModel (const Handle(Interface_InterfaceModel)& model) const;
|
||||
|
||||
//! Creates a new Unknown Entity for Step (UndefinedEntity)
|
||||
Standard_EXPORT Handle(Standard_Transient) UnknownEntity() const;
|
||||
|
||||
//! Returns True if <ent> is an Unknown Entity for the Norm, i.e.
|
||||
//! Type UndefinedEntity, status Unknown
|
||||
Standard_EXPORT Standard_Boolean IsUnknownEntity (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Returns a unique positive CaseNumber for types described by
|
||||
//! an EDescr (late binding)
|
||||
//! Warning : TypeNumber and DescrNumber must give together a unique
|
||||
//! positive case number for each distinct case, type or descr
|
||||
Standard_EXPORT virtual Standard_Integer DescrNumber (const Handle(StepData_EDescr)& adescr) const;
|
||||
|
||||
//! Records an EDescr with its case number
|
||||
//! Also records its name for an ESDescr (simple type): an ESDescr
|
||||
//! is then used, for case number, or for type name
|
||||
Standard_EXPORT void AddDescr (const Handle(StepData_EDescr)& adescr, const Standard_Integer CN);
|
||||
|
||||
//! Tells if a Protocol brings at least one ESDescr, i.e. if it
|
||||
//! defines at least one entity description by ESDescr mechanism
|
||||
Standard_EXPORT Standard_Boolean HasDescr() const;
|
||||
|
||||
//! Returns the description attached to a case number, or null
|
||||
Standard_EXPORT Handle(StepData_EDescr) Descr (const Standard_Integer num) const;
|
||||
|
||||
//! Returns a description according to its name
|
||||
//! <anylevel> True (D) : for <me> and its resources
|
||||
//! <anylevel> False : for <me> only
|
||||
Standard_EXPORT Handle(StepData_EDescr) Descr (const Standard_CString name, const Standard_Boolean anylevel = Standard_True) const;
|
||||
|
||||
//! Idem as Descr but cast to simple description
|
||||
Standard_EXPORT Handle(StepData_ESDescr) ESDescr (const Standard_CString name, const Standard_Boolean anylevel = Standard_True) const;
|
||||
|
||||
//! Returns a complex description according to list of names
|
||||
//! <anylevel> True (D) : for <me> and its resources
|
||||
//! <anylevel> False : for <me> only
|
||||
Standard_EXPORT Handle(StepData_ECDescr) ECDescr (const TColStd_SequenceOfAsciiString& names, const Standard_Boolean anylevel = Standard_True) const;
|
||||
|
||||
//! Records an PDescr
|
||||
Standard_EXPORT void AddPDescr (const Handle(StepData_PDescr)& pdescr);
|
||||
|
||||
//! Returns a parameter description according to its name
|
||||
//! <anylevel> True (D) : for <me> and its resources
|
||||
//! <anylevel> False : for <me> only
|
||||
Standard_EXPORT Handle(StepData_PDescr) PDescr (const Standard_CString name, const Standard_Boolean anylevel = Standard_True) const;
|
||||
|
||||
//! Records an ESDescr, intended to build complex descriptions
|
||||
Standard_EXPORT void AddBasicDescr (const Handle(StepData_ESDescr)& esdescr);
|
||||
|
||||
//! Returns a basic description according to its name
|
||||
//! <anylevel> True (D) : for <me> and its resources
|
||||
//! <anylevel> False : for <me> only
|
||||
Standard_EXPORT Handle(StepData_EDescr) BasicDescr (const Standard_CString name, const Standard_Boolean anylevel = Standard_True) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_Protocol,Interface_Protocol)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Interface_DataMapOfTransientInteger thedscnum;
|
||||
Handle(Dico_DictionaryOfTransient) thedscnam;
|
||||
Handle(Dico_DictionaryOfTransient) thepdescr;
|
||||
Handle(Dico_DictionaryOfTransient) thedscbas;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_Protocol_HeaderFile
|
@@ -1,107 +0,0 @@
|
||||
-- Created on: 1993-01-25
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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.
|
||||
|
||||
deferred class ReadWriteModule from StepData inherits
|
||||
ReaderModule from Interface
|
||||
|
||||
---Purpose : Defines basic File Access Module (Recognize, Read, Write)
|
||||
-- That is : ReaderModule (Recognize & Read) + Write for
|
||||
-- StepWriter (for a more centralized description)
|
||||
-- Warning : A sub-class of ReadWriteModule, which belongs to a particular
|
||||
-- Protocol, must use the same definition for Case Numbers (give
|
||||
-- the same Value for a StepType defined as a String from a File
|
||||
-- as the Protocol does for the corresponding Entity)
|
||||
|
||||
uses Transient, AsciiString from TCollection,
|
||||
SequenceOfAsciiString from TColStd,
|
||||
Check, FileReaderData, StepReaderData, StepWriter
|
||||
|
||||
raises DomainError
|
||||
|
||||
is
|
||||
|
||||
CaseNum (me; data : FileReaderData; num : Integer) returns Integer;
|
||||
---Purpose : Translate the Type of record <num> in <data> to a positive
|
||||
-- Case Number, or 0 if failed.
|
||||
-- Works with a StepReaderData, in which the Type of an Entity
|
||||
-- is defined as a String : Reads the RecordType <num> then calls
|
||||
-- CaseNum (this type)
|
||||
-- Warning : The methods CaseStep, StepType and Recognize,
|
||||
-- must be in phase (triplets CaseNum-StepType-Type of Object)
|
||||
|
||||
CaseStep (me; atype : AsciiString from TCollection) returns Integer
|
||||
is deferred;
|
||||
---Purpose : Defines Case Numbers corresponding to the recognized Types
|
||||
-- Called by CaseNum (data,num) above for a Simple Type Entity
|
||||
-- Warning : CaseStep must give the same Value as Protocol does for the
|
||||
-- Entity type which corresponds to this Type given as a String
|
||||
|
||||
CaseStep (me; types : SequenceOfAsciiString from TColStd) returns Integer
|
||||
is virtual;
|
||||
---Purpose : Same a above but for a Complex Type Entity ("Plex")
|
||||
-- The provided Default recognizes nothing
|
||||
|
||||
|
||||
IsComplex (me; CN : Integer) returns Boolean is virtual;
|
||||
---Purpose : Returns True if the Case Number corresponds to a Complex Type
|
||||
-- ("Plex"). Remember that all possible combinations must be
|
||||
-- aknowledged to be processed
|
||||
-- Default is False for all cases. For a Protocol which defines
|
||||
-- possible Plexes, this method must be redefined.
|
||||
|
||||
StepType (me; CN : Integer) returns AsciiString from TCollection
|
||||
is deferred;
|
||||
---Purpose : Function specific to STEP, which delivers the StepType as it
|
||||
-- is recorded in and read from a File compliant with STEP.
|
||||
-- This method is symmetric to the method CaseStep.
|
||||
-- StepType can be different from Dynamic Type's name, but
|
||||
-- belongs to the same class of Object.
|
||||
-- Returns an empty String if <CN> is zero.
|
||||
-- Warning : For a Complex Type Entity, returns an Empty String
|
||||
-- (Complex Type must be managed by users)
|
||||
---C++ : return const &
|
||||
|
||||
ShortType (me; CN : Integer) returns AsciiString from TCollection
|
||||
is virtual;
|
||||
---Purpose : Function specific to STEP. Some STEP Types have a short form
|
||||
-- This method can be redefined to fill it
|
||||
-- By default, returns an empty string, which is then interpreted
|
||||
-- to take normal form from StepType
|
||||
|
||||
ComplexType (me; CN : Integer;
|
||||
types : in out SequenceOfAsciiString from TColStd)
|
||||
returns Boolean is virtual;
|
||||
---Purpose : Function specific to STEP, which delivers the list of types
|
||||
-- which corresponds to a complex type. If <CN> is not for a
|
||||
-- complex type, this method returns False. Else it returns True
|
||||
-- and fills the list in alphabetic order.
|
||||
-- The default returns False. To be redefined as required.
|
||||
|
||||
Read (me; CN : Integer; data : FileReaderData; num : Integer;
|
||||
ach : in out Check; ent : Transient)
|
||||
raises DomainError;
|
||||
---Purpose : General Read Function, calls ReadStep
|
||||
|
||||
ReadStep (me; CN : Integer; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : Transient)
|
||||
raises DomainError is deferred;
|
||||
---Purpose : Specific Read Function. Works with StepReaderData
|
||||
|
||||
WriteStep (me; CN : Integer; SW : in out StepWriter; ent : Transient)
|
||||
is deferred;
|
||||
---Purpose : Write Function, switched by CaseNum
|
||||
|
||||
end ReadWriteModule;
|
@@ -11,11 +11,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_ReadWriteModule.ixx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_FileReaderData.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_ReadWriteModule.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
Standard_Integer StepData_ReadWriteModule::CaseNum
|
||||
(const Handle(Interface_FileReaderData)& data,
|
||||
|
133
src/StepData/StepData_ReadWriteModule.hxx
Normal file
133
src/StepData/StepData_ReadWriteModule.hxx
Normal file
@@ -0,0 +1,133 @@
|
||||
// Created on: 1993-01-25
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_ReadWriteModule_HeaderFile
|
||||
#define _StepData_ReadWriteModule_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_ReaderModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_DomainError;
|
||||
class Interface_FileReaderData;
|
||||
class TCollection_AsciiString;
|
||||
class Interface_Check;
|
||||
class Standard_Transient;
|
||||
class StepData_StepReaderData;
|
||||
class StepData_StepWriter;
|
||||
|
||||
|
||||
class StepData_ReadWriteModule;
|
||||
DEFINE_STANDARD_HANDLE(StepData_ReadWriteModule, Interface_ReaderModule)
|
||||
|
||||
//! Defines basic File Access Module (Recognize, Read, Write)
|
||||
//! That is : ReaderModule (Recognize & Read) + Write for
|
||||
//! StepWriter (for a more centralized description)
|
||||
//! Warning : A sub-class of ReadWriteModule, which belongs to a particular
|
||||
//! Protocol, must use the same definition for Case Numbers (give
|
||||
//! the same Value for a StepType defined as a String from a File
|
||||
//! as the Protocol does for the corresponding Entity)
|
||||
class StepData_ReadWriteModule : public Interface_ReaderModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Translate the Type of record <num> in <data> to a positive
|
||||
//! Case Number, or 0 if failed.
|
||||
//! Works with a StepReaderData, in which the Type of an Entity
|
||||
//! is defined as a String : Reads the RecordType <num> then calls
|
||||
//! CaseNum (this type)
|
||||
//! Warning : The methods CaseStep, StepType and Recognize,
|
||||
//! must be in phase (triplets CaseNum-StepType-Type of Object)
|
||||
Standard_EXPORT Standard_Integer CaseNum (const Handle(Interface_FileReaderData)& data, const Standard_Integer num) const;
|
||||
|
||||
//! Defines Case Numbers corresponding to the recognized Types
|
||||
//! Called by CaseNum (data,num) above for a Simple Type Entity
|
||||
//! Warning : CaseStep must give the same Value as Protocol does for the
|
||||
//! Entity type which corresponds to this Type given as a String
|
||||
Standard_EXPORT virtual Standard_Integer CaseStep (const TCollection_AsciiString& atype) const = 0;
|
||||
|
||||
//! Same a above but for a Complex Type Entity ("Plex")
|
||||
//! The provided Default recognizes nothing
|
||||
Standard_EXPORT virtual Standard_Integer CaseStep (const TColStd_SequenceOfAsciiString& types) const;
|
||||
|
||||
//! Returns True if the Case Number corresponds to a Complex Type
|
||||
//! ("Plex"). Remember that all possible combinations must be
|
||||
//! aknowledged to be processed
|
||||
//! Default is False for all cases. For a Protocol which defines
|
||||
//! possible Plexes, this method must be redefined.
|
||||
Standard_EXPORT virtual Standard_Boolean IsComplex (const Standard_Integer CN) const;
|
||||
|
||||
//! Function specific to STEP, which delivers the StepType as it
|
||||
//! is recorded in and read from a File compliant with STEP.
|
||||
//! This method is symmetric to the method CaseStep.
|
||||
//! StepType can be different from Dynamic Type's name, but
|
||||
//! belongs to the same class of Object.
|
||||
//! Returns an empty String if <CN> is zero.
|
||||
//! Warning : For a Complex Type Entity, returns an Empty String
|
||||
//! (Complex Type must be managed by users)
|
||||
Standard_EXPORT virtual const TCollection_AsciiString& StepType (const Standard_Integer CN) const = 0;
|
||||
|
||||
//! Function specific to STEP. Some STEP Types have a short form
|
||||
//! This method can be redefined to fill it
|
||||
//! By default, returns an empty string, which is then interpreted
|
||||
//! to take normal form from StepType
|
||||
Standard_EXPORT virtual TCollection_AsciiString ShortType (const Standard_Integer CN) const;
|
||||
|
||||
//! Function specific to STEP, which delivers the list of types
|
||||
//! which corresponds to a complex type. If <CN> is not for a
|
||||
//! complex type, this method returns False. Else it returns True
|
||||
//! and fills the list in alphabetic order.
|
||||
//! The default returns False. To be redefined as required.
|
||||
Standard_EXPORT virtual Standard_Boolean ComplexType (const Standard_Integer CN, TColStd_SequenceOfAsciiString& types) const;
|
||||
|
||||
//! General Read Function, calls ReadStep
|
||||
Standard_EXPORT void Read (const Standard_Integer CN, const Handle(Interface_FileReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Specific Read Function. Works with StepReaderData
|
||||
Standard_EXPORT virtual void ReadStep (const Standard_Integer CN, const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(Standard_Transient)& ent) const = 0;
|
||||
|
||||
//! Write Function, switched by CaseNum
|
||||
Standard_EXPORT virtual void WriteStep (const Standard_Integer CN, StepData_StepWriter& SW, const Handle(Standard_Transient)& ent) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_ReadWriteModule,Interface_ReaderModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_ReadWriteModule_HeaderFile
|
@@ -1,48 +0,0 @@
|
||||
-- Created on: 2002-12-18
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 2002-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 SelectArrReal from StepData inherits SelectNamed from StepData
|
||||
|
||||
---Purpose :
|
||||
|
||||
|
||||
uses
|
||||
|
||||
AsciiString from TCollection,
|
||||
HArray1OfReal from TColStd
|
||||
|
||||
is
|
||||
|
||||
Create returns SelectArrReal;
|
||||
|
||||
-- HasName (me) returns Boolean is redefined;
|
||||
|
||||
-- Name (me) returns CString is redefined;
|
||||
|
||||
-- SetName (me : mutable; name : CString) returns Boolean is redefined;
|
||||
-- redefined to accept any name
|
||||
|
||||
Kind(me) returns Integer is redefined;
|
||||
-- fixed kind : ArrReal
|
||||
|
||||
ArrReal(me) returns HArray1OfReal from TColStd;
|
||||
|
||||
SetArrReal(me:mutable; arr : HArray1OfReal from TColStd);
|
||||
|
||||
fields
|
||||
|
||||
theArr : HArray1OfReal from TColStd;
|
||||
|
||||
end SelectArrReal;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_SelectArrReal.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_SelectArrReal.hxx>
|
||||
|
||||
// Definitions : cf Field
|
||||
#define myKindArrReal 8
|
||||
|
69
src/StepData/StepData_SelectArrReal.hxx
Normal file
69
src/StepData/StepData_SelectArrReal.hxx
Normal file
@@ -0,0 +1,69 @@
|
||||
// Created on: 2002-12-18
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 2002-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 _StepData_SelectArrReal_HeaderFile
|
||||
#define _StepData_SelectArrReal_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <StepData_SelectNamed.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
|
||||
|
||||
class StepData_SelectArrReal;
|
||||
DEFINE_STANDARD_HANDLE(StepData_SelectArrReal, StepData_SelectNamed)
|
||||
|
||||
|
||||
class StepData_SelectArrReal : public StepData_SelectNamed
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_SelectArrReal();
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Kind() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HArray1OfReal) ArrReal() const;
|
||||
|
||||
Standard_EXPORT void SetArrReal (const Handle(TColStd_HArray1OfReal)& arr);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_SelectArrReal,StepData_SelectNamed)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HArray1OfReal) theArr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_SelectArrReal_HeaderFile
|
@@ -1,45 +0,0 @@
|
||||
-- Created on: 1996-12-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-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 SelectInt from StepData inherits SelectMember
|
||||
|
||||
---Purpose : A SelectInt is a SelectMember specialised for a basic integer
|
||||
-- type in a select which also accepts entities : this one has
|
||||
-- NO NAME.
|
||||
-- For a named select, see SelectNamed
|
||||
|
||||
uses CString, Logical
|
||||
|
||||
is
|
||||
|
||||
Create returns SelectInt;
|
||||
|
||||
Kind (me) returns Integer is redefined;
|
||||
-- possible kind for Int : integer boolean logical enum(without text)
|
||||
|
||||
SetKind (me : mutable; kind : Integer) is redefined;
|
||||
-- called by various Set*
|
||||
|
||||
Int (me) returns Integer is redefined;
|
||||
|
||||
SetInt (me : mutable; val : Integer) is redefined;
|
||||
|
||||
fields
|
||||
|
||||
thekind : Integer;
|
||||
theval : Integer;
|
||||
|
||||
end SelectInt;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_SelectInt.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_SelectInt.hxx>
|
||||
|
||||
StepData_SelectInt::StepData_SelectInt () { thekind = 0; theval = 0; }
|
||||
|
||||
|
75
src/StepData/StepData_SelectInt.hxx
Normal file
75
src/StepData/StepData_SelectInt.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Created on: 1996-12-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-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 _StepData_SelectInt_HeaderFile
|
||||
#define _StepData_SelectInt_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
|
||||
|
||||
class StepData_SelectInt;
|
||||
DEFINE_STANDARD_HANDLE(StepData_SelectInt, StepData_SelectMember)
|
||||
|
||||
//! A SelectInt is a SelectMember specialised for a basic integer
|
||||
//! type in a select which also accepts entities : this one has
|
||||
//! NO NAME.
|
||||
//! For a named select, see SelectNamed
|
||||
class StepData_SelectInt : public StepData_SelectMember
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_SelectInt();
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Kind() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetKind (const Standard_Integer kind) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Int() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetInt (const Standard_Integer val) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_SelectInt,StepData_SelectMember)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer thekind;
|
||||
Standard_Integer theval;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_SelectInt_HeaderFile
|
@@ -1,111 +0,0 @@
|
||||
-- Created on: 1996-12-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-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 SelectMember from StepData inherits TShared
|
||||
|
||||
---Purpose : The general form for a Select Member. A Select Member can,
|
||||
-- either define a value of a basic type (such as an integer)
|
||||
-- with an additional information : a name or list of names
|
||||
-- which precise the meaning of this value
|
||||
-- or be an alternate value in a select, which also accepts an
|
||||
-- entity (in this case, the name is not mandatory)
|
||||
--
|
||||
-- Several sub-types of SelectMember are defined for integer and
|
||||
-- real value, plus an "universal" one for any, and one more to
|
||||
-- describe a select with several names
|
||||
--
|
||||
-- It is also possible to define a specific subtype by redefining
|
||||
-- virtual method, then give a better control
|
||||
--
|
||||
-- Remark : this class itself could be deferred, because at least
|
||||
-- one of its virtual methods must be redefined to be usable
|
||||
|
||||
uses CString, ParamType from Interface, Logical from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns SelectMember;
|
||||
-- this constructor is useless, the class is empty
|
||||
|
||||
HasName (me) returns Boolean is virtual;
|
||||
---Purpose : Tells if a SelectMember has a name. Default is False
|
||||
|
||||
Name (me) returns CString is virtual;
|
||||
---Purpose : Returns the name of a SelectMember. Default is empty
|
||||
|
||||
SetName (me : mutable; name : CString) returns Boolean is virtual;
|
||||
---Purpose : Sets the name of a SelectMember, returns True if done, False
|
||||
-- if no name is allowed
|
||||
-- Default does nothing and returns False
|
||||
|
||||
Matches (me; name : CString) returns Boolean is virtual;
|
||||
---Purpose : Tells if the name of a SelectMember matches a given one
|
||||
-- By default, compares the strings, can be redefined (optimised)
|
||||
|
||||
Kind (me) returns Integer is virtual;
|
||||
-- see Field for Kind (same codes)
|
||||
|
||||
SetKind (me : mutable; kind : Integer) is virtual;
|
||||
-- called by various Set*
|
||||
|
||||
ParamType (me) returns ParamType from Interface;
|
||||
---Purpose : Returns the Kind of the SelectMember, under the form of an
|
||||
-- enum ParamType
|
||||
|
||||
Int (me) returns Integer is virtual;
|
||||
---Purpose : This internal method gives access to a value implemented by an
|
||||
-- Integer (to read it)
|
||||
|
||||
SetInt (me : mutable; val : Integer) is virtual;
|
||||
---Purpose : This internal method gives access to a value implemented by an
|
||||
-- Integer (to set it)
|
||||
|
||||
Integer (me) returns Integer;
|
||||
---Purpose : Gets the value as an Integer
|
||||
|
||||
SetInteger (me : mutable; val : Integer);
|
||||
|
||||
Boolean (me) returns Boolean;
|
||||
|
||||
SetBoolean (me : mutable; val : Boolean);
|
||||
|
||||
Logical (me) returns Logical;
|
||||
|
||||
SetLogical (me : mutable; val : Logical);
|
||||
|
||||
Real (me) returns Real is virtual;
|
||||
|
||||
SetReal (me : mutable; val : Real) is virtual;
|
||||
|
||||
String (me) returns CString is virtual;
|
||||
|
||||
SetString (me : mutable; val : CString) is virtual;
|
||||
|
||||
Enum (me) returns Integer;
|
||||
EnumText (me) returns CString is virtual;
|
||||
-- By default, returns the String
|
||||
-- Can be redefined to return a String for instance bound with int value
|
||||
|
||||
SetEnum (me : mutable; val : Integer; text : CString = "");
|
||||
-- calls SetInt (for val) and SetEnumText (see below)
|
||||
|
||||
SetEnumText (me : mutable; val : Integer; text : CString) is virtual;
|
||||
-- By default, calls SetString and disregards val
|
||||
-- It is enough for standard subtypes
|
||||
-- Can be redefined for a check on text and/or control of val and/or set
|
||||
-- val according to text
|
||||
|
||||
end SelectMember;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_SelectMember.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
|
||||
// Definitions reprises de Field :
|
||||
#define KindInteger 1
|
||||
|
142
src/StepData/StepData_SelectMember.hxx
Normal file
142
src/StepData/StepData_SelectMember.hxx
Normal file
@@ -0,0 +1,142 @@
|
||||
// Created on: 1996-12-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-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 _StepData_SelectMember_HeaderFile
|
||||
#define _StepData_SelectMember_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
|
||||
class StepData_SelectMember;
|
||||
DEFINE_STANDARD_HANDLE(StepData_SelectMember, MMgt_TShared)
|
||||
|
||||
//! The general form for a Select Member. A Select Member can,
|
||||
//! either define a value of a basic type (such as an integer)
|
||||
//! with an additional information : a name or list of names
|
||||
//! which precise the meaning of this value
|
||||
//! or be an alternate value in a select, which also accepts an
|
||||
//! entity (in this case, the name is not mandatory)
|
||||
//!
|
||||
//! Several sub-types of SelectMember are defined for integer and
|
||||
//! real value, plus an "universal" one for any, and one more to
|
||||
//! describe a select with several names
|
||||
//!
|
||||
//! It is also possible to define a specific subtype by redefining
|
||||
//! virtual method, then give a better control
|
||||
//!
|
||||
//! Remark : this class itself could be deferred, because at least
|
||||
//! one of its virtual methods must be redefined to be usable
|
||||
class StepData_SelectMember : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_SelectMember();
|
||||
|
||||
//! Tells if a SelectMember has a name. Default is False
|
||||
Standard_EXPORT virtual Standard_Boolean HasName() const;
|
||||
|
||||
//! Returns the name of a SelectMember. Default is empty
|
||||
Standard_EXPORT virtual Standard_CString Name() const;
|
||||
|
||||
//! Sets the name of a SelectMember, returns True if done, False
|
||||
//! if no name is allowed
|
||||
//! Default does nothing and returns False
|
||||
Standard_EXPORT virtual Standard_Boolean SetName (const Standard_CString name);
|
||||
|
||||
//! Tells if the name of a SelectMember matches a given one
|
||||
//! By default, compares the strings, can be redefined (optimised)
|
||||
Standard_EXPORT virtual Standard_Boolean Matches (const Standard_CString name) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Kind() const;
|
||||
|
||||
Standard_EXPORT virtual void SetKind (const Standard_Integer kind);
|
||||
|
||||
//! Returns the Kind of the SelectMember, under the form of an
|
||||
//! enum ParamType
|
||||
Standard_EXPORT Interface_ParamType ParamType() const;
|
||||
|
||||
//! This internal method gives access to a value implemented by an
|
||||
//! Integer (to read it)
|
||||
Standard_EXPORT virtual Standard_Integer Int() const;
|
||||
|
||||
//! This internal method gives access to a value implemented by an
|
||||
//! Integer (to set it)
|
||||
Standard_EXPORT virtual void SetInt (const Standard_Integer val);
|
||||
|
||||
//! Gets the value as an Integer
|
||||
Standard_EXPORT Standard_Integer Integer() const;
|
||||
|
||||
Standard_EXPORT void SetInteger (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Boolean() const;
|
||||
|
||||
Standard_EXPORT void SetBoolean (const Standard_Boolean val);
|
||||
|
||||
Standard_EXPORT StepData_Logical Logical() const;
|
||||
|
||||
Standard_EXPORT void SetLogical (const StepData_Logical val);
|
||||
|
||||
Standard_EXPORT virtual Standard_Real Real() const;
|
||||
|
||||
Standard_EXPORT virtual void SetReal (const Standard_Real val);
|
||||
|
||||
Standard_EXPORT virtual Standard_CString String() const;
|
||||
|
||||
Standard_EXPORT virtual void SetString (const Standard_CString val);
|
||||
|
||||
Standard_EXPORT Standard_Integer Enum() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_CString EnumText() const;
|
||||
|
||||
Standard_EXPORT void SetEnum (const Standard_Integer val, const Standard_CString text = "");
|
||||
|
||||
Standard_EXPORT virtual void SetEnumText (const Standard_Integer val, const Standard_CString text);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_SelectMember,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_SelectMember_HeaderFile
|
@@ -1,70 +0,0 @@
|
||||
-- Created on: 1996-12-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-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 SelectNamed from StepData inherits SelectMember
|
||||
|
||||
---Purpose : This select member can be of any kind, and be named
|
||||
-- But its takes more memory than some specialised ones
|
||||
-- This class allows one name for the instance
|
||||
|
||||
uses CString, Logical, AsciiString from TCollection, Field from StepData
|
||||
|
||||
is
|
||||
|
||||
Create returns SelectNamed;
|
||||
|
||||
HasName (me) returns Boolean is redefined;
|
||||
|
||||
Name (me) returns CString is redefined;
|
||||
|
||||
SetName (me : mutable; name : CString) returns Boolean is redefined;
|
||||
-- redefined to accept any name
|
||||
|
||||
Field (me) returns Field;
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : mutable) returns Field;
|
||||
---C++ : return &
|
||||
|
||||
|
||||
Kind (me) returns Integer is redefined;
|
||||
-- see Field for Kind (same codes)
|
||||
|
||||
SetKind (me : mutable; kind : Integer) is redefined;
|
||||
-- called by various Set*
|
||||
|
||||
Int (me) returns Integer is redefined;
|
||||
---Purpose : This internal method gives access to a value implemented by an
|
||||
-- Integer (to read it)
|
||||
|
||||
SetInt (me : mutable; val : Integer) is redefined;
|
||||
---Purpose : This internal method gives access to a value implemented by an
|
||||
-- Integer (to set it)
|
||||
|
||||
Real (me) returns Real is redefined;
|
||||
|
||||
SetReal (me : mutable; val : Real) is redefined;
|
||||
|
||||
String (me) returns CString is redefined;
|
||||
|
||||
SetString (me : mutable; val : CString) is redefined;
|
||||
|
||||
fields
|
||||
|
||||
thename : AsciiString;
|
||||
theval : Field from StepData;
|
||||
|
||||
end SelectNamed;
|
@@ -11,7 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_SelectNamed.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_SelectNamed.hxx>
|
||||
|
||||
// Definitions reprises de Field :
|
||||
#define KindInteger 1
|
||||
|
102
src/StepData/StepData_SelectNamed.hxx
Normal file
102
src/StepData/StepData_SelectNamed.hxx
Normal file
@@ -0,0 +1,102 @@
|
||||
// Created on: 1996-12-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-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 _StepData_SelectNamed_HeaderFile
|
||||
#define _StepData_SelectNamed_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class StepData_Field;
|
||||
|
||||
|
||||
class StepData_SelectNamed;
|
||||
DEFINE_STANDARD_HANDLE(StepData_SelectNamed, StepData_SelectMember)
|
||||
|
||||
//! This select member can be of any kind, and be named
|
||||
//! But its takes more memory than some specialised ones
|
||||
//! This class allows one name for the instance
|
||||
class StepData_SelectNamed : public StepData_SelectMember
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_SelectNamed();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean HasName() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_CString Name() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean SetName (const Standard_CString name) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT const StepData_Field& Field() const;
|
||||
|
||||
Standard_EXPORT StepData_Field& CField();
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Kind() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetKind (const Standard_Integer kind) Standard_OVERRIDE;
|
||||
|
||||
//! This internal method gives access to a value implemented by an
|
||||
//! Integer (to read it)
|
||||
Standard_EXPORT virtual Standard_Integer Int() const Standard_OVERRIDE;
|
||||
|
||||
//! This internal method gives access to a value implemented by an
|
||||
//! Integer (to set it)
|
||||
Standard_EXPORT virtual void SetInt (const Standard_Integer val) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real Real() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetReal (const Standard_Real val) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_CString String() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetString (const Standard_CString val) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_SelectNamed,StepData_SelectMember)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TCollection_AsciiString thename;
|
||||
StepData_Field theval;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_SelectNamed_HeaderFile
|
@@ -1,41 +0,0 @@
|
||||
-- Created on: 1996-12-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-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 SelectReal from StepData inherits SelectMember
|
||||
|
||||
---Purpose : A SelectReal is a SelectMember specialised for a basic real
|
||||
-- type in a select which also accepts entities : this one has
|
||||
-- NO NAME
|
||||
-- For a named select, see SelectNamed
|
||||
|
||||
uses CString, Logical
|
||||
|
||||
is
|
||||
|
||||
Create returns SelectReal;
|
||||
|
||||
Kind (me) returns Integer is redefined;
|
||||
-- fixed kind : Real
|
||||
|
||||
Real (me) returns Real is redefined;
|
||||
|
||||
SetReal (me : mutable; val : Real) is redefined;
|
||||
|
||||
fields
|
||||
|
||||
theval : Real;
|
||||
|
||||
end SelectReal;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_SelectReal.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_SelectReal.hxx>
|
||||
|
||||
// Definitions : cf Field
|
||||
#define KindReal 5
|
||||
|
73
src/StepData/StepData_SelectReal.hxx
Normal file
73
src/StepData/StepData_SelectReal.hxx
Normal file
@@ -0,0 +1,73 @@
|
||||
// Created on: 1996-12-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-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 _StepData_SelectReal_HeaderFile
|
||||
#define _StepData_SelectReal_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
|
||||
|
||||
class StepData_SelectReal;
|
||||
DEFINE_STANDARD_HANDLE(StepData_SelectReal, StepData_SelectMember)
|
||||
|
||||
//! A SelectReal is a SelectMember specialised for a basic real
|
||||
//! type in a select which also accepts entities : this one has
|
||||
//! NO NAME
|
||||
//! For a named select, see SelectNamed
|
||||
class StepData_SelectReal : public StepData_SelectMember
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT StepData_SelectReal();
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Kind() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real Real() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetReal (const Standard_Real val) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_SelectReal,StepData_SelectMember)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Real theval;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_SelectReal_HeaderFile
|
@@ -1,163 +0,0 @@
|
||||
-- Created on: 1993-03-26
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-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.
|
||||
|
||||
deferred class SelectType from StepData
|
||||
|
||||
---Purpose : SelectType is the basis used for SELECT_TYPE definitions from
|
||||
-- the EXPRESS form. A SELECT_TYPE in EXPRESS is an enumeration
|
||||
-- of Types, it corresponds in a way to a Super-Type, but with
|
||||
-- no specific Methods, and no exclusivity (a given Type can be
|
||||
-- member of several SELECT_TYPES, plus be itself a SUB_TYPE).
|
||||
--
|
||||
-- A SelectType can be field of a Transient Entity or only used
|
||||
-- to control an input Argument
|
||||
--
|
||||
-- This class implies to designate each member Type by a Case
|
||||
-- Number which is a positive Integer value (this allows a faster
|
||||
-- treatement).
|
||||
--
|
||||
-- With this class, a specific SelectType can :
|
||||
-- - recognize an Entity as complying or not with its definition,
|
||||
-- - storing it, with the garanty that the stored Entity complies
|
||||
-- with the definition of the SelectType
|
||||
-- - and (if judged useful) give the stored Entity under the good
|
||||
-- Type rather than simply "Transient".
|
||||
|
||||
uses CString, Transient, Type, Logical, SelectMember, PDescr
|
||||
|
||||
raises TypeMismatch
|
||||
|
||||
is
|
||||
|
||||
CaseNum (me; ent : Transient) returns Integer is deferred;
|
||||
---Purpose : Recognizes the Type of an Entity. Returns a positive Number
|
||||
-- which identifies the Type in the definition List of the
|
||||
-- SelectType. Returns Zero if its Type in not in this List.
|
||||
|
||||
Matches (me; ent : Transient) returns Boolean;
|
||||
---Purpose : Returns True if the Type of an Entity complies with the
|
||||
-- definition list of the SelectType.
|
||||
-- Also checks for a SelectMember
|
||||
-- Default Implementation looks for CaseNum or CaseMem positive
|
||||
|
||||
SetValue (me : in out; ent : any Transient)
|
||||
---Purpose : Stores an Entity. This allows to define a specific SelectType
|
||||
-- class with one read method per member Type, which returns the
|
||||
-- Value casted with the good Type.
|
||||
raises TypeMismatch is static;
|
||||
-- Error if <ent> does not match the definition List of Types.
|
||||
|
||||
Nullify (me : in out) is static;
|
||||
---Purpose : Nullifies the Stored Entity
|
||||
|
||||
Value (me) returns any Transient is static;
|
||||
---Purpose : Returns the Stored Entity. Can be used to define specific
|
||||
-- read methods (see above)
|
||||
---C++ : return const &
|
||||
|
||||
IsNull (me) returns Boolean is static;
|
||||
---Purpose : Returns True if there is no Stored Entity (i.e. it is Null)
|
||||
|
||||
-- Entity (plain Transient)
|
||||
|
||||
Type (me) returns Type is static;
|
||||
---Purpose : Returns the Effective (Dynamic) Type of the Stored Entity
|
||||
-- If it is Null, returns TYPE(Transient)
|
||||
|
||||
CaseNumber (me) returns Integer is static;
|
||||
---Purpose : Recognizes the Type of the stored Entity, or zero if it is
|
||||
-- Null or SelectMember. Calls the first method CaseNum on Value
|
||||
|
||||
-- Others (through a SelectMember)
|
||||
|
||||
Description (me) returns PDescr is virtual;
|
||||
---Purpose : Returns the Description which corresponds to <me>
|
||||
-- Null if no specific description to give. This description is
|
||||
-- used to control reading an check validity.
|
||||
-- Default returns a Null Handle, i.e. undefined description
|
||||
-- It can suffice if CaseNum and CaseMem give enough control
|
||||
|
||||
NewMember (me) returns SelectMember is virtual;
|
||||
---Purpose : Returns a preferred SelectMember. Default returns a Null
|
||||
-- By default, a SelectMember can be set according to data type
|
||||
-- and Name : it is a SelectNamed if Name is defined
|
||||
--
|
||||
-- This method allows to define, for a specific SelectType, a
|
||||
-- specific SelectMember than SelectNamed. For instance for a
|
||||
-- Real plus a Name, a SelectReal plus a case number is a good
|
||||
-- solution, lighter than SelectNamed which is very multipurpose
|
||||
|
||||
CaseMem (me; ent : SelectMember) returns Integer is virtual;
|
||||
---Purpose : Recognize a SelectMember (kind, name). Returns a positive
|
||||
-- value which identifies the case in the List of immediate cases
|
||||
-- (distinct from the List of Entity Types). Zero if not
|
||||
-- recognizes
|
||||
-- Default returns 0, saying that no immediate value is allowed
|
||||
|
||||
CaseMember (me) returns Integer;
|
||||
---Purpose : Returns the Type of the stored SelectMember, or zero if it is
|
||||
-- Null or Entity. Calls the method CaseMem on Value
|
||||
|
||||
Member (me) returns SelectMember;
|
||||
---Purpose : Returns Value as a SelectMember. Null if not a SelectMember
|
||||
|
||||
SelectName (me) returns CString;
|
||||
---Purpose : Returns the type name of SelectMember. If no SelectMember or
|
||||
-- with no type name, returns an empty string
|
||||
-- To change it, pass through the SelectMember itself
|
||||
|
||||
Int (me) returns Integer;
|
||||
---Purpose : This internal method gives access to a value implemented by an
|
||||
-- Integer (to read it)
|
||||
|
||||
SetInt (me : in out; val : Integer)
|
||||
---Purpose : This internal method gives access to a value implemented by an
|
||||
-- Integer (to set it) : a SelectMember MUST ALREADY BE THERE !
|
||||
raises TypeMismatch is static;
|
||||
|
||||
Integer (me) returns Integer;
|
||||
---Purpose : Gets the value as an Integer
|
||||
|
||||
SetInteger (me : in out; val : Integer; name : CString = "")
|
||||
---Purpose : Sets a new Integer value, with an optional type name
|
||||
-- Warning : If a SelectMember is already set, works on it : value and
|
||||
-- name must then be accepted by this SelectMember
|
||||
raises TypeMismatch is static;
|
||||
-- Error if no Integer value is accepted (see CaseMem)
|
||||
|
||||
Boolean (me) returns Boolean;
|
||||
|
||||
SetBoolean (me : in out; val : Boolean; name : CString = "")
|
||||
raises TypeMismatch is static;
|
||||
|
||||
Logical (me) returns Logical;
|
||||
|
||||
SetLogical (me : in out; val : Logical; name : CString = "")
|
||||
raises TypeMismatch is static;
|
||||
|
||||
Real (me) returns Real;
|
||||
|
||||
SetReal (me : in out; val : Real; name : CString = "")
|
||||
raises TypeMismatch is static;
|
||||
|
||||
Destroy (me: in out) is virtual;
|
||||
---C++ : alias "Standard_EXPORT virtual ~StepData_SelectType() { Destroy(); }"
|
||||
|
||||
fields
|
||||
|
||||
thevalue : Transient;
|
||||
|
||||
end SelectType;
|
@@ -11,15 +11,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_SelectType.ixx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <StepData_SelectNamed.hxx>
|
||||
#include <StepData_SelectReal.hxx>
|
||||
#include <StepData_SelectInt.hxx>
|
||||
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <StepData_PDescr.hxx>
|
||||
#include <StepData_SelectInt.hxx>
|
||||
#include <StepData_SelectMember.hxx>
|
||||
#include <StepData_SelectNamed.hxx>
|
||||
#include <StepData_SelectReal.hxx>
|
||||
#include <StepData_SelectType.hxx>
|
||||
|
||||
Standard_Boolean StepData_SelectType::Matches
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
|
187
src/StepData/StepData_SelectType.hxx
Normal file
187
src/StepData/StepData_SelectType.hxx
Normal file
@@ -0,0 +1,187 @@
|
||||
// Created on: 1993-03-26
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-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 _StepData_SelectType_HeaderFile
|
||||
#define _StepData_SelectType_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Standard_Transient;
|
||||
class Standard_TypeMismatch;
|
||||
class StepData_PDescr;
|
||||
class StepData_SelectMember;
|
||||
|
||||
|
||||
//! SelectType is the basis used for SELECT_TYPE definitions from
|
||||
//! the EXPRESS form. A SELECT_TYPE in EXPRESS is an enumeration
|
||||
//! of Types, it corresponds in a way to a Super-Type, but with
|
||||
//! no specific Methods, and no exclusivity (a given Type can be
|
||||
//! member of several SELECT_TYPES, plus be itself a SUB_TYPE).
|
||||
//!
|
||||
//! A SelectType can be field of a Transient Entity or only used
|
||||
//! to control an input Argument
|
||||
//!
|
||||
//! This class implies to designate each member Type by a Case
|
||||
//! Number which is a positive Integer value (this allows a faster
|
||||
//! treatement).
|
||||
//!
|
||||
//! With this class, a specific SelectType can :
|
||||
//! - recognize an Entity as complying or not with its definition,
|
||||
//! - storing it, with the garanty that the stored Entity complies
|
||||
//! with the definition of the SelectType
|
||||
//! - and (if judged useful) give the stored Entity under the good
|
||||
//! Type rather than simply "Transient".
|
||||
class StepData_SelectType
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Recognizes the Type of an Entity. Returns a positive Number
|
||||
//! which identifies the Type in the definition List of the
|
||||
//! SelectType. Returns Zero if its Type in not in this List.
|
||||
Standard_EXPORT virtual Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const = 0;
|
||||
|
||||
//! Returns True if the Type of an Entity complies with the
|
||||
//! definition list of the SelectType.
|
||||
//! Also checks for a SelectMember
|
||||
//! Default Implementation looks for CaseNum or CaseMem positive
|
||||
Standard_EXPORT Standard_Boolean Matches (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Stores an Entity. This allows to define a specific SelectType
|
||||
//! class with one read method per member Type, which returns the
|
||||
//! Value casted with the good Type.
|
||||
Standard_EXPORT void SetValue (const Handle(Standard_Transient)& ent);
|
||||
|
||||
//! Nullifies the Stored Entity
|
||||
Standard_EXPORT void Nullify();
|
||||
|
||||
//! Returns the Stored Entity. Can be used to define specific
|
||||
//! read methods (see above)
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Value() const;
|
||||
|
||||
//! Returns True if there is no Stored Entity (i.e. it is Null)
|
||||
Standard_EXPORT Standard_Boolean IsNull() const;
|
||||
|
||||
//! Returns the Effective (Dynamic) Type of the Stored Entity
|
||||
//! If it is Null, returns TYPE(Transient)
|
||||
Standard_EXPORT Handle(Standard_Type) Type() const;
|
||||
|
||||
//! Recognizes the Type of the stored Entity, or zero if it is
|
||||
//! Null or SelectMember. Calls the first method CaseNum on Value
|
||||
Standard_EXPORT Standard_Integer CaseNumber() const;
|
||||
|
||||
//! Returns the Description which corresponds to <me>
|
||||
//! Null if no specific description to give. This description is
|
||||
//! used to control reading an check validity.
|
||||
//! Default returns a Null Handle, i.e. undefined description
|
||||
//! It can suffice if CaseNum and CaseMem give enough control
|
||||
Standard_EXPORT virtual Handle(StepData_PDescr) Description() const;
|
||||
|
||||
//! Returns a preferred SelectMember. Default returns a Null
|
||||
//! By default, a SelectMember can be set according to data type
|
||||
//! and Name : it is a SelectNamed if Name is defined
|
||||
//!
|
||||
//! This method allows to define, for a specific SelectType, a
|
||||
//! specific SelectMember than SelectNamed. For instance for a
|
||||
//! Real plus a Name, a SelectReal plus a case number is a good
|
||||
//! solution, lighter than SelectNamed which is very multipurpose
|
||||
Standard_EXPORT virtual Handle(StepData_SelectMember) NewMember() const;
|
||||
|
||||
//! Recognize a SelectMember (kind, name). Returns a positive
|
||||
//! value which identifies the case in the List of immediate cases
|
||||
//! (distinct from the List of Entity Types). Zero if not
|
||||
//! recognizes
|
||||
//! Default returns 0, saying that no immediate value is allowed
|
||||
Standard_EXPORT virtual Standard_Integer CaseMem (const Handle(StepData_SelectMember)& ent) const;
|
||||
|
||||
//! Returns the Type of the stored SelectMember, or zero if it is
|
||||
//! Null or Entity. Calls the method CaseMem on Value
|
||||
Standard_EXPORT Standard_Integer CaseMember() const;
|
||||
|
||||
//! Returns Value as a SelectMember. Null if not a SelectMember
|
||||
Standard_EXPORT Handle(StepData_SelectMember) Member() const;
|
||||
|
||||
//! Returns the type name of SelectMember. If no SelectMember or
|
||||
//! with no type name, returns an empty string
|
||||
//! To change it, pass through the SelectMember itself
|
||||
Standard_EXPORT Standard_CString SelectName() const;
|
||||
|
||||
//! This internal method gives access to a value implemented by an
|
||||
//! Integer (to read it)
|
||||
Standard_EXPORT Standard_Integer Int() const;
|
||||
|
||||
//! This internal method gives access to a value implemented by an
|
||||
//! Integer (to set it) : a SelectMember MUST ALREADY BE THERE !
|
||||
Standard_EXPORT void SetInt (const Standard_Integer val);
|
||||
|
||||
//! Gets the value as an Integer
|
||||
Standard_EXPORT Standard_Integer Integer() const;
|
||||
|
||||
//! Sets a new Integer value, with an optional type name
|
||||
//! Warning : If a SelectMember is already set, works on it : value and
|
||||
//! name must then be accepted by this SelectMember
|
||||
Standard_EXPORT void SetInteger (const Standard_Integer val, const Standard_CString name = "");
|
||||
|
||||
Standard_EXPORT Standard_Boolean Boolean() const;
|
||||
|
||||
Standard_EXPORT void SetBoolean (const Standard_Boolean val, const Standard_CString name = "");
|
||||
|
||||
Standard_EXPORT StepData_Logical Logical() const;
|
||||
|
||||
Standard_EXPORT void SetLogical (const StepData_Logical val, const Standard_CString name = "");
|
||||
|
||||
Standard_EXPORT Standard_Real Real() const;
|
||||
|
||||
Standard_EXPORT void SetReal (const Standard_Real val, const Standard_CString name = "");
|
||||
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
Standard_EXPORT virtual ~StepData_SelectType() { Destroy(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Standard_Transient) thevalue;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_SelectType_HeaderFile
|
@@ -1,104 +0,0 @@
|
||||
-- Created on: 1997-05-09
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1997-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 Simple from StepData inherits Described from StepData
|
||||
|
||||
---Purpose : A Simple Entity is defined by a type (which can heve super
|
||||
-- types) and a list of parameters
|
||||
|
||||
uses CString,
|
||||
Check from Interface, EntityIterator from Interface,
|
||||
ESDescr from StepData,
|
||||
Field from StepData, FieldListN from StepData
|
||||
|
||||
raises InterfaceMismatch
|
||||
|
||||
is
|
||||
|
||||
Create (descr : ESDescr) returns Simple;
|
||||
---Purpose : Creates a Simple Entity
|
||||
|
||||
ESDescr (me) returns ESDescr;
|
||||
---Purpose : Returns description, as for simple
|
||||
|
||||
StepType (me) returns CString;
|
||||
---Purpose : Returns the recorded StepType (TypeName of its ESDescr)
|
||||
|
||||
-- inherited
|
||||
|
||||
IsComplex (me) returns Boolean;
|
||||
---Purpose : Returns False
|
||||
|
||||
|
||||
Matches (me; steptype : CString) returns Boolean;
|
||||
---Purpose : Tells if a step type is matched by <me>
|
||||
-- For a Simple Entity : own type or super type
|
||||
-- For a Complex Entity : one of the members
|
||||
|
||||
As (me; steptype : CString) returns Simple;
|
||||
---Purpose : Returns a Simple Entity which matches with a Type in <me> :
|
||||
-- For a Simple Entity : me if it matches, else a null handle
|
||||
-- For a Complex Entity : the member which matches, else null
|
||||
|
||||
HasField (me; name : CString) returns Boolean;
|
||||
---Purpose : Tells if a Field brings a given name
|
||||
|
||||
Field (me; name : CString) returns Field
|
||||
---Purpose : Returns a Field from its name; read-only
|
||||
raises InterfaceMismatch;
|
||||
-- raises if no Field for <name>
|
||||
---C++ : return const &
|
||||
|
||||
CField (me : mutable; name : CString) returns Field
|
||||
---Purpose : Returns a Field from its name; read or write
|
||||
raises InterfaceMismatch;
|
||||
-- raises if no Field for <name>
|
||||
---C++ : return &
|
||||
|
||||
-- more specific
|
||||
|
||||
NbFields (me) returns Integer;
|
||||
---Purpose : Returns the count of fields
|
||||
|
||||
FieldNum (me; num : Integer) returns Field;
|
||||
---Purpose : Returns a field from its rank, for read-only use
|
||||
---C++ : return const &
|
||||
|
||||
CFieldNum (me : mutable; num : Integer) returns Field;
|
||||
---Purpose : Returns a field from its rank, in order to modify it
|
||||
---C++ : return &
|
||||
|
||||
Fields (me) returns FieldListN;
|
||||
---Purpose : Returns the entire field list, read-only
|
||||
---C++ : return const &
|
||||
|
||||
CFields (me : mutable) returns FieldListN;
|
||||
---Purpose : Returns the entire field list, read or write
|
||||
---C++ : return &
|
||||
|
||||
--
|
||||
|
||||
Check (me; ach : in out Check from Interface);
|
||||
---Purpose : Fills a Check by using its Description
|
||||
|
||||
Shared (me; list : in out EntityIterator from Interface);
|
||||
---Purpose : Fills an EntityIterator with entities shared by <me>
|
||||
|
||||
fields
|
||||
|
||||
thefields : FieldListN;
|
||||
|
||||
end Simple;
|
@@ -11,9 +11,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_Simple.ixx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceMismatch.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <StepData_ESDescr.hxx>
|
||||
#include <StepData_Field.hxx>
|
||||
#include <StepData_FieldListN.hxx>
|
||||
#include <StepData_Simple.hxx>
|
||||
|
||||
StepData_Simple::StepData_Simple (const Handle(StepData_ESDescr)& descr)
|
||||
: StepData_Described (descr) , thefields (descr->NbFields()) { }
|
||||
|
123
src/StepData/StepData_Simple.hxx
Normal file
123
src/StepData/StepData_Simple.hxx
Normal file
@@ -0,0 +1,123 @@
|
||||
// Created on: 1997-05-09
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1997-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 _StepData_Simple_HeaderFile
|
||||
#define _StepData_Simple_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_FieldListN.hxx>
|
||||
#include <StepData_Described.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Interface_InterfaceMismatch;
|
||||
class StepData_ESDescr;
|
||||
class StepData_Field;
|
||||
class StepData_FieldListN;
|
||||
class Interface_Check;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
class StepData_Simple;
|
||||
DEFINE_STANDARD_HANDLE(StepData_Simple, StepData_Described)
|
||||
|
||||
//! A Simple Entity is defined by a type (which can heve super
|
||||
//! types) and a list of parameters
|
||||
class StepData_Simple : public StepData_Described
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a Simple Entity
|
||||
Standard_EXPORT StepData_Simple(const Handle(StepData_ESDescr)& descr);
|
||||
|
||||
//! Returns description, as for simple
|
||||
Standard_EXPORT Handle(StepData_ESDescr) ESDescr() const;
|
||||
|
||||
//! Returns the recorded StepType (TypeName of its ESDescr)
|
||||
Standard_EXPORT Standard_CString StepType() const;
|
||||
|
||||
//! Returns False
|
||||
Standard_EXPORT Standard_Boolean IsComplex() const;
|
||||
|
||||
//! Tells if a step type is matched by <me>
|
||||
//! For a Simple Entity : own type or super type
|
||||
//! For a Complex Entity : one of the members
|
||||
Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const;
|
||||
|
||||
//! Returns a Simple Entity which matches with a Type in <me> :
|
||||
//! For a Simple Entity : me if it matches, else a null handle
|
||||
//! For a Complex Entity : the member which matches, else null
|
||||
Standard_EXPORT Handle(StepData_Simple) As (const Standard_CString steptype) const;
|
||||
|
||||
//! Tells if a Field brings a given name
|
||||
Standard_EXPORT Standard_Boolean HasField (const Standard_CString name) const;
|
||||
|
||||
//! Returns a Field from its name; read-only
|
||||
Standard_EXPORT const StepData_Field& Field (const Standard_CString name) const;
|
||||
|
||||
//! Returns a Field from its name; read or write
|
||||
Standard_EXPORT StepData_Field& CField (const Standard_CString name);
|
||||
|
||||
//! Returns the count of fields
|
||||
Standard_EXPORT Standard_Integer NbFields() const;
|
||||
|
||||
//! Returns a field from its rank, for read-only use
|
||||
Standard_EXPORT const StepData_Field& FieldNum (const Standard_Integer num) const;
|
||||
|
||||
//! Returns a field from its rank, in order to modify it
|
||||
Standard_EXPORT StepData_Field& CFieldNum (const Standard_Integer num);
|
||||
|
||||
//! Returns the entire field list, read-only
|
||||
Standard_EXPORT const StepData_FieldListN& Fields() const;
|
||||
|
||||
//! Returns the entire field list, read or write
|
||||
Standard_EXPORT StepData_FieldListN& CFields();
|
||||
|
||||
//! Fills a Check by using its Description
|
||||
Standard_EXPORT void Check (Handle(Interface_Check)& ach) const;
|
||||
|
||||
//! Fills an EntityIterator with entities shared by <me>
|
||||
Standard_EXPORT void Shared (Interface_EntityIterator& list) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(StepData_Simple,StepData_Described)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
StepData_FieldListN thefields;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _StepData_Simple_HeaderFile
|
@@ -1,89 +0,0 @@
|
||||
-- Created on: 1994-03-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 StepDumper from StepData
|
||||
|
||||
---Purpose : Provides a way to dump entities processed through STEP, with
|
||||
-- these features :
|
||||
-- - same form as for writing a STEP File (because it is clear
|
||||
-- and compact enough, even if the names of the fields do not
|
||||
-- appear) : thus, no additionnal resource is required
|
||||
-- - possibility to look for an entity itself (only its Type or
|
||||
-- with its content), an entity and it shared items (one level)
|
||||
-- or all the entities its refers to, directly or recursively.
|
||||
|
||||
uses Messenger from Message, Transient, Protocol from StepData, StepModel,
|
||||
GeneralLib, StepWriter, WriterLib
|
||||
|
||||
raises InterfaceMismatch
|
||||
|
||||
is
|
||||
|
||||
Create (amodel : StepModel; protocol : Protocol from StepData; mode : Integer = 0)
|
||||
returns StepDumper;
|
||||
---Purpose : Creates a StepDumper, able to work on a given StepModel
|
||||
-- (which defines the total scope for dumping entities) and
|
||||
-- a given Protocol from Step (which defines the authorized
|
||||
-- types to be dumped)
|
||||
-- <mode> commands what is to be displayed (number or label)
|
||||
-- 0 for number (and corresponding labels are displayed apart)
|
||||
-- 1 for label (and corresponding numbers are displayed apart)
|
||||
-- 2 for label without anymore
|
||||
|
||||
StepWriter (me : in out) returns StepWriter is static;
|
||||
---Purpose : Gives an access to the tool which is used to work : this allow
|
||||
-- to acts on some parameters : Floating Format, Scopes ...
|
||||
---C++ : return &
|
||||
|
||||
Dump (me : in out; S : Messenger from Message; ent : Transient; level : Integer)
|
||||
returns Boolean
|
||||
---Purpose : Dumps a Entity on an Messenger. Returns True if
|
||||
-- sucess, False, if the entity to dump has not been recognized
|
||||
-- by the Protocol. <level> can have one of these values :
|
||||
-- - 0 : prints the TYPE only, as known in STEP Files (StepType)
|
||||
-- If <ent> has not been regognized by the Protocol, or if its
|
||||
-- type is Complex, the StepType is replaced by the display of
|
||||
-- the cdl type. Complex Type are well processed by level 1.
|
||||
-- - 1 : dumps the entity, completely (whatever it has simple or
|
||||
-- complex type) but alone.
|
||||
-- - 2 : dumps the entity completely, plus the item its refers to
|
||||
-- at first level (a header message designates the starting
|
||||
-- entity of the dump) <Lists Shared and Implied>
|
||||
-- - 3 : dumps the entity and its refered items at any levels
|
||||
--
|
||||
-- For levels 1,2,3, the numbers displayed (form #nnn) are the
|
||||
-- numbers of the corresponding entities in the Model
|
||||
raises InterfaceMismatch;
|
||||
-- Errors come from StepWriter, they especially occur when an
|
||||
-- entity does not come from the starting Model.
|
||||
-- Level 0 accepts an entity which does not come from the Model.
|
||||
|
||||
Dump (me : in out; S : Messenger from Message; num : Integer; level : Integer)
|
||||
returns Boolean
|
||||
---Purpose : Works as Dump with a Transient, but directly takes the
|
||||
-- entity designated by its number in the Model
|
||||
-- Returns False, also if <num> is out of range
|
||||
raises InterfaceMismatch;
|
||||
-- Errors : same as above
|
||||
|
||||
fields
|
||||
|
||||
themodel : StepModel;
|
||||
theslib : GeneralLib;
|
||||
thewlib : WriterLib;
|
||||
thewriter : StepWriter;
|
||||
|
||||
end StepDumper;
|
@@ -11,16 +11,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepData_StepDumper.ixx>
|
||||
#include <StepData_ReadWriteModule.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <Interface_GeneralModule.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Message.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_GeneralModule.hxx>
|
||||
#include <Interface_InterfaceMismatch.hxx>
|
||||
#include <Message.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <StepData_Protocol.hxx>
|
||||
#include <StepData_ReadWriteModule.hxx>
|
||||
#include <StepData_StepDumper.hxx>
|
||||
#include <StepData_StepModel.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
StepData_StepDumper::StepData_StepDumper
|
||||
(const Handle(StepData_StepModel)& amodel,
|
||||
const Handle(StepData_Protocol)& protocol,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user