mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,4 +1,89 @@
|
||||
IGESData_Dump.hxx
|
||||
IGESData.cxx
|
||||
IGESData.hxx
|
||||
IGESData_Array1OfDirPart.hxx
|
||||
IGESData_Array1OfIGESEntity.hxx
|
||||
IGESData_BasicEditor.cxx
|
||||
IGESData_BasicEditor.hxx
|
||||
IGESData_ColorEntity.cxx
|
||||
IGESData_ColorEntity.hxx
|
||||
IGESData_DefaultGeneral.cxx
|
||||
IGESData_DefaultGeneral.hxx
|
||||
IGESData_DefaultSpecific.cxx
|
||||
IGESData_DefaultSpecific.hxx
|
||||
IGESData_DefList.hxx
|
||||
IGESData_DefSwitch.cxx
|
||||
IGESData_DefSwitch.hxx
|
||||
IGESData_DefType.hxx
|
||||
IGESData_DirChecker.cxx
|
||||
IGESData_DirChecker.hxx
|
||||
IGESData_DirPart.cxx
|
||||
IGESData_DirPart.hxx
|
||||
IGESData_Dump.hxx
|
||||
IGESData_FileProtocol.cxx
|
||||
IGESData_FileProtocol.hxx
|
||||
IGESData_FileRecognizer.hxx
|
||||
IGESData_FileRecognizer_0.cxx
|
||||
IGESData_FreeFormatEntity.cxx
|
||||
IGESData_FreeFormatEntity.hxx
|
||||
IGESData_GeneralModule.cxx
|
||||
IGESData_GeneralModule.hxx
|
||||
IGESData_GlobalNodeOfSpecificLib.hxx
|
||||
IGESData_GlobalNodeOfSpecificLib_0.cxx
|
||||
IGESData_GlobalNodeOfWriterLib.hxx
|
||||
IGESData_GlobalNodeOfWriterLib_0.cxx
|
||||
IGESData_GlobalSection.cxx
|
||||
IGESData_GlobalSection.hxx
|
||||
IGESData_HArray1OfIGESEntity.hxx
|
||||
IGESData_IGESDumper.cxx
|
||||
IGESData_IGESDumper.hxx
|
||||
IGESData_IGESEntity.cxx
|
||||
IGESData_IGESEntity.hxx
|
||||
IGESData_IGESModel.cxx
|
||||
IGESData_IGESModel.hxx
|
||||
IGESData_IGESReaderData.cxx
|
||||
IGESData_IGESReaderData.hxx
|
||||
IGESData_IGESReaderTool.cxx
|
||||
IGESData_IGESReaderTool.hxx
|
||||
IGESData_IGESType.cxx
|
||||
IGESData_IGESType.hxx
|
||||
IGESData_IGESWriter.cxx
|
||||
IGESData_IGESWriter.hxx
|
||||
IGESData_LabelDisplayEntity.cxx
|
||||
IGESData_LabelDisplayEntity.hxx
|
||||
IGESData_LevelListEntity.cxx
|
||||
IGESData_LevelListEntity.hxx
|
||||
IGESData_LineFontEntity.cxx
|
||||
IGESData_LineFontEntity.hxx
|
||||
IGESData_NameEntity.cxx
|
||||
IGESData_NameEntity.hxx
|
||||
IGESData_NodeOfSpecificLib.hxx
|
||||
IGESData_NodeOfSpecificLib_0.cxx
|
||||
IGESData_NodeOfWriterLib.hxx
|
||||
IGESData_NodeOfWriterLib_0.cxx
|
||||
IGESData_ParamCursor.cxx
|
||||
IGESData_ParamCursor.hxx
|
||||
IGESData_ParamCursor.lxx
|
||||
IGESData_ParamReader.cxx
|
||||
IGESData_ParamReader.hxx
|
||||
IGESData_Protocol.cxx
|
||||
IGESData_Protocol.hxx
|
||||
IGESData_ReadStage.hxx
|
||||
IGESData_ReadWriteModule.cxx
|
||||
IGESData_ReadWriteModule.hxx
|
||||
IGESData_SingleParentEntity.cxx
|
||||
IGESData_SingleParentEntity.hxx
|
||||
IGESData_SpecificLib.hxx
|
||||
IGESData_SpecificLib_0.cxx
|
||||
IGESData_SpecificModule.cxx
|
||||
IGESData_SpecificModule.hxx
|
||||
IGESData_Status.hxx
|
||||
IGESData_ToolLocation.cxx
|
||||
IGESData_ToolLocation.hxx
|
||||
IGESData_TransfEntity.cxx
|
||||
IGESData_TransfEntity.hxx
|
||||
IGESData_UndefinedEntity.cxx
|
||||
IGESData_UndefinedEntity.hxx
|
||||
IGESData_ViewKindEntity.cxx
|
||||
IGESData_ViewKindEntity.hxx
|
||||
IGESData_WriterLib.hxx
|
||||
IGESData_WriterLib_0.cxx
|
||||
|
@@ -1,146 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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 IGESData
|
||||
|
||||
---Purpose : basic description of an IGES Interface
|
||||
|
||||
uses Standard, MMgt, TCollection, TColStd,
|
||||
LibCtl, Interface, gp, Message
|
||||
-- gp for Trsf, used by basic notion Transformation Matrix - Location
|
||||
|
||||
is
|
||||
|
||||
class Protocol;
|
||||
|
||||
class IGESModel;
|
||||
|
||||
deferred class IGESEntity; -- includes directory part
|
||||
-- following classes are used in directory part : effective types of
|
||||
-- LineFont, Transf, etc... MUST inherit them, because of type checking
|
||||
|
||||
deferred class LineFontEntity;
|
||||
deferred class LevelListEntity;
|
||||
deferred class TransfEntity; -- transformation matrix
|
||||
deferred class ViewKindEntity; -- single view or list of views
|
||||
deferred class LabelDisplayEntity;
|
||||
deferred class ColorEntity;
|
||||
deferred class NameEntity; -- possible as property
|
||||
deferred class SingleParentEntity; -- possible as associativity
|
||||
|
||||
class UndefinedEntity;
|
||||
class FreeFormatEntity;
|
||||
|
||||
class GlobalSection;
|
||||
class DefSwitch;
|
||||
|
||||
class DirChecker;
|
||||
|
||||
class IGESReaderData;
|
||||
class IGESReaderTool;
|
||||
class ParamReader;
|
||||
class ParamCursor;
|
||||
class DirPart; -- litteral description
|
||||
class IGESType;
|
||||
|
||||
deferred class FileRecognizer instantiates
|
||||
Recognizer from Interface (IGESType, IGESEntity);
|
||||
|
||||
class IGESWriter;
|
||||
class IGESDumper;
|
||||
class BasicEditor;
|
||||
|
||||
class ToolLocation;
|
||||
|
||||
deferred class GeneralModule;
|
||||
class DefaultGeneral;
|
||||
deferred class ReadWriteModule;
|
||||
deferred class SpecificModule; -- actions specific of IGES (Dump)
|
||||
class DefaultSpecific;
|
||||
class FileProtocol;
|
||||
|
||||
class WriterLib instantiates Library from LibCtl
|
||||
(IGESEntity, ReadWriteModule, Protocol from IGESData);
|
||||
class SpecificLib instantiates Library from LibCtl
|
||||
(IGESEntity, SpecificModule, Protocol from IGESData);
|
||||
|
||||
-- -- Enumerations -- --
|
||||
enumeration Status is
|
||||
EntityOK,
|
||||
EntityError,
|
||||
ReferenceError,
|
||||
TypeError;
|
||||
|
||||
enumeration DefType is DefVoid, DefValue, DefReference,
|
||||
DefAny, ErrorVal, ErrorRef;
|
||||
---Purpose : Some fields of an IGES entity may be
|
||||
-- - Undefined
|
||||
-- - Defined as a positive integer
|
||||
-- - Defined as a reference to a specialized entity.
|
||||
-- A typical example of this kind of variation is color.
|
||||
-- This enumeration allows you to identify which of the above is the case.
|
||||
-- The semantics of the terms are as follows:
|
||||
-- - DefVoid indicates that the item contained in the field is undefined
|
||||
-- - DefValue indicates that the item is defined as an immediate
|
||||
-- positive integer value (i.e. not a pointer)
|
||||
-- - DefReference indicates that the item is defined as an entity
|
||||
-- - DefAny indicates the item could not be determined
|
||||
-- - ErrorVal indicates that the item is defined as an integer
|
||||
-- but its value is incorrect (it could be out of range, for example)
|
||||
-- - ErrorRef indicates that the item is defined as an entity but
|
||||
--- is not of the required type.
|
||||
|
||||
enumeration DefList is DefNone, DefOne, DefSeveral, ErrorOne, ErrorSeveral;
|
||||
---Purpose : Some fields of an IGES entity may be
|
||||
-- - Undefined
|
||||
-- - Defined as a single item
|
||||
-- - Defined as a list of items.
|
||||
-- A typical example, which presents this kind of variation,
|
||||
-- is a level number.
|
||||
-- This enumeration allows you to identify which of the above is the case.
|
||||
-- The semantics of the terms is as follows:
|
||||
-- - DefNone indicates that the list is empty (there is not
|
||||
-- even a single item).
|
||||
-- - DefOne indicates that the list contains a single item.
|
||||
-- - DefSeveral indicates that the list contains several items.
|
||||
-- - ErrorOne indicates that the list contains one item, but
|
||||
-- that this item is incorrect
|
||||
-- - ErrorSeveral indicates that the list contains several
|
||||
-- items, but that at least one of them is incorrect.
|
||||
|
||||
enumeration ReadStage is ReadDir, ReadOwn, ReadAssocs, ReadProps, ReadEnd;
|
||||
---Purpose : gives successive stages of reading an entity (see ParamReader)
|
||||
|
||||
-- -- Instantiations -- --
|
||||
|
||||
imported Array1OfDirPart;
|
||||
|
||||
imported Array1OfIGESEntity;
|
||||
|
||||
imported transient class HArray1OfIGESEntity;
|
||||
|
||||
-- General Routines --
|
||||
-- They encapsulate the general actions required to work with this
|
||||
-- package. While their use is not mandatory, it makes work easier.
|
||||
|
||||
Init;
|
||||
---Purpose : Prepares General dynamic data used for IGESData specifically :
|
||||
-- Protocol and Modules, which treat UndefinedEntity
|
||||
|
||||
Protocol returns Protocol from IGESData;
|
||||
---Purpose : Returns a Protocol from IGESData (avoids to create it)
|
||||
|
||||
end IGESData;
|
@@ -17,27 +17,23 @@
|
||||
//gka 19.01.99 changing date parameters and number of IGES version, adding parameter(ApllicationProtocol)
|
||||
//#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000 and YYYYMMDD.HHMMSS after Y2000)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <IGESData.ixx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_DefaultGeneral.hxx>
|
||||
#include <IGESData_DefaultSpecific.hxx>
|
||||
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Interface_Version.hxx>
|
||||
#include <Message_MsgFile.hxx>
|
||||
#include <OSD_Process.hxx>
|
||||
#include <Quantity_Date.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <OSD_Process.hxx>
|
||||
|
||||
#include <Interface_Version.hxx>
|
||||
#include <Quantity_Date.hxx>
|
||||
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
static Handle(IGESData_Protocol) proto;
|
||||
|
||||
static Handle(IGESData_DefaultGeneral) stmod;
|
||||
|
143
src/IGESData/IGESData.hxx
Normal file
143
src/IGESData/IGESData.hxx
Normal file
@@ -0,0 +1,143 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_HeaderFile
|
||||
#define _IGESData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class IGESData_Protocol;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESModel;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_LineFontEntity;
|
||||
class IGESData_LevelListEntity;
|
||||
class IGESData_TransfEntity;
|
||||
class IGESData_ViewKindEntity;
|
||||
class IGESData_LabelDisplayEntity;
|
||||
class IGESData_ColorEntity;
|
||||
class IGESData_NameEntity;
|
||||
class IGESData_SingleParentEntity;
|
||||
class IGESData_UndefinedEntity;
|
||||
class IGESData_FreeFormatEntity;
|
||||
class IGESData_GlobalSection;
|
||||
class IGESData_DefSwitch;
|
||||
class IGESData_DirChecker;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_IGESReaderTool;
|
||||
class IGESData_ParamReader;
|
||||
class IGESData_ParamCursor;
|
||||
class IGESData_DirPart;
|
||||
class IGESData_IGESType;
|
||||
class IGESData_FileRecognizer;
|
||||
class IGESData_IGESWriter;
|
||||
class IGESData_IGESDumper;
|
||||
class IGESData_BasicEditor;
|
||||
class IGESData_ToolLocation;
|
||||
class IGESData_GeneralModule;
|
||||
class IGESData_DefaultGeneral;
|
||||
class IGESData_ReadWriteModule;
|
||||
class IGESData_SpecificModule;
|
||||
class IGESData_DefaultSpecific;
|
||||
class IGESData_FileProtocol;
|
||||
class IGESData_WriterLib;
|
||||
class IGESData_SpecificLib;
|
||||
class IGESData_GlobalNodeOfWriterLib;
|
||||
class IGESData_NodeOfWriterLib;
|
||||
class IGESData_GlobalNodeOfSpecificLib;
|
||||
class IGESData_NodeOfSpecificLib;
|
||||
|
||||
|
||||
//! basic description of an IGES Interface
|
||||
class IGESData
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Prepares General dynamic data used for IGESData specifically :
|
||||
//! Protocol and Modules, which treat UndefinedEntity
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
//! Returns a Protocol from IGESData (avoids to create it)
|
||||
Standard_EXPORT static Handle(IGESData_Protocol) Protocol();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IGESData_Protocol;
|
||||
friend class IGESData_IGESModel;
|
||||
friend class IGESData_IGESEntity;
|
||||
friend class IGESData_LineFontEntity;
|
||||
friend class IGESData_LevelListEntity;
|
||||
friend class IGESData_TransfEntity;
|
||||
friend class IGESData_ViewKindEntity;
|
||||
friend class IGESData_LabelDisplayEntity;
|
||||
friend class IGESData_ColorEntity;
|
||||
friend class IGESData_NameEntity;
|
||||
friend class IGESData_SingleParentEntity;
|
||||
friend class IGESData_UndefinedEntity;
|
||||
friend class IGESData_FreeFormatEntity;
|
||||
friend class IGESData_GlobalSection;
|
||||
friend class IGESData_DefSwitch;
|
||||
friend class IGESData_DirChecker;
|
||||
friend class IGESData_IGESReaderData;
|
||||
friend class IGESData_IGESReaderTool;
|
||||
friend class IGESData_ParamReader;
|
||||
friend class IGESData_ParamCursor;
|
||||
friend class IGESData_DirPart;
|
||||
friend class IGESData_IGESType;
|
||||
friend class IGESData_FileRecognizer;
|
||||
friend class IGESData_IGESWriter;
|
||||
friend class IGESData_IGESDumper;
|
||||
friend class IGESData_BasicEditor;
|
||||
friend class IGESData_ToolLocation;
|
||||
friend class IGESData_GeneralModule;
|
||||
friend class IGESData_DefaultGeneral;
|
||||
friend class IGESData_ReadWriteModule;
|
||||
friend class IGESData_SpecificModule;
|
||||
friend class IGESData_DefaultSpecific;
|
||||
friend class IGESData_FileProtocol;
|
||||
friend class IGESData_WriterLib;
|
||||
friend class IGESData_SpecificLib;
|
||||
friend class IGESData_GlobalNodeOfWriterLib;
|
||||
friend class IGESData_NodeOfWriterLib;
|
||||
friend class IGESData_GlobalNodeOfSpecificLib;
|
||||
friend class IGESData_NodeOfSpecificLib;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_HeaderFile
|
@@ -1,129 +0,0 @@
|
||||
-- Created on: 1995-08-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 BasicEditor from IGESData
|
||||
|
||||
---Purpose : This class provides various functions of basic edition,
|
||||
-- such as :
|
||||
-- - setting header unit (WARNING : DOES NOT convert entities)
|
||||
-- - computation of the status (Subordinate, UseFlag) of entities
|
||||
-- of IGES Entities on a whole model
|
||||
-- - auto correction of IGES Entities, defined both by DirChecker
|
||||
-- and by specific service AutoCorrect
|
||||
-- (this auto correction performs non-ambigious, rather logic,
|
||||
-- editions)
|
||||
|
||||
uses GeneralLib, SpecificLib,
|
||||
IGESModel, IGESEntity, Protocol from IGESData
|
||||
|
||||
is
|
||||
|
||||
Create returns BasicEditor;
|
||||
---Purpose : Creates an empty Basic Editor which should be initialized via Init() method.
|
||||
|
||||
Create (protocol : Protocol from IGESData) returns BasicEditor;
|
||||
---Purpose : Creates a Basic Editor, with a new IGESModel, ready to run
|
||||
|
||||
Create (model : IGESModel; protocol : Protocol from IGESData)
|
||||
returns BasicEditor;
|
||||
---Purpose : Creates a Basic Editor for IGES Data, ready to run
|
||||
|
||||
Init (me : in out; protocol : Protocol from IGESData);
|
||||
---Purpose : Initialize a Basic Editor, with a new IGESModel, ready to run
|
||||
|
||||
Init (me : in out; model : IGESModel; protocol : Protocol from IGESData);
|
||||
---Purpose : Initialize a Basic Editor for IGES Data, ready to run
|
||||
|
||||
Model (me) returns IGESModel;
|
||||
---Purpose : Returns the designated model
|
||||
|
||||
SetUnitFlag (me : in out; flag : Integer) returns Boolean;
|
||||
---Purpose : Sets a new unit from its flag (param 14 of Global Section)
|
||||
-- Returns True if done, False if <flag> is incorrect
|
||||
|
||||
SetUnitValue (me : in out; val : Real) returns Boolean;
|
||||
---Purpose : Sets a new unit from its value in meters (rounded to the
|
||||
-- closest one, max gap 1%)
|
||||
-- Returns True if done, False if <val> is too far from a
|
||||
-- suitable value
|
||||
|
||||
SetUnitName (me : in out; name : CString) returns Boolean;
|
||||
---Purpose : Sets a new unit from its name (param 15 of Global Section)
|
||||
-- Returns True if done, False if <name> is incorrect
|
||||
-- Remark : if <flag> has been set to 3 (user defined), <name>
|
||||
-- is then free
|
||||
|
||||
ApplyUnit (me : in out; enforce : Boolean = Standard_False);
|
||||
---Purpose : Applies unit value to convert header data : Resolution,
|
||||
-- MaxCoord, MaxLineWeight
|
||||
-- Applies unit only once after SetUnit... has been called,
|
||||
-- if <enforce> is given as True.
|
||||
-- It can be called just before writing the model to a file,
|
||||
-- i.e. when definitive values are finally known
|
||||
|
||||
ComputeStatus (me : in out);
|
||||
---Purpose : Performs the re-computation of status on the whole model
|
||||
-- (Subordinate Status and Use Flag of each IGES Entity), which
|
||||
-- can have required values according the way they are referenced
|
||||
-- (see definitions of Logical use, Physical use, etc...)
|
||||
|
||||
AutoCorrect (me : in out; ent : IGESEntity) returns Boolean;
|
||||
---Purpose : Performs auto-correction on an IGESEntity
|
||||
-- Returns True if something has changed, False if nothing done.
|
||||
--
|
||||
-- Works with the specific IGES Services : DirChecker which
|
||||
-- allows to correct data in "Directory Part" of Entities (such
|
||||
-- as required values for status, or references to be null), and
|
||||
-- the specific IGES service OwnCorrect, which is specialised for
|
||||
-- each type of entity.
|
||||
|
||||
AutoCorrectModel (me : in out) returns Integer;
|
||||
---Purpose : Performs auto-correction on the whole Model
|
||||
-- Returns the count of modified entities
|
||||
|
||||
|
||||
|
||||
UnitNameFlag (myclass; name : CString) returns Integer;
|
||||
---Purpose : From the name of unit, computes flag number, 0 if incorrect
|
||||
-- (in this case, user defined entity remains possible)
|
||||
|
||||
UnitFlagValue (myclass; flag : Integer) returns Real;
|
||||
---Purpose : From the flag of unit, determines value in MM, 0 if incorrect
|
||||
|
||||
UnitFlagName (myclass; flag : Integer) returns CString;
|
||||
---Purpose : From the flag of unit, determines its name, "" if incorrect
|
||||
|
||||
IGESVersionName (myclass; flag : Integer) returns CString;
|
||||
---Purpose : From the flag of IGES version, returns name, "" if incorrect
|
||||
|
||||
IGESVersionMax (myclass) returns Integer;
|
||||
---Purpose : Returns the maximum allowed value for IGESVersion Flag
|
||||
|
||||
DraftingName (myclass; flag : Integer) returns CString;
|
||||
---Purpose : From the flag of drafting standard, returns name, "" if incorrect
|
||||
|
||||
DraftingMax (myclass) returns Integer;
|
||||
---Purpose : Returns the maximum allowed value for Drafting Flag
|
||||
|
||||
fields
|
||||
|
||||
theunit : Boolean;
|
||||
theproto : Protocol from IGESData;
|
||||
themodel : IGESModel;
|
||||
theglib : GeneralLib;
|
||||
theslib : SpecificLib;
|
||||
|
||||
end BasicEditor;
|
@@ -12,30 +12,29 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
//#73 rln 10.03.99 S4135: "read.scale.unit" does not affect GlobalSection
|
||||
#include <IGESData_BasicEditor.ixx>
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <IGESData_GeneralModule.hxx>
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_BasicEditor.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DirChecker.hxx>
|
||||
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <UnitsMethods.hxx>
|
||||
#include <IGESGeom_CurveOnSurface.hxx>
|
||||
#include <IGESData_GeneralModule.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESGeom_Boundary.hxx>
|
||||
|
||||
#include <IGESGeom_CurveOnSurface.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <UnitsMethods.hxx>
|
||||
|
||||
IGESData_BasicEditor::IGESData_BasicEditor(const Handle(IGESData_Protocol)& protocol)
|
||||
{
|
||||
|
163
src/IGESData/IGESData_BasicEditor.hxx
Normal file
163
src/IGESData/IGESData_BasicEditor.hxx
Normal file
@@ -0,0 +1,163 @@
|
||||
// Created on: 1995-08-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 _IGESData_BasicEditor_HeaderFile
|
||||
#define _IGESData_BasicEditor_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESModel;
|
||||
class IGESData_IGESEntity;
|
||||
|
||||
|
||||
//! This class provides various functions of basic edition,
|
||||
//! such as :
|
||||
//! - setting header unit (WARNING : DOES NOT convert entities)
|
||||
//! - computation of the status (Subordinate, UseFlag) of entities
|
||||
//! of IGES Entities on a whole model
|
||||
//! - auto correction of IGES Entities, defined both by DirChecker
|
||||
//! and by specific service AutoCorrect
|
||||
//! (this auto correction performs non-ambigious, rather logic,
|
||||
//! editions)
|
||||
class IGESData_BasicEditor
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates an empty Basic Editor which should be initialized via Init() method.
|
||||
Standard_EXPORT IGESData_BasicEditor();
|
||||
|
||||
//! Creates a Basic Editor, with a new IGESModel, ready to run
|
||||
Standard_EXPORT IGESData_BasicEditor(const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! Creates a Basic Editor for IGES Data, ready to run
|
||||
Standard_EXPORT IGESData_BasicEditor(const Handle(IGESData_IGESModel)& model, const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! Initialize a Basic Editor, with a new IGESModel, ready to run
|
||||
Standard_EXPORT void Init (const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! Initialize a Basic Editor for IGES Data, ready to run
|
||||
Standard_EXPORT void Init (const Handle(IGESData_IGESModel)& model, const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! Returns the designated model
|
||||
Standard_EXPORT Handle(IGESData_IGESModel) Model() const;
|
||||
|
||||
//! Sets a new unit from its flag (param 14 of Global Section)
|
||||
//! Returns True if done, False if <flag> is incorrect
|
||||
Standard_EXPORT Standard_Boolean SetUnitFlag (const Standard_Integer flag);
|
||||
|
||||
//! Sets a new unit from its value in meters (rounded to the
|
||||
//! closest one, max gap 1%)
|
||||
//! Returns True if done, False if <val> is too far from a
|
||||
//! suitable value
|
||||
Standard_EXPORT Standard_Boolean SetUnitValue (const Standard_Real val);
|
||||
|
||||
//! Sets a new unit from its name (param 15 of Global Section)
|
||||
//! Returns True if done, False if <name> is incorrect
|
||||
//! Remark : if <flag> has been set to 3 (user defined), <name>
|
||||
//! is then free
|
||||
Standard_EXPORT Standard_Boolean SetUnitName (const Standard_CString name);
|
||||
|
||||
//! Applies unit value to convert header data : Resolution,
|
||||
//! MaxCoord, MaxLineWeight
|
||||
//! Applies unit only once after SetUnit... has been called,
|
||||
//! if <enforce> is given as True.
|
||||
//! It can be called just before writing the model to a file,
|
||||
//! i.e. when definitive values are finally known
|
||||
Standard_EXPORT void ApplyUnit (const Standard_Boolean enforce = Standard_False);
|
||||
|
||||
//! Performs the re-computation of status on the whole model
|
||||
//! (Subordinate Status and Use Flag of each IGES Entity), which
|
||||
//! can have required values according the way they are referenced
|
||||
//! (see definitions of Logical use, Physical use, etc...)
|
||||
Standard_EXPORT void ComputeStatus();
|
||||
|
||||
//! Performs auto-correction on an IGESEntity
|
||||
//! Returns True if something has changed, False if nothing done.
|
||||
//!
|
||||
//! Works with the specific IGES Services : DirChecker which
|
||||
//! allows to correct data in "Directory Part" of Entities (such
|
||||
//! as required values for status, or references to be null), and
|
||||
//! the specific IGES service OwnCorrect, which is specialised for
|
||||
//! each type of entity.
|
||||
Standard_EXPORT Standard_Boolean AutoCorrect (const Handle(IGESData_IGESEntity)& ent);
|
||||
|
||||
//! Performs auto-correction on the whole Model
|
||||
//! Returns the count of modified entities
|
||||
Standard_EXPORT Standard_Integer AutoCorrectModel();
|
||||
|
||||
//! From the name of unit, computes flag number, 0 if incorrect
|
||||
//! (in this case, user defined entity remains possible)
|
||||
Standard_EXPORT static Standard_Integer UnitNameFlag (const Standard_CString name);
|
||||
|
||||
//! From the flag of unit, determines value in MM, 0 if incorrect
|
||||
Standard_EXPORT static Standard_Real UnitFlagValue (const Standard_Integer flag);
|
||||
|
||||
//! From the flag of unit, determines its name, "" if incorrect
|
||||
Standard_EXPORT static Standard_CString UnitFlagName (const Standard_Integer flag);
|
||||
|
||||
//! From the flag of IGES version, returns name, "" if incorrect
|
||||
Standard_EXPORT static Standard_CString IGESVersionName (const Standard_Integer flag);
|
||||
|
||||
//! Returns the maximum allowed value for IGESVersion Flag
|
||||
Standard_EXPORT static Standard_Integer IGESVersionMax();
|
||||
|
||||
//! From the flag of drafting standard, returns name, "" if incorrect
|
||||
Standard_EXPORT static Standard_CString DraftingName (const Standard_Integer flag);
|
||||
|
||||
//! Returns the maximum allowed value for Drafting Flag
|
||||
Standard_EXPORT static Standard_Integer DraftingMax();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean theunit;
|
||||
Handle(IGESData_Protocol) theproto;
|
||||
Handle(IGESData_IGESModel) themodel;
|
||||
Interface_GeneralLib theglib;
|
||||
IGESData_SpecificLib theslib;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_BasicEditor_HeaderFile
|
@@ -1,24 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
deferred class ColorEntity from IGESData inherits IGESEntity
|
||||
|
||||
---Purpose : defines required type for Color in directory part
|
||||
-- an effective Color entity must inherits it
|
||||
|
||||
is
|
||||
|
||||
end ColorEntity;
|
@@ -11,5 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_ColorEntity.ixx>
|
||||
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
// ColorEntity ne sert qu'au controle de type (entite Color du directory part)
|
||||
|
60
src/IGESData/IGESData_ColorEntity.hxx
Normal file
60
src/IGESData/IGESData_ColorEntity.hxx
Normal file
@@ -0,0 +1,60 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_ColorEntity_HeaderFile
|
||||
#define _IGESData_ColorEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
|
||||
|
||||
class IGESData_ColorEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_ColorEntity, IGESData_IGESEntity)
|
||||
|
||||
//! defines required type for Color in directory part
|
||||
//! an effective Color entity must inherits it
|
||||
class IGESData_ColorEntity : public IGESData_IGESEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_ColorEntity,IGESData_IGESEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_ColorEntity_HeaderFile
|
45
src/IGESData/IGESData_DefList.hxx
Normal file
45
src/IGESData/IGESData_DefList.hxx
Normal file
@@ -0,0 +1,45 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_DefList_HeaderFile
|
||||
#define _IGESData_DefList_HeaderFile
|
||||
|
||||
//! Some fields of an IGES entity may be
|
||||
//! - Undefined
|
||||
//! - Defined as a single item
|
||||
//! - Defined as a list of items.
|
||||
//! A typical example, which presents this kind of variation,
|
||||
//! is a level number.
|
||||
//! This enumeration allows you to identify which of the above is the case.
|
||||
//! The semantics of the terms is as follows:
|
||||
//! - DefNone indicates that the list is empty (there is not
|
||||
//! even a single item).
|
||||
//! - DefOne indicates that the list contains a single item.
|
||||
//! - DefSeveral indicates that the list contains several items.
|
||||
//! - ErrorOne indicates that the list contains one item, but
|
||||
//! that this item is incorrect
|
||||
//! - ErrorSeveral indicates that the list contains several
|
||||
//! items, but that at least one of them is incorrect.
|
||||
enum IGESData_DefList
|
||||
{
|
||||
IGESData_DefNone,
|
||||
IGESData_DefOne,
|
||||
IGESData_DefSeveral,
|
||||
IGESData_ErrorOne,
|
||||
IGESData_ErrorSeveral
|
||||
};
|
||||
|
||||
#endif // _IGESData_DefList_HeaderFile
|
@@ -1,51 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class DefSwitch from IGESData
|
||||
|
||||
---Purpose : description of a directory componant which can be either
|
||||
-- undefined (let Void), defined as a Reference to an entity,
|
||||
-- or as a Rank, integer value adressing a builtin table
|
||||
-- The entity reference is not included here, only reference
|
||||
-- status is kept (because entity type must be adapted)
|
||||
|
||||
uses Integer, DefType
|
||||
|
||||
is
|
||||
|
||||
Create returns DefSwitch;
|
||||
---Purpose : creates a DefSwitch as Void
|
||||
|
||||
SetVoid (me : in out) is static;
|
||||
---Purpose : sets DefSwitch to "Void" status (in file : Integer = 0)
|
||||
|
||||
SetReference (me : in out) is static;
|
||||
---Purpose : sets DefSwitch to "Reference" Status (in file : Integer < 0)
|
||||
|
||||
SetRank (me : in out; val : Integer) is static;
|
||||
---Purpose : sets DefSwitch to "Rank" with a Value (in file : Integer > 0)
|
||||
|
||||
DefType (me) returns DefType is static;
|
||||
---Purpose : returns DefType status (Void,Reference,Rank)
|
||||
|
||||
Value (me) returns Integer is static;
|
||||
---Purpose : returns Value as Integer (sensefull for a Rank)
|
||||
|
||||
fields
|
||||
|
||||
theval : Integer;
|
||||
|
||||
end DefSwitch;
|
@@ -11,13 +11,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_DefSwitch.ixx>
|
||||
|
||||
#include <IGESData_DefSwitch.hxx>
|
||||
|
||||
// DefSwitch : represente une definition, soit vide (-> valeur = 0),
|
||||
// soit comme rang dans une table (-> valeur > 0 ce rang),
|
||||
// soit comme reference (-> valeur < 0), la reference elle-meme est ailleurs
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : IGESData_DefSwitch
|
||||
//purpose : Default constructor.
|
||||
|
82
src/IGESData/IGESData_DefSwitch.hxx
Normal file
82
src/IGESData/IGESData_DefSwitch.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_DefSwitch_HeaderFile
|
||||
#define _IGESData_DefSwitch_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IGESData_DefType.hxx>
|
||||
|
||||
|
||||
//! description of a directory componant which can be either
|
||||
//! undefined (let Void), defined as a Reference to an entity,
|
||||
//! or as a Rank, integer value adressing a builtin table
|
||||
//! The entity reference is not included here, only reference
|
||||
//! status is kept (because entity type must be adapted)
|
||||
class IGESData_DefSwitch
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates a DefSwitch as Void
|
||||
Standard_EXPORT IGESData_DefSwitch();
|
||||
|
||||
//! sets DefSwitch to "Void" status (in file : Integer = 0)
|
||||
Standard_EXPORT void SetVoid();
|
||||
|
||||
//! sets DefSwitch to "Reference" Status (in file : Integer < 0)
|
||||
Standard_EXPORT void SetReference();
|
||||
|
||||
//! sets DefSwitch to "Rank" with a Value (in file : Integer > 0)
|
||||
Standard_EXPORT void SetRank (const Standard_Integer val);
|
||||
|
||||
//! returns DefType status (Void,Reference,Rank)
|
||||
Standard_EXPORT IGESData_DefType DefType() const;
|
||||
|
||||
//! returns Value as Integer (sensefull for a Rank)
|
||||
Standard_EXPORT Standard_Integer Value() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer theval;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_DefSwitch_HeaderFile
|
46
src/IGESData/IGESData_DefType.hxx
Normal file
46
src/IGESData/IGESData_DefType.hxx
Normal file
@@ -0,0 +1,46 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_DefType_HeaderFile
|
||||
#define _IGESData_DefType_HeaderFile
|
||||
|
||||
//! Some fields of an IGES entity may be
|
||||
//! - Undefined
|
||||
//! - Defined as a positive integer
|
||||
//! - Defined as a reference to a specialized entity.
|
||||
//! A typical example of this kind of variation is color.
|
||||
//! This enumeration allows you to identify which of the above is the case.
|
||||
//! The semantics of the terms are as follows:
|
||||
//! - DefVoid indicates that the item contained in the field is undefined
|
||||
//! - DefValue indicates that the item is defined as an immediate
|
||||
//! positive integer value (i.e. not a pointer)
|
||||
//! - DefReference indicates that the item is defined as an entity
|
||||
//! - DefAny indicates the item could not be determined
|
||||
//! - ErrorVal indicates that the item is defined as an integer
|
||||
//! but its value is incorrect (it could be out of range, for example)
|
||||
//! - ErrorRef indicates that the item is defined as an entity but
|
||||
//! is not of the required type.
|
||||
enum IGESData_DefType
|
||||
{
|
||||
IGESData_DefVoid,
|
||||
IGESData_DefValue,
|
||||
IGESData_DefReference,
|
||||
IGESData_DefAny,
|
||||
IGESData_ErrorVal,
|
||||
IGESData_ErrorRef
|
||||
};
|
||||
|
||||
#endif // _IGESData_DefType_HeaderFile
|
@@ -1,57 +0,0 @@
|
||||
-- Created on: 1993-09-08
|
||||
-- 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 IGESData inherits GeneralModule from IGESData
|
||||
|
||||
---Purpose : Processes the specific case of UndefinedEntity from IGESData
|
||||
-- (Case Number 1)
|
||||
|
||||
uses OStream, Transient,
|
||||
InterfaceModel, Check, ShareTool, EntityIterator, CopyTool,
|
||||
IGESEntity, DirChecker
|
||||
|
||||
is
|
||||
|
||||
Create returns DefaultGeneral;
|
||||
---Purpose : Creates a DefaultGeneral and puts it into GeneralLib,
|
||||
-- bound with a Protocol from IGESData
|
||||
|
||||
OwnSharedCase (me; CN : Integer; ent : IGESEntity;
|
||||
iter : in out EntityIterator);
|
||||
---Purpose : Lists the Entities shared by an IGESEntity, which must be
|
||||
-- an UndefinedEntity
|
||||
|
||||
|
||||
DirChecker (me; CN : Integer; ent : IGESEntity) returns DirChecker;
|
||||
---Purpose : Returns a DirChecker, specific for each type of Entity
|
||||
-- Here, Returns an empty DirChecker (no constraint to check)
|
||||
|
||||
OwnCheckCase (me; CN : Integer; ent : IGESEntity; shares : ShareTool;
|
||||
ach : in out Check);
|
||||
---Purpose : Performs Specific Semantic Check for each type of Entity
|
||||
-- Here, does nothing (no constraint to check)
|
||||
|
||||
|
||||
NewVoid (me; CN : Integer; entto : out Transient)
|
||||
returns Boolean;
|
||||
---Purpose : Specific creation of a new void entity (UndefinedEntity only)
|
||||
|
||||
OwnCopyCase (me; CN : Integer;
|
||||
entfrom : IGESEntity; entto : IGESEntity;
|
||||
TC : in out CopyTool);
|
||||
---Purpose : Copies parameters which are specific of each Type of Entity
|
||||
|
||||
end DefaultGeneral;
|
@@ -11,17 +11,24 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_DefaultGeneral.ixx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <IGESData_FreeFormatEntity.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_DefaultGeneral.hxx>
|
||||
#include <IGESData_DirChecker.hxx>
|
||||
#include <IGESData_FreeFormatEntity.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CopyTool.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
|
||||
IGESData_DefaultGeneral::IGESData_DefaultGeneral ()
|
||||
{ Interface_GeneralLib::SetGlobal(this, IGESData::Protocol()); }
|
||||
|
91
src/IGESData/IGESData_DefaultGeneral.hxx
Normal file
91
src/IGESData/IGESData_DefaultGeneral.hxx
Normal file
@@ -0,0 +1,91 @@
|
||||
// Created on: 1993-09-08
|
||||
// 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 _IGESData_DefaultGeneral_HeaderFile
|
||||
#define _IGESData_DefaultGeneral_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_GeneralModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IGESData_IGESEntity;
|
||||
class Interface_EntityIterator;
|
||||
class IGESData_DirChecker;
|
||||
class Interface_ShareTool;
|
||||
class Interface_Check;
|
||||
class Standard_Transient;
|
||||
class Interface_CopyTool;
|
||||
|
||||
|
||||
class IGESData_DefaultGeneral;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_DefaultGeneral, IGESData_GeneralModule)
|
||||
|
||||
//! Processes the specific case of UndefinedEntity from IGESData
|
||||
//! (Case Number 1)
|
||||
class IGESData_DefaultGeneral : public IGESData_GeneralModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a DefaultGeneral and puts it into GeneralLib,
|
||||
//! bound with a Protocol from IGESData
|
||||
Standard_EXPORT IGESData_DefaultGeneral();
|
||||
|
||||
//! Lists the Entities shared by an IGESEntity, which must be
|
||||
//! an UndefinedEntity
|
||||
Standard_EXPORT void OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const;
|
||||
|
||||
//! Returns a DirChecker, specific for each type of Entity
|
||||
//! Here, Returns an empty DirChecker (no constraint to check)
|
||||
Standard_EXPORT IGESData_DirChecker DirChecker (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! Performs Specific Semantic Check for each type of Entity
|
||||
//! Here, does nothing (no constraint to check)
|
||||
Standard_EXPORT void OwnCheckCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const;
|
||||
|
||||
//! Specific creation of a new void entity (UndefinedEntity only)
|
||||
Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const;
|
||||
|
||||
//! Copies parameters which are specific of each Type of Entity
|
||||
Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_DefaultGeneral,IGESData_GeneralModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_DefaultGeneral_HeaderFile
|
@@ -1,35 +0,0 @@
|
||||
-- Created on: 1993-09-08
|
||||
-- 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 DefaultSpecific from IGESData inherits SpecificModule
|
||||
|
||||
---Purpose : Specific IGES Services for UndefinedEntity, FreeFormatEntity
|
||||
|
||||
uses IGESEntity, IGESDumper,
|
||||
Messenger from Message
|
||||
|
||||
is
|
||||
|
||||
Create returns DefaultSpecific;
|
||||
---Purpose : Creates a DefaultSpecific and puts it into SpecificLib
|
||||
|
||||
OwnDump (me; CN : Integer; ent : IGESEntity;
|
||||
dumper : IGESDumper; S : Messenger from Message; own : Integer);
|
||||
---Purpose : Specific Dump for UndefinedEntity : it concerns only
|
||||
-- own parameters, the general data (Directory Part, Lists) are
|
||||
-- taken into account by the IGESDumper
|
||||
|
||||
end DefaultSpecific;
|
@@ -11,16 +11,19 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_DefaultSpecific.ixx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_DefaultSpecific.hxx>
|
||||
#include <IGESData_IGESDumper.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IGESData_DefaultSpecific::IGESData_DefaultSpecific ()
|
||||
{ IGESData_SpecificLib::SetGlobal(this, IGESData::Protocol()); }
|
||||
|
71
src/IGESData/IGESData_DefaultSpecific.hxx
Normal file
71
src/IGESData/IGESData_DefaultSpecific.hxx
Normal file
@@ -0,0 +1,71 @@
|
||||
// Created on: 1993-09-08
|
||||
// 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 _IGESData_DefaultSpecific_HeaderFile
|
||||
#define _IGESData_DefaultSpecific_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_IGESDumper;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
class IGESData_DefaultSpecific;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_DefaultSpecific, IGESData_SpecificModule)
|
||||
|
||||
//! Specific IGES Services for UndefinedEntity, FreeFormatEntity
|
||||
class IGESData_DefaultSpecific : public IGESData_SpecificModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a DefaultSpecific and puts it into SpecificLib
|
||||
Standard_EXPORT IGESData_DefaultSpecific();
|
||||
|
||||
//! Specific Dump for UndefinedEntity : it concerns only
|
||||
//! own parameters, the general data (Directory Part, Lists) are
|
||||
//! taken into account by the IGESDumper
|
||||
Standard_EXPORT void OwnDump (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_DefaultSpecific,IGESData_SpecificModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_DefaultSpecific_HeaderFile
|
@@ -1,164 +0,0 @@
|
||||
-- Created on: 1992-11-10
|
||||
-- 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.
|
||||
|
||||
class DirChecker from IGESData
|
||||
|
||||
---Purpose : This class centralizes general Checks upon an IGES Entity's
|
||||
-- Directory Part. That is : such field Ignored or Required,
|
||||
-- or Required with a given Value (for an Integer field)
|
||||
-- More precise checks can be performed as necessary, by each
|
||||
-- Entity (method OwnCheck).
|
||||
--
|
||||
-- Each class of Entity defines its DirChecker (method DirChecker)
|
||||
-- and the DirChecker is able to perform its Checks on an Entity
|
||||
--
|
||||
-- A Required Value or presence of a field causes a Fail Message
|
||||
-- if criterium is not satisfied
|
||||
-- An Ignored field causes a Correction Message if the field is
|
||||
-- not null/zero
|
||||
|
||||
uses Integer, Check, IGESEntity, DefType
|
||||
|
||||
is
|
||||
|
||||
Create returns DirChecker;
|
||||
---Purpose : Returns a DirChecker, with no criterium at all to be checked
|
||||
|
||||
Create (atype : Integer) returns DirChecker;
|
||||
---Purpose : Returns a DirChecker, with no criterium except Required Type
|
||||
|
||||
Create (atype, aform : Integer) returns DirChecker;
|
||||
---Purpose : Returns a DirChecker, with no criterium except Required values
|
||||
-- for Type and Form numbers
|
||||
|
||||
Create (atype, aform1, aform2 : Integer) returns DirChecker;
|
||||
---Purpose : Returns a DirChecker, with no criterium except Required values
|
||||
-- for Type number (atype), and Required Range for Form number
|
||||
-- (which must be between aform1 and aform2 included)
|
||||
|
||||
IsSet (me) returns Boolean is static;
|
||||
---Purpose : Returns True if at least one criterium has already been set
|
||||
-- Allows user to store a DirChecker (static variable) then ask
|
||||
-- if it has been set before setting it
|
||||
|
||||
SetDefault (me : in out) is static;
|
||||
---Purpose : Sets a DirChecker with most current criteria, that is :
|
||||
-- Structure Ignored ( worths call Structure(crit = DefVoid) )
|
||||
|
||||
Structure (me : in out; crit : DefType) is static;
|
||||
---Purpose : Sets Structure criterium.
|
||||
-- If crit is DefVoid, Ignored : should not be defined
|
||||
-- If crit is DefReference, Required : must be defined
|
||||
-- Other values are not taken in account
|
||||
|
||||
LineFont (me : in out; crit : DefType) is static;
|
||||
---Purpose : Sets LineFont criterium
|
||||
-- If crit is DefVoid, Ignored : should not be defined
|
||||
-- If crit is DefAny, Required : must be defined (value or ref)
|
||||
-- If crit is DefValue, Required as a Value (error if Reference)
|
||||
-- Other values are not taken in account
|
||||
|
||||
LineWeight (me : in out; crit : DefType) is static;
|
||||
---Purpose : Sets LineWeight criterium
|
||||
-- If crit is DefVoid, Ignored : should not be defined
|
||||
-- If crit is DefValue, Required
|
||||
-- Other values are not taken in account
|
||||
|
||||
Color (me : in out; crit : DefType) is static;
|
||||
---Purpose : Sets Color criterium
|
||||
-- If crit is DefVoid, Ignored : should not be defined
|
||||
-- If crit is DefAny, Required : must be defined (value or ref)
|
||||
-- Other values are not taken in account
|
||||
|
||||
GraphicsIgnored (me : in out; hierarchy : Integer = -1) is static;
|
||||
---Purpose : Sets Graphics data (LineFont, LineWeight, Color, Level, View)
|
||||
-- to be ignored according value of Hierarchy status :
|
||||
-- If hierarchy is not given, they are Ignored any way
|
||||
-- (that is, they should not be defined)
|
||||
-- If hierarchy is given, Graphics are Ignored if the Hierarchy
|
||||
-- status has the value given in argument "hierarchy"
|
||||
|
||||
|
||||
BlankStatusIgnored (me : in out) is static;
|
||||
---Purpose : Sets Blank Status to be ignored
|
||||
-- (should not be defined, or its value should be 0)
|
||||
|
||||
BlankStatusRequired (me : in out; val : Integer) is static;
|
||||
---Purpose : Sets Blank Status to be required at a given value
|
||||
|
||||
SubordinateStatusIgnored (me : in out) is static;
|
||||
---Purpose : Sets Subordinate Status to be ignored
|
||||
-- (should not be defined, or its value should be 0)
|
||||
|
||||
SubordinateStatusRequired (me : in out; val : Integer) is static;
|
||||
---Purpose : Sets Subordinate Status to be required at a given value
|
||||
|
||||
UseFlagIgnored (me : in out) is static;
|
||||
---Purpose : Sets Blank Status to be ignored
|
||||
-- (should not be defined, or its value should be 0)
|
||||
|
||||
UseFlagRequired (me : in out; val : Integer) is static;
|
||||
---Purpose : Sets Blank Status to be required at a given value
|
||||
-- Give -1 to demand UseFlag not zero (but no precise value req.)
|
||||
|
||||
HierarchyStatusIgnored (me : in out) is static;
|
||||
---Purpose : Sets Hierarchy Status to be ignored
|
||||
-- (should not be defined, or its value should be 0)
|
||||
|
||||
HierarchyStatusRequired (me : in out; val : Integer) is static;
|
||||
---Purpose : Sets Hierarchy Status to be required at a given value
|
||||
|
||||
-- -- Checking -- --
|
||||
|
||||
Check (me; ach : in out Check; ent : IGESEntity) is static;
|
||||
---Purpose : Performs the Checks on an IGESEntity, according to the
|
||||
-- recorded criteria
|
||||
-- In addition, does minimal Checks, such as admitted range for
|
||||
-- Status, or presence of Error status in some data (Color, ...)
|
||||
|
||||
CheckTypeAndForm (me; ach : in out Check; ent : IGESEntity) is static;
|
||||
---Purpose : Performs a Check only on Values of Type Number and Form Number
|
||||
-- This allows to do a check on an Entity not yet completely
|
||||
-- filled but of which Type and Form Number have been already set
|
||||
|
||||
Correct (me; ent : IGESEntity) returns Boolean is static;
|
||||
---Purpose : Corrects the Directory Entry of an IGES Entity as far as it is
|
||||
-- possible according recorded criteria without any ambiguity :
|
||||
-- - if a numeric Status is required a given value, this value is
|
||||
-- enforced
|
||||
-- - if an item is required to be Void, or if it recorded as
|
||||
-- Erroneous, it is cleared (set to Void)
|
||||
-- - Type Number is enforced
|
||||
-- - finally Form Number is enforced only if one and only Value
|
||||
-- is admitted (no range, see Constructors of DirChecker)
|
||||
|
||||
fields
|
||||
|
||||
isitset : Boolean; -- allows user to test if a DirChecked is set or not
|
||||
thetype : Integer;
|
||||
theform1 : Integer;
|
||||
theform2 : Integer;
|
||||
thestructure : DefType;
|
||||
thelinefont : DefType;
|
||||
thelineweig : DefType;
|
||||
thecolor : DefType;
|
||||
thegraphier : Integer; -- (graphics/heirarchy)
|
||||
theblankst : Integer;
|
||||
thesubordst : Integer;
|
||||
theuseflag : Integer;
|
||||
thehierst : Integer;
|
||||
|
||||
end DirChecker;
|
@@ -11,28 +11,26 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_DirChecker.ixx>
|
||||
#include <IGESData_DefList.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
// Pour Correct :
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DefList.hxx>
|
||||
#include <IGESData_DirChecker.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
|
||||
// MGE 23/07/98
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
// Pour Correct :
|
||||
// MGE 23/07/98
|
||||
// Chaque critere est par defaut inhibe
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : IGESData_DirChecker
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
IGESData_DirChecker::IGESData_DirChecker ()
|
||||
{
|
||||
thetype = theform1 = theform2 = 0;
|
||||
|
195
src/IGESData/IGESData_DirChecker.hxx
Normal file
195
src/IGESData/IGESData_DirChecker.hxx
Normal file
@@ -0,0 +1,195 @@
|
||||
// Created on: 1992-11-10
|
||||
// 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 _IGESData_DirChecker_HeaderFile
|
||||
#define _IGESData_DirChecker_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IGESData_DefType.hxx>
|
||||
class Interface_Check;
|
||||
class IGESData_IGESEntity;
|
||||
|
||||
|
||||
//! This class centralizes general Checks upon an IGES Entity's
|
||||
//! Directory Part. That is : such field Ignored or Required,
|
||||
//! or Required with a given Value (for an Integer field)
|
||||
//! More precise checks can be performed as necessary, by each
|
||||
//! Entity (method OwnCheck).
|
||||
//!
|
||||
//! Each class of Entity defines its DirChecker (method DirChecker)
|
||||
//! and the DirChecker is able to perform its Checks on an Entity
|
||||
//!
|
||||
//! A Required Value or presence of a field causes a Fail Message
|
||||
//! if criterium is not satisfied
|
||||
//! An Ignored field causes a Correction Message if the field is
|
||||
//! not null/zero
|
||||
class IGESData_DirChecker
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a DirChecker, with no criterium at all to be checked
|
||||
Standard_EXPORT IGESData_DirChecker();
|
||||
|
||||
//! Returns a DirChecker, with no criterium except Required Type
|
||||
Standard_EXPORT IGESData_DirChecker(const Standard_Integer atype);
|
||||
|
||||
//! Returns a DirChecker, with no criterium except Required values
|
||||
//! for Type and Form numbers
|
||||
Standard_EXPORT IGESData_DirChecker(const Standard_Integer atype, const Standard_Integer aform);
|
||||
|
||||
//! Returns a DirChecker, with no criterium except Required values
|
||||
//! for Type number (atype), and Required Range for Form number
|
||||
//! (which must be between aform1 and aform2 included)
|
||||
Standard_EXPORT IGESData_DirChecker(const Standard_Integer atype, const Standard_Integer aform1, const Standard_Integer aform2);
|
||||
|
||||
//! Returns True if at least one criterium has already been set
|
||||
//! Allows user to store a DirChecker (static variable) then ask
|
||||
//! if it has been set before setting it
|
||||
Standard_EXPORT Standard_Boolean IsSet() const;
|
||||
|
||||
//! Sets a DirChecker with most current criteria, that is :
|
||||
//! Structure Ignored ( worths call Structure(crit = DefVoid) )
|
||||
Standard_EXPORT void SetDefault();
|
||||
|
||||
//! Sets Structure criterium.
|
||||
//! If crit is DefVoid, Ignored : should not be defined
|
||||
//! If crit is DefReference, Required : must be defined
|
||||
//! Other values are not taken in account
|
||||
Standard_EXPORT void Structure (const IGESData_DefType crit);
|
||||
|
||||
//! Sets LineFont criterium
|
||||
//! If crit is DefVoid, Ignored : should not be defined
|
||||
//! If crit is DefAny, Required : must be defined (value or ref)
|
||||
//! If crit is DefValue, Required as a Value (error if Reference)
|
||||
//! Other values are not taken in account
|
||||
Standard_EXPORT void LineFont (const IGESData_DefType crit);
|
||||
|
||||
//! Sets LineWeight criterium
|
||||
//! If crit is DefVoid, Ignored : should not be defined
|
||||
//! If crit is DefValue, Required
|
||||
//! Other values are not taken in account
|
||||
Standard_EXPORT void LineWeight (const IGESData_DefType crit);
|
||||
|
||||
//! Sets Color criterium
|
||||
//! If crit is DefVoid, Ignored : should not be defined
|
||||
//! If crit is DefAny, Required : must be defined (value or ref)
|
||||
//! Other values are not taken in account
|
||||
Standard_EXPORT void Color (const IGESData_DefType crit);
|
||||
|
||||
//! Sets Graphics data (LineFont, LineWeight, Color, Level, View)
|
||||
//! to be ignored according value of Hierarchy status :
|
||||
//! If hierarchy is not given, they are Ignored any way
|
||||
//! (that is, they should not be defined)
|
||||
//! If hierarchy is given, Graphics are Ignored if the Hierarchy
|
||||
//! status has the value given in argument "hierarchy"
|
||||
Standard_EXPORT void GraphicsIgnored (const Standard_Integer hierarchy = -1);
|
||||
|
||||
//! Sets Blank Status to be ignored
|
||||
//! (should not be defined, or its value should be 0)
|
||||
Standard_EXPORT void BlankStatusIgnored();
|
||||
|
||||
//! Sets Blank Status to be required at a given value
|
||||
Standard_EXPORT void BlankStatusRequired (const Standard_Integer val);
|
||||
|
||||
//! Sets Subordinate Status to be ignored
|
||||
//! (should not be defined, or its value should be 0)
|
||||
Standard_EXPORT void SubordinateStatusIgnored();
|
||||
|
||||
//! Sets Subordinate Status to be required at a given value
|
||||
Standard_EXPORT void SubordinateStatusRequired (const Standard_Integer val);
|
||||
|
||||
//! Sets Blank Status to be ignored
|
||||
//! (should not be defined, or its value should be 0)
|
||||
Standard_EXPORT void UseFlagIgnored();
|
||||
|
||||
//! Sets Blank Status to be required at a given value
|
||||
//! Give -1 to demand UseFlag not zero (but no precise value req.)
|
||||
Standard_EXPORT void UseFlagRequired (const Standard_Integer val);
|
||||
|
||||
//! Sets Hierarchy Status to be ignored
|
||||
//! (should not be defined, or its value should be 0)
|
||||
Standard_EXPORT void HierarchyStatusIgnored();
|
||||
|
||||
//! Sets Hierarchy Status to be required at a given value
|
||||
Standard_EXPORT void HierarchyStatusRequired (const Standard_Integer val);
|
||||
|
||||
//! Performs the Checks on an IGESEntity, according to the
|
||||
//! recorded criteria
|
||||
//! In addition, does minimal Checks, such as admitted range for
|
||||
//! Status, or presence of Error status in some data (Color, ...)
|
||||
Standard_EXPORT void Check (Handle(Interface_Check)& ach, const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! Performs a Check only on Values of Type Number and Form Number
|
||||
//! This allows to do a check on an Entity not yet completely
|
||||
//! filled but of which Type and Form Number have been already set
|
||||
Standard_EXPORT void CheckTypeAndForm (Handle(Interface_Check)& ach, const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! Corrects the Directory Entry of an IGES Entity as far as it is
|
||||
//! possible according recorded criteria without any ambiguity :
|
||||
//! - if a numeric Status is required a given value, this value is
|
||||
//! enforced
|
||||
//! - if an item is required to be Void, or if it recorded as
|
||||
//! Erroneous, it is cleared (set to Void)
|
||||
//! - Type Number is enforced
|
||||
//! - finally Form Number is enforced only if one and only Value
|
||||
//! is admitted (no range, see Constructors of DirChecker)
|
||||
Standard_EXPORT Standard_Boolean Correct (const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean isitset;
|
||||
Standard_Integer thetype;
|
||||
Standard_Integer theform1;
|
||||
Standard_Integer theform2;
|
||||
IGESData_DefType thestructure;
|
||||
IGESData_DefType thelinefont;
|
||||
IGESData_DefType thelineweig;
|
||||
IGESData_DefType thecolor;
|
||||
Standard_Integer thegraphier;
|
||||
Standard_Integer theblankst;
|
||||
Standard_Integer thesubordst;
|
||||
Standard_Integer theuseflag;
|
||||
Standard_Integer thehierst;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_DirChecker_HeaderFile
|
@@ -1,51 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class DirPart from IGESData -- for Array
|
||||
|
||||
---Purpose : litteral/numeric description of an entity's directory section,
|
||||
-- taken from file
|
||||
|
||||
uses Integer, Character, IGESType
|
||||
|
||||
is
|
||||
|
||||
Create returns DirPart;
|
||||
---Purpose : creates an empty DirPart, ready to be filled by Init
|
||||
|
||||
Init (me : in out;
|
||||
i1,i2,i3,i4,i5,i6,i7,i8,i9,i19,i11,i12,i13,i14,i15,i16,i17 : Integer;
|
||||
res1,res2,label,subscript : CString) is static;
|
||||
---Purpose : fills DirPart with consistant data read from file
|
||||
|
||||
Values (me;
|
||||
i1,i2,i3,i4,i5,i6,i7,i8,i9,i19,i11,i12,i13,i14,i15,i16,i17 : out Integer;
|
||||
res1,res2,label,subscript : CString) is static;
|
||||
---Purpose : returns values recorded in DirPart
|
||||
-- (content of cstrings are modified)
|
||||
|
||||
Type (me) returns IGESType is static;
|
||||
---Purpose : returns "type" and "form" info, used to recognize the entity
|
||||
|
||||
fields
|
||||
|
||||
thevals : Integer[17];
|
||||
theres1 : Character[10];
|
||||
theres2 : Character[10];
|
||||
thelabl : Character[10];
|
||||
thesubs : Character[10];
|
||||
|
||||
end DirPart;
|
@@ -11,11 +11,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_DirPart.ixx>
|
||||
|
||||
#include <IGESData_DirPart.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <Standard_PCharacter.hxx>
|
||||
|
||||
|
||||
|
||||
IGESData_DirPart::IGESData_DirPart () { }
|
||||
|
||||
void IGESData_DirPart::Init
|
||||
|
80
src/IGESData/IGESData_DirPart.hxx
Normal file
80
src/IGESData/IGESData_DirPart.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_DirPart_HeaderFile
|
||||
#define _IGESData_DirPart_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Character.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class IGESData_IGESType;
|
||||
|
||||
|
||||
//! litteral/numeric description of an entity's directory section,
|
||||
//! taken from file
|
||||
class IGESData_DirPart
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates an empty DirPart, ready to be filled by Init
|
||||
Standard_EXPORT IGESData_DirPart();
|
||||
|
||||
//! fills DirPart with consistant data read from file
|
||||
Standard_EXPORT void Init (const Standard_Integer i1, const Standard_Integer i2, const Standard_Integer i3, const Standard_Integer i4, const Standard_Integer i5, const Standard_Integer i6, const Standard_Integer i7, const Standard_Integer i8, const Standard_Integer i9, const Standard_Integer i19, const Standard_Integer i11, const Standard_Integer i12, const Standard_Integer i13, const Standard_Integer i14, const Standard_Integer i15, const Standard_Integer i16, const Standard_Integer i17, const Standard_CString res1, const Standard_CString res2, const Standard_CString label, const Standard_CString subscript);
|
||||
|
||||
//! returns values recorded in DirPart
|
||||
//! (content of cstrings are modified)
|
||||
Standard_EXPORT void Values (Standard_Integer& i1, Standard_Integer& i2, Standard_Integer& i3, Standard_Integer& i4, Standard_Integer& i5, Standard_Integer& i6, Standard_Integer& i7, Standard_Integer& i8, Standard_Integer& i9, Standard_Integer& i19, Standard_Integer& i11, Standard_Integer& i12, Standard_Integer& i13, Standard_Integer& i14, Standard_Integer& i15, Standard_Integer& i16, Standard_Integer& i17, const Standard_CString res1, const Standard_CString res2, const Standard_CString label, const Standard_CString subscript) const;
|
||||
|
||||
//! returns "type" and "form" info, used to recognize the entity
|
||||
Standard_EXPORT IGESData_IGESType Type() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer thevals[17];
|
||||
Standard_Character theres1[10];
|
||||
Standard_Character theres2[10];
|
||||
Standard_Character thelabl[10];
|
||||
Standard_Character thesubs[10];
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_DirPart_HeaderFile
|
@@ -1,46 +0,0 @@
|
||||
-- Created on: 1993-10-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 FileProtocol from IGESData inherits Protocol from IGESData
|
||||
|
||||
---Purpose : This class allows to define complex protocols, in order to
|
||||
-- treat various sub-sets (or the complete set) of the IGES Norm,
|
||||
-- such as Solid + Draw (which are normally independant), etc...
|
||||
-- While it inherits Protocol from IGESData, it admits
|
||||
-- UndefinedEntity too
|
||||
|
||||
uses Protocol from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns FileProtocol;
|
||||
---Purpose : Returns an empty FileProtocol
|
||||
|
||||
Add (me : mutable; protocol : Protocol from IGESData);
|
||||
---Purpose : Adds a resource
|
||||
|
||||
NbResources (me) returns Integer is redefined;
|
||||
---Purpose : Gives the count of Resources : the count of Added Protocols
|
||||
|
||||
Resource (me; num : Integer) returns Protocol from Interface is redefined;
|
||||
---Purpose : Returns a Resource, given a rank (rank of call to Add)
|
||||
|
||||
fields
|
||||
|
||||
theresource : Protocol from IGESData;
|
||||
thenext : FileProtocol from IGESData;
|
||||
|
||||
end FileProtocol;
|
@@ -11,8 +11,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_FileProtocol.ixx>
|
||||
|
||||
#include <IGESData_FileProtocol.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IGESData_FileProtocol::IGESData_FileProtocol () { }
|
||||
|
||||
|
80
src/IGESData/IGESData_FileProtocol.hxx
Normal file
80
src/IGESData/IGESData_FileProtocol.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1993-10-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 _IGESData_FileProtocol_HeaderFile
|
||||
#define _IGESData_FileProtocol_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESData_Protocol;
|
||||
class Interface_Protocol;
|
||||
|
||||
|
||||
class IGESData_FileProtocol;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_FileProtocol, IGESData_Protocol)
|
||||
|
||||
//! This class allows to define complex protocols, in order to
|
||||
//! treat various sub-sets (or the complete set) of the IGES Norm,
|
||||
//! such as Solid + Draw (which are normally independant), etc...
|
||||
//! While it inherits Protocol from IGESData, it admits
|
||||
//! UndefinedEntity too
|
||||
class IGESData_FileProtocol : public IGESData_Protocol
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns an empty FileProtocol
|
||||
Standard_EXPORT IGESData_FileProtocol();
|
||||
|
||||
//! Adds a resource
|
||||
Standard_EXPORT void Add (const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! Gives the count of Resources : the count of Added Protocols
|
||||
Standard_EXPORT virtual Standard_Integer NbResources() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a Resource, given a rank (rank of call to Add)
|
||||
Standard_EXPORT virtual Handle(Interface_Protocol) Resource (const Standard_Integer num) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_FileProtocol,IGESData_Protocol)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(IGESData_Protocol) theresource;
|
||||
Handle(IGESData_FileProtocol) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_FileProtocol_HeaderFile
|
80
src/IGESData/IGESData_FileRecognizer.hxx
Normal file
80
src/IGESData/IGESData_FileRecognizer.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_FileRecognizer_HeaderFile
|
||||
#define _IGESData_FileRecognizer_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
class IGESData_IGESEntity;
|
||||
class Standard_NoSuchObject;
|
||||
class IGESData_IGESType;
|
||||
|
||||
|
||||
class IGESData_FileRecognizer;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_FileRecognizer, Standard_Transient)
|
||||
|
||||
|
||||
class IGESData_FileRecognizer : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean Evaluate (const IGESData_IGESType& akey, Handle(IGESData_IGESEntity)& res);
|
||||
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) Result() const;
|
||||
|
||||
Standard_EXPORT void Add (const Handle(IGESData_FileRecognizer)& reco);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_FileRecognizer,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_FileRecognizer();
|
||||
|
||||
Standard_EXPORT void SetOK (const Handle(IGESData_IGESEntity)& aresult);
|
||||
|
||||
Standard_EXPORT void SetKO();
|
||||
|
||||
Standard_EXPORT virtual void Eval (const IGESData_IGESType& akey) = 0;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(IGESData_IGESEntity) theres;
|
||||
Standard_Boolean hasnext;
|
||||
Handle(IGESData_FileRecognizer) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_FileRecognizer_HeaderFile
|
44
src/IGESData/IGESData_FileRecognizer_0.cxx
Normal file
44
src/IGESData/IGESData_FileRecognizer_0.cxx
Normal file
@@ -0,0 +1,44 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 <IGESData_FileRecognizer.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_FileRecognizer.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheKey IGESData_IGESType
|
||||
#define TheKey_hxx <IGESData_IGESType.hxx>
|
||||
#define Handle_TheResul Handle(IGESData_IGESEntity)
|
||||
#define TheResul IGESData_IGESEntity
|
||||
#define TheResul_hxx <IGESData_IGESEntity.hxx>
|
||||
#define Interface_Recognizer IGESData_FileRecognizer
|
||||
#define Interface_Recognizer_hxx <IGESData_FileRecognizer.hxx>
|
||||
#define Handle_Interface_Recognizer Handle(IGESData_FileRecognizer)
|
||||
#include <Interface_Recognizer.gxx>
|
||||
|
@@ -1,137 +0,0 @@
|
||||
-- Created on: 1992-12-18
|
||||
-- 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.
|
||||
|
||||
class FreeFormatEntity from IGESData inherits UndefinedEntity
|
||||
|
||||
---Purpose : This class allows to create IGES Entities in a literal form :
|
||||
-- their definition is free, but they are not recognized as
|
||||
-- instances of specific classes.
|
||||
--
|
||||
-- This is a way to define test files without having to create
|
||||
-- and fill specific classes of Entities, or creating an IGES
|
||||
-- File ex nihilo, with respect for all format constraints
|
||||
-- (such a way is very difficult to run and to master).
|
||||
--
|
||||
-- This class has the same content as an UndefinedEntity, only
|
||||
-- it gives way to act on its content
|
||||
|
||||
uses HAsciiString from TCollection, HSequenceOfInteger from TColStd,
|
||||
ParamType, IGESEntity, HArray1OfIGESEntity, IGESWriter
|
||||
|
||||
raises OutOfRange, InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create returns FreeFormatEntity;
|
||||
---Purpose : Creates a completely empty FreeFormatEntity
|
||||
|
||||
SetTypeNumber (me : mutable; typenum : Integer);
|
||||
---Purpose : Sets Type Number to a new Value, and Form Number to Zero
|
||||
|
||||
SetFormNumber (me : mutable; formnum : Integer);
|
||||
---Purpose : Sets Form Number to a new Value (to called after SetTypeNumber)
|
||||
|
||||
-- Setting Directory informations : see general methods provided by
|
||||
-- IGESEntity itself : InitTransf, InitView, InitLineFont, InitLevel,
|
||||
-- InitColor, InitStatus, SetLabel, InitMisc, AddProperty, Associate
|
||||
|
||||
-- -- Access to Parameters -- --
|
||||
-- (own Parameters, in addition to Properties and Associativities
|
||||
-- list, and to Directory informations)
|
||||
|
||||
NbParams (me) returns Integer;
|
||||
---Purpose : Gives count of recorded parameters
|
||||
|
||||
ParamData (me; num : Integer; ptype : out ParamType;
|
||||
ent : out IGESEntity;
|
||||
val : out HAsciiString from TCollection)
|
||||
returns Boolean;
|
||||
---Purpose : Returns data of a Parameter : its type, and the entity if it
|
||||
-- designates en entity ("ent") or its literal value else ("str")
|
||||
-- Returned value (Boolean) : True if it is an Entity, False else
|
||||
|
||||
ParamType (me; num : Integer) returns ParamType raises OutOfRange;
|
||||
---Purpose : Returns the ParamType of a Param, given its rank
|
||||
-- Error if num is not between 1 and NbParams
|
||||
|
||||
IsParamEntity (me; num : Integer) returns Boolean raises OutOfRange;
|
||||
---Purpose : Returns True if a Parameter is recorded as an entity
|
||||
-- Error if num is not between 1 and NbParams
|
||||
|
||||
ParamEntity (me; num : Integer) returns IGESEntity
|
||||
raises InterfaceError, OutOfRange;
|
||||
---Purpose : Returns Entity corresponding to a Param, given its rank
|
||||
-- Error if out of range or if Param num does not designate
|
||||
-- an Entity
|
||||
|
||||
IsNegativePointer (me; num : Integer) returns Boolean;
|
||||
---Purpose : Returns True if <num> is noted as for a "Negative Pointer"
|
||||
-- (see AddEntity for details). Senseful only if IsParamEntity
|
||||
-- answers True for <num>, else returns False.
|
||||
|
||||
ParamValue (me; num : Integer) returns HAsciiString from TCollection
|
||||
raises InterfaceError, OutOfRange;
|
||||
---Purpose : Returns litteral value of a Parameter, given its rank
|
||||
-- Error if num is out of range, or if Parameter is not literal
|
||||
|
||||
NegativePointers (me) returns HSequenceOfInteger from TColStd;
|
||||
---Purpose : Returns the complete list of Ramks of Parameters which have
|
||||
-- been noted as Negative Pointers
|
||||
-- Warning : It is returned as a Null Handle if none was noted
|
||||
|
||||
AddLiteral (me : mutable; ptype : ParamType;
|
||||
val : HAsciiString from TCollection);
|
||||
---Purpose : Adds a literal Parameter to the list (as such)
|
||||
|
||||
AddLiteral (me : mutable; ptype : ParamType; val : CString);
|
||||
---Purpose : Adds a literal Parameter to the list (builds an HAsciiString)
|
||||
|
||||
AddEntity (me : mutable; ptype : ParamType;
|
||||
ent : IGESEntity; negative : Boolean = Standard_False);
|
||||
---Purpose : Adds a Parameter which references an Entity. If the Entity is
|
||||
-- Null, the added parameter will define a "Null Pointer" (0)
|
||||
-- If <negative> is given True, this will command Sending to File
|
||||
-- (see IGESWriter) to produce a "Negative Pointer"
|
||||
-- (Default is False)
|
||||
|
||||
AddEntities (me : mutable; ents : HArray1OfIGESEntity)
|
||||
raises InterfaceError;
|
||||
---Purpose : Adds a set of Entities, given as a HArray1OfIGESEntity
|
||||
-- Causes creation of : an Integer Parameter which gives count
|
||||
-- of Entities, then the list of Entities of the Array
|
||||
-- Error if an Entity is not an IGESEntity
|
||||
-- All these Entities will be interpreted as "Positive Pointers"
|
||||
-- by IGESWriter
|
||||
|
||||
AddNegativePointers (me : mutable; list : HSequenceOfInteger from TColStd);
|
||||
---Purpose : Adds a list of Ranks of Parameters to be noted as Negative
|
||||
-- Pointers (this will be taken into account for Parameters
|
||||
-- which are Entities)
|
||||
|
||||
ClearNegativePointers (me : mutable);
|
||||
---Purpose : Clears all informations about Negative Pointers, hence every
|
||||
-- Entity kind Parameter will be send normally, as Positive
|
||||
|
||||
|
||||
WriteOwnParams (me; IW : in out IGESWriter) is redefined;
|
||||
---Purpose : WriteOwnParams is redefined for FreeFormatEntity to take
|
||||
-- into account the supplementary information "Negative Pointer"
|
||||
|
||||
fields
|
||||
|
||||
thenegptrs : HSequenceOfInteger from TColStd;
|
||||
|
||||
end FreeFormatEntity;
|
@@ -11,19 +11,19 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_FreeFormatEntity.ixx>
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
|
||||
#include <IGESData_FreeFormatEntity.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Interface_UndefinedContent.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
// Donne un acces simple a la constitution d une UndefinedEntity :
|
||||
// Methodes de UndefinedContent, + Type & Form, + AddEntities (little gadget)
|
||||
|
||||
|
||||
IGESData_FreeFormatEntity::IGESData_FreeFormatEntity () { }
|
||||
|
||||
void IGESData_FreeFormatEntity::SetTypeNumber
|
||||
|
159
src/IGESData/IGESData_FreeFormatEntity.hxx
Normal file
159
src/IGESData/IGESData_FreeFormatEntity.hxx
Normal file
@@ -0,0 +1,159 @@
|
||||
// Created on: 1992-12-18
|
||||
// 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 _IGESData_FreeFormatEntity_HeaderFile
|
||||
#define _IGESData_FreeFormatEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <IGESData_HArray1OfIGESEntity.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Interface_InterfaceError;
|
||||
class IGESData_IGESEntity;
|
||||
class TCollection_HAsciiString;
|
||||
class IGESData_IGESWriter;
|
||||
|
||||
|
||||
class IGESData_FreeFormatEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_FreeFormatEntity, IGESData_UndefinedEntity)
|
||||
|
||||
//! This class allows to create IGES Entities in a literal form :
|
||||
//! their definition is free, but they are not recognized as
|
||||
//! instances of specific classes.
|
||||
//!
|
||||
//! This is a way to define test files without having to create
|
||||
//! and fill specific classes of Entities, or creating an IGES
|
||||
//! File ex nihilo, with respect for all format constraints
|
||||
//! (such a way is very difficult to run and to master).
|
||||
//!
|
||||
//! This class has the same content as an UndefinedEntity, only
|
||||
//! it gives way to act on its content
|
||||
class IGESData_FreeFormatEntity : public IGESData_UndefinedEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a completely empty FreeFormatEntity
|
||||
Standard_EXPORT IGESData_FreeFormatEntity();
|
||||
|
||||
//! Sets Type Number to a new Value, and Form Number to Zero
|
||||
Standard_EXPORT void SetTypeNumber (const Standard_Integer typenum);
|
||||
|
||||
//! Sets Form Number to a new Value (to called after SetTypeNumber)
|
||||
Standard_EXPORT void SetFormNumber (const Standard_Integer formnum);
|
||||
|
||||
//! Gives count of recorded parameters
|
||||
Standard_EXPORT Standard_Integer NbParams() const;
|
||||
|
||||
//! Returns data of a Parameter : its type, and the entity if it
|
||||
//! designates en entity ("ent") or its literal value else ("str")
|
||||
//! Returned value (Boolean) : True if it is an Entity, False else
|
||||
Standard_EXPORT Standard_Boolean ParamData (const Standard_Integer num, Interface_ParamType& ptype, Handle(IGESData_IGESEntity)& ent, Handle(TCollection_HAsciiString)& val) const;
|
||||
|
||||
//! Returns the ParamType of a Param, given its rank
|
||||
//! Error if num is not between 1 and NbParams
|
||||
Standard_EXPORT Interface_ParamType ParamType (const Standard_Integer num) const;
|
||||
|
||||
//! Returns True if a Parameter is recorded as an entity
|
||||
//! Error if num is not between 1 and NbParams
|
||||
Standard_EXPORT Standard_Boolean IsParamEntity (const Standard_Integer num) const;
|
||||
|
||||
//! Returns Entity corresponding to a Param, given its rank
|
||||
//! Error if out of range or if Param num does not designate
|
||||
//! an Entity
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) ParamEntity (const Standard_Integer num) const;
|
||||
|
||||
//! Returns True if <num> is noted as for a "Negative Pointer"
|
||||
//! (see AddEntity for details). Senseful only if IsParamEntity
|
||||
//! answers True for <num>, else returns False.
|
||||
Standard_EXPORT Standard_Boolean IsNegativePointer (const Standard_Integer num) const;
|
||||
|
||||
//! Returns litteral value of a Parameter, given its rank
|
||||
//! Error if num is out of range, or if Parameter is not literal
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) ParamValue (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the complete list of Ramks of Parameters which have
|
||||
//! been noted as Negative Pointers
|
||||
//! Warning : It is returned as a Null Handle if none was noted
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfInteger) NegativePointers() const;
|
||||
|
||||
//! Adds a literal Parameter to the list (as such)
|
||||
Standard_EXPORT void AddLiteral (const Interface_ParamType ptype, const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
//! Adds a literal Parameter to the list (builds an HAsciiString)
|
||||
Standard_EXPORT void AddLiteral (const Interface_ParamType ptype, const Standard_CString val);
|
||||
|
||||
//! Adds a Parameter which references an Entity. If the Entity is
|
||||
//! Null, the added parameter will define a "Null Pointer" (0)
|
||||
//! If <negative> is given True, this will command Sending to File
|
||||
//! (see IGESWriter) to produce a "Negative Pointer"
|
||||
//! (Default is False)
|
||||
Standard_EXPORT void AddEntity (const Interface_ParamType ptype, const Handle(IGESData_IGESEntity)& ent, const Standard_Boolean negative = Standard_False);
|
||||
|
||||
//! Adds a set of Entities, given as a HArray1OfIGESEntity
|
||||
//! Causes creation of : an Integer Parameter which gives count
|
||||
//! of Entities, then the list of Entities of the Array
|
||||
//! Error if an Entity is not an IGESEntity
|
||||
//! All these Entities will be interpreted as "Positive Pointers"
|
||||
//! by IGESWriter
|
||||
Standard_EXPORT void AddEntities (const Handle(IGESData_HArray1OfIGESEntity)& ents);
|
||||
|
||||
//! Adds a list of Ranks of Parameters to be noted as Negative
|
||||
//! Pointers (this will be taken into account for Parameters
|
||||
//! which are Entities)
|
||||
Standard_EXPORT void AddNegativePointers (const Handle(TColStd_HSequenceOfInteger)& list);
|
||||
|
||||
//! Clears all informations about Negative Pointers, hence every
|
||||
//! Entity kind Parameter will be send normally, as Positive
|
||||
Standard_EXPORT void ClearNegativePointers();
|
||||
|
||||
//! WriteOwnParams is redefined for FreeFormatEntity to take
|
||||
//! into account the supplementary information "Negative Pointer"
|
||||
Standard_EXPORT virtual void WriteOwnParams (IGESData_IGESWriter& IW) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_FreeFormatEntity,IGESData_UndefinedEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfInteger) thenegptrs;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_FreeFormatEntity_HeaderFile
|
@@ -1,126 +0,0 @@
|
||||
-- Created on: 1993-05-10
|
||||
-- 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 IGESData
|
||||
inherits GeneralModule from Interface
|
||||
|
||||
---Purpose : Definition of General Services adapted to IGES.
|
||||
-- This Services comprise : Shared & Implied Lists, Copy, Check
|
||||
-- They are adapted according to the organisation of IGES
|
||||
-- Entities : Directory Part, Lists of Associativities and
|
||||
-- Properties are specifically processed
|
||||
|
||||
uses Transient, HAsciiString from TCollection,
|
||||
InterfaceModel, Check, ShareTool, EntityIterator, CopyTool,
|
||||
IGESEntity, DirChecker
|
||||
|
||||
is
|
||||
|
||||
FillSharedCase (me; CN : Integer; ent : Transient;
|
||||
iter : in out EntityIterator);
|
||||
---Purpose : Fills the list of Entities shared by an IGESEntity <ent>,
|
||||
-- according a Case Number <CN> (formerly computed by CaseNum).
|
||||
-- Considers Properties and Directory Part, and calls
|
||||
-- OwnSharedCase (which is adapted to each Type of Entity)
|
||||
|
||||
OwnSharedCase (me; CN : Integer; ent : IGESEntity;
|
||||
iter : in out EntityIterator) is deferred;
|
||||
---Purpose : Lists the Entities shared by a given IGESEntity <ent>, from
|
||||
-- its specific parameters : specific for each type
|
||||
|
||||
ListImpliedCase (me; CN : Integer; ent : Transient;
|
||||
iter : in out EntityIterator) is redefined;
|
||||
---Purpose : Lists the Implied References of <ent>. Here, these are the
|
||||
-- Associativities, plus the Entities defined by OwnSharedCase
|
||||
|
||||
OwnImpliedCase (me; CN : Integer; ent : IGESEntity;
|
||||
iter : in out EntityIterator) is virtual;
|
||||
---Purpose : Specific list of Entities implied by a given IGESEntity <ent>
|
||||
-- (in addition to Associativities). By default, there are none,
|
||||
-- but this method can be redefined as required
|
||||
|
||||
|
||||
|
||||
CheckCase (me; CN : Integer; ent : Transient; shares : ShareTool;
|
||||
ach : in out Check);
|
||||
---Purpose : Semantic Checking of an IGESEntity. Performs general Checks,
|
||||
-- which use DirChecker, then call OwnCheck which does a check
|
||||
-- specific for each type of Entity
|
||||
|
||||
DirChecker (me; CN : Integer; ent : IGESEntity) returns DirChecker
|
||||
is deferred;
|
||||
---Purpose : Returns a DirChecker, specific for each type of Entity
|
||||
-- (identified by its Case Number) : this DirChecker defines
|
||||
-- constraints which must be respected by the DirectoryPart
|
||||
|
||||
OwnCheckCase (me; CN : Integer; ent : IGESEntity; shares : ShareTool;
|
||||
ach : in out Check) is deferred;
|
||||
---Purpose : Performs Specific Semantic Check for each type of Entity
|
||||
|
||||
|
||||
CanCopy (me; CN : Integer; ent : Transient) returns Boolean is redefined;
|
||||
---Purpose : Specific answer to the question "is Copy properly implemented"
|
||||
-- For IGES, answer is always True
|
||||
|
||||
NewVoid (me; CN : Integer; entto : out Transient)
|
||||
returns Boolean is deferred;
|
||||
---Purpose : Specific creation of a new void entity
|
||||
|
||||
CopyCase (me; CN : Integer;
|
||||
entfrom : Transient; entto : Transient;
|
||||
TC : in out CopyTool);
|
||||
---Purpose : Copy ("Deep") from <entfrom> to <entto> (same type)
|
||||
-- by using a CopyTool which provides its working Map.
|
||||
-- For IGESEntities, Copies general data (Directory Part, List of
|
||||
-- Properties) and call OwnCopyCase
|
||||
|
||||
OwnCopyCase (me; CN : Integer;
|
||||
entfrom : IGESEntity; entto : IGESEntity;
|
||||
TC : in out CopyTool) is deferred;
|
||||
---Purpose : Copies parameters which are specific of each Type of Entity
|
||||
|
||||
RenewImpliedCase (me; CN : Integer;
|
||||
entfrom : Transient; entto : Transient;
|
||||
TC : CopyTool) is redefined;
|
||||
---Purpose : Renewing of Implied References.
|
||||
-- For IGESEntities, Copies general data(List of Associativities)
|
||||
-- and calls OwnRenewCase
|
||||
|
||||
OwnRenewCase (me; CN : Integer;
|
||||
entfrom : IGESEntity; entto : IGESEntity;
|
||||
TC : CopyTool) is virtual;
|
||||
---Purpose : Renews parameters which are specific of each Type of Entity :
|
||||
-- the provided default does nothing, but this method may be
|
||||
-- redefined as required
|
||||
|
||||
WhenDeleteCase (me; CN : Integer;
|
||||
ent : Transient; dispatched : Boolean) is redefined;
|
||||
---Purpose : Prepares an IGES Entity for delete : works on directory part
|
||||
-- then calls OwnDeleteCase
|
||||
-- While dispatch requires to copy the entities, <dispatched> is
|
||||
-- ignored, entities are cleared in any case
|
||||
|
||||
OwnDeleteCase (me; CN : Integer;
|
||||
ent : IGESEntity) is virtual;
|
||||
---Purpose : Specific preparation for delete, acts on own parameters
|
||||
-- Default does nothing, to be redefined as required
|
||||
|
||||
Name (me; CN : Integer; ent : Transient; shares : ShareTool from Interface)
|
||||
returns HAsciiString from TCollection is redefined virtual;
|
||||
---Purpose : Returns the name of an IGES Entity (its NameValue)
|
||||
-- Can be redefined for an even more specific case ...
|
||||
|
||||
end GeneralModule;
|
@@ -11,19 +11,27 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_GeneralModule.ixx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DirChecker.hxx>
|
||||
#include <IGESData_GeneralModule.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CopyTool.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
void IGESData_GeneralModule::FillSharedCase
|
||||
(const Standard_Integer CN, const Handle(Standard_Transient)& ent,
|
||||
|
145
src/IGESData/IGESData_GeneralModule.hxx
Normal file
145
src/IGESData/IGESData_GeneralModule.hxx
Normal file
@@ -0,0 +1,145 @@
|
||||
// Created on: 1993-05-10
|
||||
// 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 _IGESData_GeneralModule_HeaderFile
|
||||
#define _IGESData_GeneralModule_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_GeneralModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
class IGESData_IGESEntity;
|
||||
class Interface_ShareTool;
|
||||
class Interface_Check;
|
||||
class IGESData_DirChecker;
|
||||
class Interface_CopyTool;
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
|
||||
class IGESData_GeneralModule;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_GeneralModule, Interface_GeneralModule)
|
||||
|
||||
//! Definition of General Services adapted to IGES.
|
||||
//! This Services comprise : Shared & Implied Lists, Copy, Check
|
||||
//! They are adapted according to the organisation of IGES
|
||||
//! Entities : Directory Part, Lists of Associativities and
|
||||
//! Properties are specifically processed
|
||||
class IGESData_GeneralModule : public Interface_GeneralModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Fills the list of Entities shared by an IGESEntity <ent>,
|
||||
//! according a Case Number <CN> (formerly computed by CaseNum).
|
||||
//! Considers Properties and Directory Part, and calls
|
||||
//! OwnSharedCase (which is adapted to each Type of Entity)
|
||||
Standard_EXPORT void FillSharedCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
|
||||
|
||||
//! Lists the Entities shared by a given IGESEntity <ent>, from
|
||||
//! its specific parameters : specific for each type
|
||||
Standard_EXPORT virtual void OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const = 0;
|
||||
|
||||
//! Lists the Implied References of <ent>. Here, these are the
|
||||
//! Associativities, plus the Entities defined by OwnSharedCase
|
||||
Standard_EXPORT virtual void ListImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const Standard_OVERRIDE;
|
||||
|
||||
//! Specific list of Entities implied by a given IGESEntity <ent>
|
||||
//! (in addition to Associativities). By default, there are none,
|
||||
//! but this method can be redefined as required
|
||||
Standard_EXPORT virtual void OwnImpliedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const;
|
||||
|
||||
//! Semantic Checking of an IGESEntity. Performs general Checks,
|
||||
//! which use DirChecker, then call OwnCheck which does a check
|
||||
//! specific for each type of Entity
|
||||
Standard_EXPORT void CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const;
|
||||
|
||||
//! Returns a DirChecker, specific for each type of Entity
|
||||
//! (identified by its Case Number) : this DirChecker defines
|
||||
//! constraints which must be respected by the DirectoryPart
|
||||
Standard_EXPORT virtual IGESData_DirChecker DirChecker (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const = 0;
|
||||
|
||||
//! Performs Specific Semantic Check for each type of Entity
|
||||
Standard_EXPORT virtual void OwnCheckCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const = 0;
|
||||
|
||||
//! Specific answer to the question "is Copy properly implemented"
|
||||
//! For IGES, answer is always True
|
||||
Standard_EXPORT virtual Standard_Boolean CanCopy (const Standard_Integer CN, const Handle(Standard_Transient)& ent) const Standard_OVERRIDE;
|
||||
|
||||
//! Specific creation of a new void entity
|
||||
Standard_EXPORT virtual Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const = 0;
|
||||
|
||||
//! Copy ("Deep") from <entfrom> to <entto> (same type)
|
||||
//! by using a CopyTool which provides its working Map.
|
||||
//! For IGESEntities, Copies general data (Directory Part, List of
|
||||
//! Properties) and call OwnCopyCase
|
||||
Standard_EXPORT void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const;
|
||||
|
||||
//! Copies parameters which are specific of each Type of Entity
|
||||
Standard_EXPORT virtual void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const = 0;
|
||||
|
||||
//! Renewing of Implied References.
|
||||
//! For IGESEntities, Copies general data(List of Associativities)
|
||||
//! and calls OwnRenewCase
|
||||
Standard_EXPORT virtual void RenewImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, const Interface_CopyTool& TC) const Standard_OVERRIDE;
|
||||
|
||||
//! Renews parameters which are specific of each Type of Entity :
|
||||
//! the provided default does nothing, but this method may be
|
||||
//! redefined as required
|
||||
Standard_EXPORT virtual void OwnRenewCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, const Interface_CopyTool& TC) const;
|
||||
|
||||
//! Prepares an IGES Entity for delete : works on directory part
|
||||
//! then calls OwnDeleteCase
|
||||
//! While dispatch requires to copy the entities, <dispatched> is
|
||||
//! ignored, entities are cleared in any case
|
||||
Standard_EXPORT virtual void WhenDeleteCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Standard_Boolean dispatched) const Standard_OVERRIDE;
|
||||
|
||||
//! Specific preparation for delete, acts on own parameters
|
||||
//! Default does nothing, to be redefined as required
|
||||
Standard_EXPORT virtual void OwnDeleteCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! Returns the name of an IGES Entity (its NameValue)
|
||||
//! Can be redefined for an even more specific case ...
|
||||
Standard_EXPORT virtual Handle(TCollection_HAsciiString) Name (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_GeneralModule,Interface_GeneralModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_GeneralModule_HeaderFile
|
77
src/IGESData/IGESData_GlobalNodeOfSpecificLib.hxx
Normal file
77
src/IGESData/IGESData_GlobalNodeOfSpecificLib.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_GlobalNodeOfSpecificLib_HeaderFile
|
||||
#define _IGESData_GlobalNodeOfSpecificLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
class IGESData_SpecificModule;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_SpecificLib;
|
||||
class IGESData_NodeOfSpecificLib;
|
||||
|
||||
|
||||
class IGESData_GlobalNodeOfSpecificLib;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_GlobalNodeOfSpecificLib, Standard_Transient)
|
||||
|
||||
|
||||
class IGESData_GlobalNodeOfSpecificLib : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_GlobalNodeOfSpecificLib();
|
||||
|
||||
Standard_EXPORT void Add (const Handle(IGESData_SpecificModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_SpecificModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_GlobalNodeOfSpecificLib)& Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_GlobalNodeOfSpecificLib,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(IGESData_SpecificModule) themod;
|
||||
Handle(IGESData_Protocol) theprot;
|
||||
Handle(IGESData_GlobalNodeOfSpecificLib) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_GlobalNodeOfSpecificLib_HeaderFile
|
54
src/IGESData/IGESData_GlobalNodeOfSpecificLib_0.cxx
Normal file
54
src/IGESData/IGESData_GlobalNodeOfSpecificLib_0.cxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
#include <IGESData_NodeOfSpecificLib.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheObject Handle(IGESData_IGESEntity)
|
||||
#define TheObject_hxx <IGESData_IGESEntity.hxx>
|
||||
#define Handle_TheModule Handle(IGESData_SpecificModule)
|
||||
#define TheModule IGESData_SpecificModule
|
||||
#define TheModule_hxx <IGESData_SpecificModule.hxx>
|
||||
#define Handle_TheProtocol Handle(IGESData_Protocol)
|
||||
#define TheProtocol IGESData_Protocol
|
||||
#define TheProtocol_hxx <IGESData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
|
||||
#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
#define LibCtl_Node IGESData_NodeOfSpecificLib
|
||||
#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
|
||||
#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
|
||||
#define LibCtl_Library IGESData_SpecificLib
|
||||
#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
|
||||
#include <LibCtl_GlobalNode.gxx>
|
||||
|
77
src/IGESData/IGESData_GlobalNodeOfWriterLib.hxx
Normal file
77
src/IGESData/IGESData_GlobalNodeOfWriterLib.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_GlobalNodeOfWriterLib_HeaderFile
|
||||
#define _IGESData_GlobalNodeOfWriterLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
class IGESData_ReadWriteModule;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_WriterLib;
|
||||
class IGESData_NodeOfWriterLib;
|
||||
|
||||
|
||||
class IGESData_GlobalNodeOfWriterLib;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_GlobalNodeOfWriterLib, Standard_Transient)
|
||||
|
||||
|
||||
class IGESData_GlobalNodeOfWriterLib : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_GlobalNodeOfWriterLib();
|
||||
|
||||
Standard_EXPORT void Add (const Handle(IGESData_ReadWriteModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_ReadWriteModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_GlobalNodeOfWriterLib)& Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_GlobalNodeOfWriterLib,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(IGESData_ReadWriteModule) themod;
|
||||
Handle(IGESData_Protocol) theprot;
|
||||
Handle(IGESData_GlobalNodeOfWriterLib) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_GlobalNodeOfWriterLib_HeaderFile
|
54
src/IGESData/IGESData_GlobalNodeOfWriterLib_0.cxx
Normal file
54
src/IGESData/IGESData_GlobalNodeOfWriterLib_0.cxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 <IGESData_GlobalNodeOfWriterLib.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_GlobalNodeOfWriterLib.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_WriterLib.hxx>
|
||||
#include <IGESData_NodeOfWriterLib.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheObject Handle(IGESData_IGESEntity)
|
||||
#define TheObject_hxx <IGESData_IGESEntity.hxx>
|
||||
#define Handle_TheModule Handle(IGESData_ReadWriteModule)
|
||||
#define TheModule IGESData_ReadWriteModule
|
||||
#define TheModule_hxx <IGESData_ReadWriteModule.hxx>
|
||||
#define Handle_TheProtocol Handle(IGESData_Protocol)
|
||||
#define TheProtocol IGESData_Protocol
|
||||
#define TheProtocol_hxx <IGESData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode IGESData_GlobalNodeOfWriterLib
|
||||
#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfWriterLib.hxx>
|
||||
#define LibCtl_Node IGESData_NodeOfWriterLib
|
||||
#define LibCtl_Node_hxx <IGESData_NodeOfWriterLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfWriterLib)
|
||||
#define Handle_LibCtl_Node Handle(IGESData_NodeOfWriterLib)
|
||||
#define LibCtl_Library IGESData_WriterLib
|
||||
#define LibCtl_Library_hxx <IGESData_WriterLib.hxx>
|
||||
#include <LibCtl_GlobalNode.gxx>
|
||||
|
@@ -1,249 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class GlobalSection from IGESData
|
||||
|
||||
---Purpose : Description of a global section (corresponds to file header)
|
||||
-- used as well in IGESModel, IGESReader and IGESWriter
|
||||
-- Warning : From IGES-5.1, a parameter is added : LastChangeDate (concerns
|
||||
-- transferred set of data, not the file itself)
|
||||
-- Of course, it can be absent if read from earlier versions
|
||||
-- (a default is then to be set to current date)
|
||||
-- From 5.3, one more : ApplicationProtocol (optional)
|
||||
|
||||
uses Integer, Character, Real, HAsciiString from TCollection,
|
||||
XYZ from gp, ParamSet, Check
|
||||
|
||||
is
|
||||
|
||||
Create returns GlobalSection;
|
||||
---Purpose : Creates an empty GlobalSection, ready to be filled,
|
||||
-- Warning : No default value is provided
|
||||
|
||||
Init (me : in out; params : ParamSet; ach : in out Check) is static;
|
||||
---Purpose : Fills GlobalSection from a ParamSet (i.e. taken from file)
|
||||
-- undefined parameters do not change default values when defined
|
||||
-- Fills Check about Corrections or Fails
|
||||
|
||||
CopyRefs (me : in out) is static;
|
||||
---Purpose : Copies data referenced by Handle (that is, Strings)
|
||||
-- usefull to "isolate" a GlobalSection after copy by "="
|
||||
-- (from a Model to another Model for instance)
|
||||
|
||||
Params (me) returns ParamSet is static;
|
||||
---Purpose : Returns all contained data in the form of a ParamSet
|
||||
-- Remark : Strings are given under Hollerith form
|
||||
|
||||
TranslatedFromHollerith (me; astr : HAsciiString from TCollection)
|
||||
returns HAsciiString from TCollection is static;
|
||||
---Purpose : Returns a string withpout its Hollerith marks (nnnH ahead).
|
||||
-- Remark : all strings stored in GlobalSection are expurged
|
||||
-- from Hollerith informations (without nnnH)
|
||||
-- If <astr> is not Hollerith form, it is simply copied
|
||||
|
||||
-- -- Specific Queries -- --
|
||||
|
||||
Separator (me) returns Character is static;
|
||||
--- Purpose: Returns the parameter delimiter character.
|
||||
|
||||
EndMark (me) returns Character is static;
|
||||
---Purpose: Returns the record delimiter character.
|
||||
|
||||
SendName (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the name of the sending system.
|
||||
|
||||
FileName (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the name of the IGES file.
|
||||
|
||||
SystemId (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the Native System ID of the system that created the IGES file.
|
||||
|
||||
InterfaceVersion (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the name of the pre-processor used to write the IGES file.
|
||||
|
||||
IntegerBits (me) returns Integer is static;
|
||||
---Purpose: Returns the number of binary bits for integer representations.
|
||||
|
||||
MaxPower10Single (me) returns Integer is static;
|
||||
---Purpose: Returns the maximum power of a decimal representation of a
|
||||
-- single-precision floating point number in the sending system.
|
||||
|
||||
|
||||
MaxDigitsSingle (me) returns Integer is static;
|
||||
MaxPower10Double (me) returns Integer is static;
|
||||
|
||||
--- Purpose: Returns the maximum power of a decimal representation of a
|
||||
-- double-precision floating point number in the sending system.
|
||||
|
||||
MaxDigitsDouble (me) returns Integer is static;
|
||||
|
||||
ReceiveName (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the name of the receiving system.
|
||||
Scale (me) returns Real is static;
|
||||
---Purpose: Returns the scale used in the IGES file.
|
||||
|
||||
UnitFlag (me) returns Integer is static;
|
||||
---Purpose: Returns the unit flag that was used to write the IGES file.
|
||||
UnitName (me) returns HAsciiString from TCollection is static;
|
||||
--- Purpose: Returns the name of the unit the IGES file was written in.
|
||||
|
||||
LineWeightGrad (me) returns Integer is static;
|
||||
---Purpose: Returns the maximum number of line weight gradations.
|
||||
|
||||
MaxLineWeight (me) returns Real is static;
|
||||
---Purpose: Returns the of maximum line weight width in IGES file units.
|
||||
|
||||
Date (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the IGES file creation date.
|
||||
|
||||
Resolution (me) returns Real is static;
|
||||
---Purpose: Returns the resolution used in the IGES file.
|
||||
|
||||
MaxCoord (me) returns Real is static;
|
||||
---Purpose: Returns the approximate maximum coordinate value found in the model.
|
||||
|
||||
HasMaxCoord (me) returns Boolean is static;
|
||||
---Purpose: Returns True if the approximate maximum coordinate value found in
|
||||
-- the model is greater than 0.
|
||||
|
||||
AuthorName (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the name of the IGES file author.
|
||||
|
||||
CompanyName (me) returns HAsciiString from TCollection is static;
|
||||
--- Purpose: Returns the name of the company where the IGES file was written.
|
||||
|
||||
IGESVersion (me) returns Integer is static;
|
||||
---Purpose: Returns the IGES version that the IGES file was written in.
|
||||
|
||||
DraftingStandard (me) returns Integer is static;
|
||||
|
||||
LastChangeDate (me) returns HAsciiString from TCollection is static;
|
||||
---Purpose: Returns the date and time when the model was created or last
|
||||
-- modified (for IGES 5.1 and later).
|
||||
|
||||
HasLastChangeDate (me) returns Boolean is static;
|
||||
--- Purpose: Returns True if the date and time when the model was created or
|
||||
-- last modified are specified, i.e. not defaulted to NULL.
|
||||
|
||||
SetLastChangeDate (me : in out) is static;
|
||||
|
||||
ApplicationProtocol (me) returns HAsciiString from TCollection;
|
||||
HasApplicationProtocol (me) returns Boolean;
|
||||
|
||||
NewDateString (myclass; year,month,day,hour,minut,second : Integer;
|
||||
mode : Integer = -1)
|
||||
returns HAsciiString from TCollection;
|
||||
---Purpose : Returns a string built from year,
|
||||
-- month, day, hour, minute and second values. The form of the
|
||||
-- resulting string is defined as follows:
|
||||
-- - -1: YYMMDD.HHNNSS,
|
||||
-- - 0: YYYYMMDD.HHNNSS,
|
||||
-- - 1: YYYY-MM-DD:HH-NN-SS, where:
|
||||
-- - YYYY or YY is 4 or 2 digit year,
|
||||
-- - HH is hour (00-23),
|
||||
-- - MM is month (01-12),
|
||||
-- - NN is minute (00-59)
|
||||
-- - DD is day (01-31),
|
||||
-- - SS is second (00-59).
|
||||
|
||||
NewDateString (myclass; date : HAsciiString from TCollection;
|
||||
mode : Integer = 1)
|
||||
returns HAsciiString from TCollection;
|
||||
---Purpose : Converts the string given in the
|
||||
-- form YYMMDD.HHNNSS or YYYYMMDD.HHNNSS to either
|
||||
-- YYMMDD.HHNNSS, YYYYMMDD.HHNNSS or YYYY-MM-DD:HH-NN-SS.
|
||||
|
||||
UnitValue (me) returns Real is static;
|
||||
---Purpose : Returns the unit value (in
|
||||
-- meters) that the IGES file was written in.
|
||||
|
||||
|
||||
SetSeparator (me : in out; val : Character) is static;
|
||||
SetEndMark (me : in out; val : Character) is static;
|
||||
|
||||
SetSendName (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetFileName (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetSystemId (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetInterfaceVersion (me : in out; val : HAsciiString from TCollection) is static;
|
||||
|
||||
SetIntegerBits (me : in out; val : Integer) is static;
|
||||
SetMaxPower10Single (me : in out; val : Integer) is static;
|
||||
SetMaxDigitsSingle (me : in out; val : Integer) is static;
|
||||
SetMaxPower10Double (me : in out; val : Integer) is static;
|
||||
SetMaxDigitsDouble (me : in out; val : Integer) is static;
|
||||
|
||||
SetReceiveName (me : in out; val : HAsciiString from TCollection) is static;
|
||||
|
||||
SetScale (me : in out; val : Real) is static;
|
||||
SetUnitFlag (me : in out; val : Integer) is static;
|
||||
SetUnitName (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetLineWeightGrad (me : in out; val : Integer) is static;
|
||||
SetMaxLineWeight (me : in out; val : Real) is static;
|
||||
SetDate (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetResolution (me : in out; val : Real) is static;
|
||||
SetMaxCoord (me : in out; val : Real = 0.0) is static;
|
||||
-- Without Argument : resets MaxCoord. Argument positive : sets MaxCoord
|
||||
|
||||
MaxMaxCoord (me : in out; val : Real = 0.0);
|
||||
-- Sets MaxCoord to the max of <actual MaxCoord> , Abs(val)
|
||||
MaxMaxCoords (me : in out; xyz : XYZ from gp);
|
||||
-- MaxMaxCoord on X,Y,Z of <xyz>
|
||||
|
||||
SetAuthorName (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetCompanyName (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetIGESVersion (me : in out; val : Integer) is static;
|
||||
SetDraftingStandard (me : in out; val : Integer) is static;
|
||||
|
||||
SetLastChangeDate (me : in out; val : HAsciiString from TCollection) is static;
|
||||
SetApplicationProtocol (me : in out; val : HAsciiString from TCollection);
|
||||
|
||||
fields
|
||||
|
||||
theSeparator : Character; -- default is ','
|
||||
theEndMark : Character; -- default is ';'
|
||||
|
||||
theSendName : HAsciiString from TCollection;
|
||||
theFileName : HAsciiString from TCollection;
|
||||
theSystemId : HAsciiString from TCollection;
|
||||
theInterfaceVersion : HAsciiString from TCollection;
|
||||
|
||||
theIntegerBits : Integer;
|
||||
theMaxPower10Single : Integer;
|
||||
theMaxDigitsSingle : Integer;
|
||||
theMaxPower10Double : Integer;
|
||||
theMaxDigitsDouble : Integer;
|
||||
|
||||
theReceiveName : HAsciiString from TCollection;
|
||||
|
||||
theScale : Real;
|
||||
theUnitFlag : Integer;
|
||||
theUnitName : HAsciiString from TCollection;
|
||||
theLineWeightGrad : Integer;
|
||||
theMaxLineWeight : Real;
|
||||
theDate : HAsciiString from TCollection;
|
||||
theResolution : Real;
|
||||
theMaxCoord : Real;
|
||||
hasMaxCoord : Boolean;
|
||||
|
||||
theAuthorName : HAsciiString from TCollection;
|
||||
theCompanyName : HAsciiString from TCollection;
|
||||
theIGESVersion : Integer;
|
||||
theDraftingStandard : Integer;
|
||||
|
||||
theLastChangeDate : HAsciiString from TCollection; -- only from IGES-5.1
|
||||
theAppliProtocol : HAsciiString from TCollection; -- only from IGES-5.3
|
||||
|
||||
end GlobalSection;
|
@@ -16,31 +16,30 @@
|
||||
//#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000 and YYYYMMDD.HHMMSS after Y2000)
|
||||
//#66 rln Setting IGES 5.3 by default
|
||||
//#73 rln 10.03.99 S4135: "read.scale.unit" is applied after translation
|
||||
#include <IGESData_GlobalSection.ixx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <Interface_FloatWriter.hxx>
|
||||
#include <Interface_FileReaderData.hxx>
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <IGESData_BasicEditor.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_FileReaderData.hxx>
|
||||
#include <Interface_FloatWriter.hxx>
|
||||
#include <Interface_ParamSet.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <OSD_Process.hxx>
|
||||
#include <Quantity_Date.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <IGESData_BasicEditor.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
// MGE 21/07/98
|
||||
#include <Message_Msg.hxx>
|
||||
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <UnitsMethods.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
// MGE 21/07/98
|
||||
// valeurs en MILLIMETRE pardefaut, reajustable
|
||||
//static Standard_Real convunit = 1000.;
|
||||
|
||||
|
||||
// Routines locales copiant une string [l`ideal serait : astr = astr->Copy()]
|
||||
// et transformant un CString (Hollerith ou non) en HAsciiString non Holl.
|
||||
// et l inverse
|
||||
|
||||
|
||||
static void CopyString (Handle(TCollection_HAsciiString)& astr);
|
||||
|
||||
static void MakeHollerith(const Handle(TCollection_HAsciiString)& astr,
|
||||
|
290
src/IGESData/IGESData_GlobalSection.hxx
Normal file
290
src/IGESData/IGESData_GlobalSection.hxx
Normal file
@@ -0,0 +1,290 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_GlobalSection_HeaderFile
|
||||
#define _IGESData_GlobalSection_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Character.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
class Interface_ParamSet;
|
||||
class Interface_Check;
|
||||
class gp_XYZ;
|
||||
|
||||
|
||||
//! Description of a global section (corresponds to file header)
|
||||
//! used as well in IGESModel, IGESReader and IGESWriter
|
||||
//! Warning : From IGES-5.1, a parameter is added : LastChangeDate (concerns
|
||||
//! transferred set of data, not the file itself)
|
||||
//! Of course, it can be absent if read from earlier versions
|
||||
//! (a default is then to be set to current date)
|
||||
//! From 5.3, one more : ApplicationProtocol (optional)
|
||||
class IGESData_GlobalSection
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates an empty GlobalSection, ready to be filled,
|
||||
//! Warning : No default value is provided
|
||||
Standard_EXPORT IGESData_GlobalSection();
|
||||
|
||||
//! Fills GlobalSection from a ParamSet (i.e. taken from file)
|
||||
//! undefined parameters do not change default values when defined
|
||||
//! Fills Check about Corrections or Fails
|
||||
Standard_EXPORT void Init (const Handle(Interface_ParamSet)& params, Handle(Interface_Check)& ach);
|
||||
|
||||
//! Copies data referenced by Handle (that is, Strings)
|
||||
//! usefull to "isolate" a GlobalSection after copy by "="
|
||||
//! (from a Model to another Model for instance)
|
||||
Standard_EXPORT void CopyRefs();
|
||||
|
||||
//! Returns all contained data in the form of a ParamSet
|
||||
//! Remark : Strings are given under Hollerith form
|
||||
Standard_EXPORT Handle(Interface_ParamSet) Params() const;
|
||||
|
||||
//! Returns a string withpout its Hollerith marks (nnnH ahead).
|
||||
//! Remark : all strings stored in GlobalSection are expurged
|
||||
//! from Hollerith informations (without nnnH)
|
||||
//! If <astr> is not Hollerith form, it is simply copied
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) TranslatedFromHollerith (const Handle(TCollection_HAsciiString)& astr) const;
|
||||
|
||||
//! Returns the parameter delimiter character.
|
||||
Standard_EXPORT Standard_Character Separator() const;
|
||||
|
||||
//! Returns the record delimiter character.
|
||||
Standard_EXPORT Standard_Character EndMark() const;
|
||||
|
||||
//! Returns the name of the sending system.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) SendName() const;
|
||||
|
||||
//! Returns the name of the IGES file.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) FileName() const;
|
||||
|
||||
//! Returns the Native System ID of the system that created the IGES file.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) SystemId() const;
|
||||
|
||||
//! Returns the name of the pre-processor used to write the IGES file.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) InterfaceVersion() const;
|
||||
|
||||
//! Returns the number of binary bits for integer representations.
|
||||
Standard_EXPORT Standard_Integer IntegerBits() const;
|
||||
|
||||
//! Returns the maximum power of a decimal representation of a
|
||||
//! single-precision floating point number in the sending system.
|
||||
Standard_EXPORT Standard_Integer MaxPower10Single() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer MaxDigitsSingle() const;
|
||||
|
||||
//! Returns the maximum power of a decimal representation of a
|
||||
//! double-precision floating point number in the sending system.
|
||||
Standard_EXPORT Standard_Integer MaxPower10Double() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer MaxDigitsDouble() const;
|
||||
|
||||
//! Returns the name of the receiving system.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) ReceiveName() const;
|
||||
|
||||
//! Returns the scale used in the IGES file.
|
||||
Standard_EXPORT Standard_Real Scale() const;
|
||||
|
||||
//! Returns the unit flag that was used to write the IGES file.
|
||||
Standard_EXPORT Standard_Integer UnitFlag() const;
|
||||
|
||||
//! Returns the name of the unit the IGES file was written in.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) UnitName() const;
|
||||
|
||||
//! Returns the maximum number of line weight gradations.
|
||||
Standard_EXPORT Standard_Integer LineWeightGrad() const;
|
||||
|
||||
//! Returns the of maximum line weight width in IGES file units.
|
||||
Standard_EXPORT Standard_Real MaxLineWeight() const;
|
||||
|
||||
//! Returns the IGES file creation date.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Date() const;
|
||||
|
||||
//! Returns the resolution used in the IGES file.
|
||||
Standard_EXPORT Standard_Real Resolution() const;
|
||||
|
||||
//! Returns the approximate maximum coordinate value found in the model.
|
||||
Standard_EXPORT Standard_Real MaxCoord() const;
|
||||
|
||||
//! Returns True if the approximate maximum coordinate value found in
|
||||
//! the model is greater than 0.
|
||||
Standard_EXPORT Standard_Boolean HasMaxCoord() const;
|
||||
|
||||
//! Returns the name of the IGES file author.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) AuthorName() const;
|
||||
|
||||
//! Returns the name of the company where the IGES file was written.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) CompanyName() const;
|
||||
|
||||
//! Returns the IGES version that the IGES file was written in.
|
||||
Standard_EXPORT Standard_Integer IGESVersion() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer DraftingStandard() const;
|
||||
|
||||
//! Returns the date and time when the model was created or last
|
||||
//! modified (for IGES 5.1 and later).
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) LastChangeDate() const;
|
||||
|
||||
//! Returns True if the date and time when the model was created or
|
||||
//! last modified are specified, i.e. not defaulted to NULL.
|
||||
Standard_EXPORT Standard_Boolean HasLastChangeDate() const;
|
||||
|
||||
Standard_EXPORT void SetLastChangeDate();
|
||||
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) ApplicationProtocol() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasApplicationProtocol() const;
|
||||
|
||||
//! Returns a string built from year,
|
||||
//! month, day, hour, minute and second values. The form of the
|
||||
//! resulting string is defined as follows:
|
||||
//! - -1: YYMMDD.HHNNSS,
|
||||
//! - 0: YYYYMMDD.HHNNSS,
|
||||
//! - 1: YYYY-MM-DD:HH-NN-SS, where:
|
||||
//! - YYYY or YY is 4 or 2 digit year,
|
||||
//! - HH is hour (00-23),
|
||||
//! - MM is month (01-12),
|
||||
//! - NN is minute (00-59)
|
||||
//! - DD is day (01-31),
|
||||
//! - SS is second (00-59).
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) NewDateString (const Standard_Integer year, const Standard_Integer month, const Standard_Integer day, const Standard_Integer hour, const Standard_Integer minut, const Standard_Integer second, const Standard_Integer mode = -1);
|
||||
|
||||
//! Converts the string given in the
|
||||
//! form YYMMDD.HHNNSS or YYYYMMDD.HHNNSS to either
|
||||
//! YYMMDD.HHNNSS, YYYYMMDD.HHNNSS or YYYY-MM-DD:HH-NN-SS.
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) NewDateString (const Handle(TCollection_HAsciiString)& date, const Standard_Integer mode = 1);
|
||||
|
||||
//! Returns the unit value (in
|
||||
//! meters) that the IGES file was written in.
|
||||
Standard_EXPORT Standard_Real UnitValue() const;
|
||||
|
||||
Standard_EXPORT void SetSeparator (const Standard_Character val);
|
||||
|
||||
Standard_EXPORT void SetEndMark (const Standard_Character val);
|
||||
|
||||
Standard_EXPORT void SetSendName (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetFileName (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetSystemId (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetInterfaceVersion (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetIntegerBits (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetMaxPower10Single (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetMaxDigitsSingle (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetMaxPower10Double (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetMaxDigitsDouble (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetReceiveName (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetScale (const Standard_Real val);
|
||||
|
||||
Standard_EXPORT void SetUnitFlag (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetUnitName (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetLineWeightGrad (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetMaxLineWeight (const Standard_Real val);
|
||||
|
||||
Standard_EXPORT void SetDate (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetResolution (const Standard_Real val);
|
||||
|
||||
Standard_EXPORT void SetMaxCoord (const Standard_Real val = 0.0);
|
||||
|
||||
Standard_EXPORT void MaxMaxCoord (const Standard_Real val = 0.0);
|
||||
|
||||
Standard_EXPORT void MaxMaxCoords (const gp_XYZ& xyz);
|
||||
|
||||
Standard_EXPORT void SetAuthorName (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetCompanyName (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetIGESVersion (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetDraftingStandard (const Standard_Integer val);
|
||||
|
||||
Standard_EXPORT void SetLastChangeDate (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT void SetApplicationProtocol (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Character theSeparator;
|
||||
Standard_Character theEndMark;
|
||||
Handle(TCollection_HAsciiString) theSendName;
|
||||
Handle(TCollection_HAsciiString) theFileName;
|
||||
Handle(TCollection_HAsciiString) theSystemId;
|
||||
Handle(TCollection_HAsciiString) theInterfaceVersion;
|
||||
Standard_Integer theIntegerBits;
|
||||
Standard_Integer theMaxPower10Single;
|
||||
Standard_Integer theMaxDigitsSingle;
|
||||
Standard_Integer theMaxPower10Double;
|
||||
Standard_Integer theMaxDigitsDouble;
|
||||
Handle(TCollection_HAsciiString) theReceiveName;
|
||||
Standard_Real theScale;
|
||||
Standard_Integer theUnitFlag;
|
||||
Handle(TCollection_HAsciiString) theUnitName;
|
||||
Standard_Integer theLineWeightGrad;
|
||||
Standard_Real theMaxLineWeight;
|
||||
Handle(TCollection_HAsciiString) theDate;
|
||||
Standard_Real theResolution;
|
||||
Standard_Real theMaxCoord;
|
||||
Standard_Boolean hasMaxCoord;
|
||||
Handle(TCollection_HAsciiString) theAuthorName;
|
||||
Handle(TCollection_HAsciiString) theCompanyName;
|
||||
Standard_Integer theIGESVersion;
|
||||
Standard_Integer theDraftingStandard;
|
||||
Handle(TCollection_HAsciiString) theLastChangeDate;
|
||||
Handle(TCollection_HAsciiString) theAppliProtocol;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_GlobalSection_HeaderFile
|
@@ -1,99 +0,0 @@
|
||||
-- Created on: 1993-09-06
|
||||
-- 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 IGESDumper from IGESData
|
||||
|
||||
---Purpose : Provides a way to obtain a clear Dump of an IGESEntity
|
||||
-- (distinct from normalized output). It works with tools
|
||||
-- attached to Entities, as for normalized Reade and Write
|
||||
--
|
||||
-- For each Entity, displaying data is splitted in own data
|
||||
-- (specific to each type) and other attached data, which are
|
||||
-- defined for all IGES Types (either from "Directory Entry" or
|
||||
-- from Lists of Associativities and Properties)
|
||||
|
||||
uses Messenger from Message, Protocol from IGESData, IGESModel, IGESEntity, SpecificLib
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create (model : IGESModel; protocol : Protocol from IGESData)
|
||||
returns IGESDumper;
|
||||
---Purpose : Returns an IGESDumper ready to work. The IGESModel provides
|
||||
-- the numbering of Entities : as for any InterfaceModel, it
|
||||
-- gives each Entity a number; but for IGESEntities, the "Number
|
||||
-- of Directory Entry" according to the definition of IGES Files,
|
||||
-- is also usefull
|
||||
|
||||
PrintDNum (me; ent : IGESEntity; S : Messenger from Message)
|
||||
---Purpose : Prints onto an output, the "Number of Directory Entry" which
|
||||
-- corresponds to an IGESEntity in the IGESModel, under the form
|
||||
-- "D#nnn" (a Null Handle gives D#0)
|
||||
raises InterfaceError;
|
||||
-- Error if <ent> is not contained in the IGESModel
|
||||
|
||||
PrintShort (me; ent : IGESEntity; S : Messenger from Message)
|
||||
---Purpose : Prints onto an output, the "Number of Directory Entry" (see
|
||||
-- PrintDNum) plus IGES Type and Form Numbers, which gives
|
||||
-- "D#nnn Type nnn Form nnn"
|
||||
raises InterfaceError;
|
||||
-- Error if <ent> is not contained in the IGESModel
|
||||
|
||||
Dump (me; ent : IGESEntity; S : Messenger from Message;
|
||||
own : Integer; attached : Integer = -1)
|
||||
-- <own> commands level for proper data :
|
||||
-- 0 : Only DNum (PrintDNum)
|
||||
-- 1 : DNum with IGES Type and Form N0s (PrintShort) & Type Name
|
||||
-- 2 : idem plus (if defined) DNum of Transf and of View, and
|
||||
-- (if defined) ShortLabel and Subscript Number
|
||||
-- 3 : idem plus (if defined) Value of Transf, DNum or Value of
|
||||
-- other Directory Data (Color, etc...)
|
||||
-- 4 and over : idem plus calls method OwnDump
|
||||
--
|
||||
-- When Implementing OwnDump, Please use this convention :
|
||||
-- Anyway, give true complete IGES Name for Entity
|
||||
-- 4 : proper values as store in the fields of the Entity,
|
||||
-- abbreviated if list is very long ...
|
||||
-- 5 : idem but complete display of fields (even if long)
|
||||
-- 6 : data under a comprehensive form if necessary, especially
|
||||
-- taking in account Transf (e.g. for a Circle : give in 3D
|
||||
-- Center, Radius, Axis ...)
|
||||
-- In addition, for referenced Entities, simply display them by
|
||||
-- call to PrintDNum above
|
||||
--
|
||||
-- <attached> commands level for Properties and Associativities
|
||||
-- with same signification as <own>, except for value 0 :
|
||||
-- if <own> = 0 or 1, these lists are NOT printed at all
|
||||
-- if <own> = 2, for each attached entity, call to PrintDNum
|
||||
-- if <own> over 2, for each attached entity, call to PrintShort
|
||||
-- (DNum with Type and Form numbers)
|
||||
-- In addition, -1 inhibits output (only DNum are printed)
|
||||
raises InterfaceError;
|
||||
-- Error if <ent> is not contained in the IGESModel
|
||||
-- Remark : if <ent> is Null, the message "(Null)" is displayed
|
||||
|
||||
|
||||
OwnDump (me; ent : IGESEntity; S : Messenger from Message; own : Integer);
|
||||
---Purpose : Specific Dump for each IGES Entity, call by Dump (just above)
|
||||
-- <own> is the parameter <own> from Dump
|
||||
|
||||
fields
|
||||
|
||||
themodel : IGESModel;
|
||||
thelib : SpecificLib;
|
||||
|
||||
end IGESDumper;
|
@@ -11,21 +11,25 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_IGESDumper.ixx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_IGESDumper.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IGESData_IGESDumper::IGESData_IGESDumper
|
||||
(const Handle(IGESData_IGESModel)& model,
|
||||
|
96
src/IGESData/IGESData_IGESDumper.hxx
Normal file
96
src/IGESData/IGESData_IGESDumper.hxx
Normal file
@@ -0,0 +1,96 @@
|
||||
// Created on: 1993-09-06
|
||||
// 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 _IGESData_IGESDumper_HeaderFile
|
||||
#define _IGESData_IGESDumper_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESData_IGESModel;
|
||||
class Interface_InterfaceError;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESEntity;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
//! Provides a way to obtain a clear Dump of an IGESEntity
|
||||
//! (distinct from normalized output). It works with tools
|
||||
//! attached to Entities, as for normalized Reade and Write
|
||||
//!
|
||||
//! For each Entity, displaying data is splitted in own data
|
||||
//! (specific to each type) and other attached data, which are
|
||||
//! defined for all IGES Types (either from "Directory Entry" or
|
||||
//! from Lists of Associativities and Properties)
|
||||
class IGESData_IGESDumper
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns an IGESDumper ready to work. The IGESModel provides
|
||||
//! the numbering of Entities : as for any InterfaceModel, it
|
||||
//! gives each Entity a number; but for IGESEntities, the "Number
|
||||
//! of Directory Entry" according to the definition of IGES Files,
|
||||
//! is also usefull
|
||||
Standard_EXPORT IGESData_IGESDumper(const Handle(IGESData_IGESModel)& model, const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! Prints onto an output, the "Number of Directory Entry" which
|
||||
//! corresponds to an IGESEntity in the IGESModel, under the form
|
||||
//! "D#nnn" (a Null Handle gives D#0)
|
||||
Standard_EXPORT void PrintDNum (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
//! Prints onto an output, the "Number of Directory Entry" (see
|
||||
//! PrintDNum) plus IGES Type and Form Numbers, which gives
|
||||
//! "D#nnn Type nnn Form nnn"
|
||||
Standard_EXPORT void PrintShort (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
Standard_EXPORT void Dump (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S, const Standard_Integer own, const Standard_Integer attached = -1) const;
|
||||
|
||||
//! Specific Dump for each IGES Entity, call by Dump (just above)
|
||||
//! <own> is the parameter <own> from Dump
|
||||
Standard_EXPORT void OwnDump (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(IGESData_IGESModel) themodel;
|
||||
IGESData_SpecificLib thelib;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESDumper_HeaderFile
|
@@ -1,371 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
deferred class IGESEntity from IGESData inherits TShared
|
||||
|
||||
---Purpose : defines root of IGES Entity definition, including Directory
|
||||
-- Part, lists of (optionnal) Properties and Associativities
|
||||
|
||||
uses CString, Type, HAsciiString from TCollection, OStream, GTrsf,
|
||||
EntityList, EntityIterator,
|
||||
IGESType, DefSwitch, DefType, DefList,
|
||||
LineFontEntity, LevelListEntity, ViewKindEntity,
|
||||
TransfEntity, LabelDisplayEntity, ColorEntity
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Initialize;
|
||||
---Purpose : prepares lists of optionnal data, set values to defaults
|
||||
|
||||
Clear (me : mutable) is private;
|
||||
---Purpose : Clears specific IGES data
|
||||
|
||||
-- -- Queries on Componants (Directory Part, optional lists) -- --
|
||||
|
||||
IGESType (me) returns IGESType;
|
||||
---Purpose : gives IGES typing info (includes "Type" and "Form" data)
|
||||
|
||||
TypeNumber (me) returns Integer;
|
||||
---Purpose : gives IGES Type Number (often coupled with Form Number)
|
||||
|
||||
FormNumber (me) returns Integer;
|
||||
---Purpose : Returns the form number for that
|
||||
-- type of an IGES entity. The default form number is 0.
|
||||
|
||||
|
||||
DirFieldEntity (me; fieldnum : Integer) returns IGESEntity;
|
||||
---Purpose : Returns the Entity which has been recorded for a given
|
||||
-- Field Number, i.e. without any cast. Maps with :
|
||||
-- 3 : Structure 4 : LineFont 5 : LevelList 6 : View
|
||||
-- 7 : Transf(ormation Matrix) 8 : LabelDisplay
|
||||
-- 13 : Color. Other values give a null handle
|
||||
-- It can then be of any kind, while specific items have a Type
|
||||
|
||||
HasStructure (me) returns Boolean;
|
||||
---Purpose : returns True if an IGESEntity is defined with a Structure
|
||||
-- (it is normally reserved for certain classes, such as Macros)
|
||||
|
||||
Structure (me) returns IGESEntity;
|
||||
---Purpose : Returns Structure (used by some types of IGES Entities only)
|
||||
-- Returns a Null Handle if Structure is not defined
|
||||
|
||||
DefLineFont (me) returns DefType is virtual;
|
||||
---Purpose : Returns the definition status of LineFont
|
||||
|
||||
RankLineFont (me) returns Integer;
|
||||
---Purpose : Returns LineFont definition as an Integer (if defined as Rank)
|
||||
-- If LineFont is defined as an Entity, returns a negative value
|
||||
|
||||
LineFont (me) returns LineFontEntity;
|
||||
---Purpose : Returns LineFont as an Entity (if defined as Reference)
|
||||
-- Returns a Null Handle if DefLineFont is not "DefReference"
|
||||
|
||||
DefLevel (me) returns DefList is virtual;
|
||||
---Purpose : Returns the definition status of Level
|
||||
|
||||
Level (me) returns Integer;
|
||||
---Purpose : Returns the level the entity
|
||||
-- belongs to. Returns -1 if the entity belongs to more than one level.
|
||||
|
||||
LevelList (me) returns LevelListEntity;
|
||||
---Purpose : Returns LevelList if Level is
|
||||
-- defined as a list. Returns a null handle if DefLevel is not DefSeveral.
|
||||
|
||||
DefView (me) returns DefList is virtual;
|
||||
---Purpose : Returns the definition status of
|
||||
-- the view. This can be: none, one or several.
|
||||
|
||||
View (me) returns ViewKindEntity;
|
||||
---Purpose : Returns the view of this IGES entity.
|
||||
-- This view can be a single view or a list of views.
|
||||
-- Warning A null handle is returned if the view is not defined.
|
||||
|
||||
SingleView (me) returns ViewKindEntity;
|
||||
---Purpose : Returns the view as a single view
|
||||
-- if it was defined as such and not as a list of views.
|
||||
-- Warning A null handle is returned if DefView does not have the value DefOne.
|
||||
|
||||
ViewList (me) returns ViewKindEntity;
|
||||
---Purpose : Returns the view of this IGES entity as a list.
|
||||
-- Warning A null handle is returned if the
|
||||
-- definition status does not have the value DefSeveral.
|
||||
|
||||
HasTransf (me) returns Boolean;
|
||||
---Purpose : Returns True if a Transformation Matrix is defined
|
||||
|
||||
Transf (me) returns TransfEntity;
|
||||
---Purpose : Returns the Transformation Matrix (under IGES definition)
|
||||
-- Returns a Null Handle if there is none
|
||||
-- for a more complete use, see Location & CompoundLocation
|
||||
|
||||
HasLabelDisplay (me) returns Boolean;
|
||||
---Purpose : Returns True if a LabelDisplay mode is defined for this entity
|
||||
|
||||
LabelDisplay (me) returns LabelDisplayEntity;
|
||||
---Purpose : Returns the Label Display
|
||||
-- Associativity Entity if there is one. Returns a null handle if there is none.
|
||||
|
||||
BlankStatus (me) returns Integer;
|
||||
---Purpose : gives Blank Status (0 visible, 1 blanked)
|
||||
|
||||
SubordinateStatus (me) returns Integer;
|
||||
---Purpose : gives Subordinate Switch (0-1-2-3)
|
||||
|
||||
UseFlag (me) returns Integer;
|
||||
---Purpose : gives Entity's Use Flag (0 to 5)
|
||||
|
||||
HierarchyStatus (me) returns Integer;
|
||||
---Purpose : gives Hierarchy status (0-1-2)
|
||||
|
||||
LineWeightNumber (me) returns Integer;
|
||||
---Purpose : Returns the LineWeight Number (0 not defined), see also LineWeight
|
||||
|
||||
LineWeight (me) returns Real;
|
||||
---Purpose : Returns the true Line Weight, computed from LineWeightNumber and
|
||||
-- Global Parameter in the Model by call to SetLineWeight
|
||||
|
||||
DefColor (me) returns DefType is virtual;
|
||||
---Purpose : Returns the definition status of Color.
|
||||
|
||||
RankColor (me) returns Integer;
|
||||
---Purpose : Returns the color definition as
|
||||
-- an integer value if the color was defined as a rank.
|
||||
-- Warning A negative value is returned if the color was defined as an entity.
|
||||
|
||||
Color (me) returns ColorEntity;
|
||||
---Purpose : Returns the IGES entity which
|
||||
-- describes the color of the entity.
|
||||
-- Returns a null handle if this entity was defined as an integer.
|
||||
|
||||
CResValues (me; res1,res2 : CString) returns Boolean;
|
||||
---Purpose : returns "reserved" alphanumeric values res1 and res2
|
||||
-- res1 and res2 have to be reserved as Character[9 at least]
|
||||
-- (remark : their content is changed)
|
||||
-- returned values are ended by null character in 9th
|
||||
-- returned Boolean is False if res1 and res2 are blank, true else
|
||||
|
||||
HasShortLabel (me) returns Boolean;
|
||||
---Purpose : Returns true if a short label is defined.
|
||||
-- A short label is a non-blank 8-character string.
|
||||
|
||||
ShortLabel (me) returns HAsciiString from TCollection;
|
||||
---Purpose : Returns the label value for this IGES entity as a string.
|
||||
-- Warning If the label is blank, this string is null.
|
||||
|
||||
HasSubScriptNumber (me) returns Boolean is virtual;
|
||||
---Purpose : Returns true if a subscript number is defined.
|
||||
-- A subscript number is an integer used to identify a label.
|
||||
|
||||
SubScriptNumber (me) returns Integer;
|
||||
---Purpose : Returns the integer subscript number used to identify this IGES entity.
|
||||
-- Warning 0 is returned if no subscript number is defined for this IGES entity.
|
||||
|
||||
InitTypeAndForm (me : mutable; typenum,formnum : Integer) is protected;
|
||||
---Purpose : Initializes Type and Form Numbers to new values. Reserved for
|
||||
-- special uses
|
||||
|
||||
InitDirFieldEntity (me : mutable; fieldnum : Integer; ent : IGESEntity);
|
||||
---Purpose : Initializes a directory field as an Entiy of any kind
|
||||
-- See DirFieldEntity for more details
|
||||
|
||||
InitTransf (me : mutable; ent : TransfEntity);
|
||||
---Purpose : Initializes Transf, or erases it if <ent> is given Null
|
||||
|
||||
InitView (me : mutable; ent : ViewKindEntity);
|
||||
---Purpose : Initializes View, or erases it if <ent> is given Null
|
||||
|
||||
InitLineFont (me : mutable; ent : LineFontEntity; rank : Integer = 0);
|
||||
---Purpose : Initializes LineFont : if <ent> is not Null, it gives LineFont,
|
||||
-- else <rank> gives or erases (if zero) RankLineFont
|
||||
|
||||
InitLevel (me : mutable; ent : LevelListEntity; val : Integer = 0);
|
||||
---Purpose : Initializes Level : if <ent> is not Null, it gives LevelList,
|
||||
-- else <val> gives or erases (if zero) unique Level
|
||||
|
||||
InitColor (me : mutable; ent : ColorEntity; rank : Integer = 0);
|
||||
---Purpose : Initializes Color data : if <ent> is not Null, it gives Color,
|
||||
-- else <rank> gives or erases (if zero) RankColor
|
||||
|
||||
InitStatus (me : mutable; blank, subordinate, useflag, hierarchy : Integer);
|
||||
---Purpose : Initializes the Status of Directory Part
|
||||
|
||||
SetLabel (me : mutable; label : HAsciiString from TCollection;
|
||||
sub : Integer = -1);
|
||||
---Purpose : Sets a new Label to an IGES Entity
|
||||
-- If <sub> is given, it sets value of SubScriptNumber
|
||||
-- else, SubScriptNumber is erased
|
||||
|
||||
InitMisc (me : mutable; str : IGESEntity; lab : LabelDisplayEntity;
|
||||
weightnum : Integer);
|
||||
---Purpose : Initializes various data (those not yet seen above), or erases
|
||||
-- them if they are given as Null (Zero for <weightnum>) :
|
||||
-- <str> for Structure, <lab> for LabelDisplay, and
|
||||
-- <weightnum> for WeightNumber
|
||||
|
||||
-- -- Complements (with a basic sense) -- --
|
||||
|
||||
HasOneParent (me) returns Boolean;
|
||||
---Purpose : Returns True if an entity has one and only one parent, defined
|
||||
-- by a SingleParentEntity Type Associativity (explicit sharing).
|
||||
-- Thus, implicit sharing remains defined at model level
|
||||
-- (see class ToolLocation)
|
||||
|
||||
UniqueParent (me) returns IGESEntity raises InterfaceError;
|
||||
---Purpose : Returns the Unique Parent (in the sense given by HasOneParent)
|
||||
-- Error if there is none or several
|
||||
|
||||
Location (me) returns GTrsf;
|
||||
---Purpose : Returns Location given by Transf in Directory Part (see above)
|
||||
-- It must be considered for local definition : if the Entity is
|
||||
-- set in a "Parent", that one can add its one Location, but this
|
||||
-- is not taken in account here : see CompoundLocation for that.
|
||||
-- If no Transf is defined, returns Identity
|
||||
-- If Transf is itself compound, gives the final result
|
||||
|
||||
VectorLocation (me) returns GTrsf;
|
||||
---Purpose : Returns Location considered for Vectors, i.e. without its
|
||||
-- Translation Part. As Location, it gives local definition.
|
||||
|
||||
CompoundLocation (me) returns GTrsf;
|
||||
---Purpose : Returns Location by taking in account a Parent which has its
|
||||
-- own Location : that one will be combined to that of <me>
|
||||
-- The Parent is considered only if HasOneParent is True,
|
||||
-- else it is ignored and CompoundLocation = Location
|
||||
|
||||
HasName (me) returns Boolean;
|
||||
---Purpose : says if a Name is defined, as Short Label or as Name Property
|
||||
-- (Property is looked first, else ShortLabel is considered)
|
||||
|
||||
NameValue (me) returns HAsciiString from TCollection;
|
||||
---Purpose : returns Name value as a String (Property Name or ShortLabel)
|
||||
-- if SubNumber is defined, it is concatenated after ShortLabel
|
||||
-- as follows label(number). Ignored with a Property Name
|
||||
|
||||
-- -- Optionnal lists of Associativities and Properties -- --
|
||||
|
||||
ArePresentAssociativities (me) returns Boolean;
|
||||
---Purpose : Returns True if the Entity is defined with an Associativity
|
||||
-- list, even empty (that is, file contains its length 0)
|
||||
-- Else, the file contained NO idencation at all about this list.
|
||||
|
||||
NbAssociativities (me) returns Integer;
|
||||
---Purpose : gives number of recorded associativities (0 no list defined)
|
||||
|
||||
Associativities (me) returns EntityIterator;
|
||||
---Purpose : Returns the Associativity List under the form of an EntityIterator.
|
||||
|
||||
NbTypedAssociativities (me; atype : Type) returns Integer;
|
||||
---Purpose : gives how many Associativities have a given type
|
||||
|
||||
TypedAssociativity (me; atype : Type)
|
||||
returns IGESEntity raises InterfaceError;
|
||||
---Purpose : returns the Associativity of a given Type (if only one exists)
|
||||
-- Error if none or more than one
|
||||
|
||||
AddAssociativity (me : mutable; ent : IGESEntity) is private;
|
||||
---Purpose : Adds an Associativity in the list (called by Associate only)
|
||||
|
||||
RemoveAssociativity (me : mutable; ent : IGESEntity) is private;
|
||||
---Purpose : Removes an Associativity from the list (called by Dissociate)
|
||||
|
||||
LoadAssociativities (me : mutable; list : EntityList) is protected;
|
||||
---Purpose : Loads a complete, already loaded, List of Asociativities
|
||||
-- (used during Read or Copy Operations)
|
||||
|
||||
ClearAssociativities (me : mutable) is private;
|
||||
---Purpose : Removes all associativities in once
|
||||
|
||||
Associate (me ; ent : IGESEntity);
|
||||
---Purpose : Sets "me" in the Associativity list of another Entity
|
||||
|
||||
Dissociate (me ; ent : IGESEntity);
|
||||
---Purpose : Resets "me" from the Associativity list of another Entity
|
||||
|
||||
|
||||
ArePresentProperties (me) returns Boolean;
|
||||
---Purpose : Returns True if the Entity is defined with a Property list,
|
||||
-- even empty (that is, file contains its length 0)
|
||||
-- Else, the file contained NO idencation at all about this list
|
||||
|
||||
NbProperties (me) returns Integer;
|
||||
---Purpose : Gives number of recorded properties (0 no list defined)
|
||||
|
||||
Properties (me) returns EntityIterator;
|
||||
---Purpose : Returns Property List under the form of an EntityIterator
|
||||
|
||||
NbTypedProperties (me; atype : Type) returns Integer;
|
||||
---Purpose : gives how many Properties have a given type
|
||||
|
||||
TypedProperty (me; atype : Type; anum : Integer = 0)
|
||||
returns IGESEntity raises InterfaceError;
|
||||
---Purpose : returns the Property of a given Type
|
||||
-- Error if none or more than one
|
||||
|
||||
AddProperty (me : mutable; ent : IGESEntity);
|
||||
---Purpose : Adds a Property in the list
|
||||
|
||||
RemoveProperty (me : mutable; ent : IGESEntity);
|
||||
---Purpose : Removes a Property from the list
|
||||
|
||||
LoadProperties (me : mutable; list : EntityList) is protected;
|
||||
---Purpose : Loads a complete, already loaded, List of Properties
|
||||
-- (used during Read or Copy Operations)
|
||||
|
||||
ClearProperties (me : mutable) is protected;
|
||||
---Purpose : Removes all properties in once
|
||||
|
||||
-- -- General actions -- --
|
||||
|
||||
SetLineWeight (me : mutable; defw,maxw : Real; gradw : Integer);
|
||||
---Purpose : computes and sets "true" line weight according IGES rules from
|
||||
-- global data MaxLineWeight (maxv) and LineWeightGrad (gradw),
|
||||
-- or sets it to defw (Default) if LineWeightNumber is null
|
||||
|
||||
fields
|
||||
-- Entities are recorded as any, this allows special uses (with user defs)
|
||||
|
||||
theType : Integer;
|
||||
theForm : Integer;
|
||||
theStructure : IGESEntity; -- used by some Entities
|
||||
theDefLineFont : DefSwitch;
|
||||
theLineFont : IGESEntity; -- LineFont if Def if "Reference"
|
||||
theDefLevel : Integer; -- >0 (One level) =0 (None) <0 (Several)
|
||||
theLevelList : IGESEntity; -- LevelList if Def is "Several"
|
||||
theView : IGESEntity; -- Simple View, List of Views, Null,other
|
||||
theTransf : IGESEntity; -- Transformation Matrix or Null
|
||||
theLabDisplay : IGESEntity; -- LabelDisplay .. or Null
|
||||
theStatusNum : Integer; -- for BlankSt,SubordinateSt,UseFlag,Hierarchy
|
||||
theLWeightNum : Integer; -- recorded LineWeightNumber (can be 0)
|
||||
theLWeightVal : Real; -- LineWeight computed from global data
|
||||
theDefColor : DefSwitch;
|
||||
theColor : IGESEntity; -- ColorEntity if DefColor is "Reference"
|
||||
theRes1 : Character[9]; -- reserved for future use
|
||||
theRes2 : Character[9];
|
||||
theShortLabel : HAsciiString from TCollection; -- .. or Null if blank
|
||||
theSubScriptN : Integer; -- <0 blank, =0 given 0, >0 defined
|
||||
|
||||
|
||||
theAssocs : EntityList; -- Associativity list
|
||||
theProps : EntityList; -- Property list
|
||||
|
||||
friends
|
||||
|
||||
class ReadWriteModule from IGESData , class GeneralModule from IGESData ,
|
||||
class IGESReaderTool from IGESData , class DirChecker from IGESData
|
||||
|
||||
end IGESEntity;
|
@@ -11,17 +11,32 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_IGESEntity.ixx>
|
||||
|
||||
#include <gp_GTrsf.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DirChecker.hxx>
|
||||
#include <IGESData_GeneralModule.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESReaderTool.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_NameEntity.hxx>
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_SingleParentEntity.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_EntityList.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_PCharacter.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#define ThisEntity Handle(IGESData_IGESEntity)::DownCast(This())
|
||||
|
||||
namespace
|
||||
|
404
src/IGESData/IGESData_IGESEntity.hxx
Normal file
404
src/IGESData/IGESData_IGESEntity.hxx
Normal file
@@ -0,0 +1,404 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_IGESEntity_HeaderFile
|
||||
#define _IGESData_IGESEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IGESData_DefSwitch.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Character.hxx>
|
||||
#include <Interface_EntityList.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IGESData_DefType.hxx>
|
||||
#include <IGESData_DefList.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
class Interface_InterfaceError;
|
||||
class IGESData_ReadWriteModule;
|
||||
class IGESData_GeneralModule;
|
||||
class IGESData_IGESReaderTool;
|
||||
class IGESData_DirChecker;
|
||||
class IGESData_IGESType;
|
||||
class IGESData_LineFontEntity;
|
||||
class IGESData_LevelListEntity;
|
||||
class IGESData_ViewKindEntity;
|
||||
class IGESData_TransfEntity;
|
||||
class IGESData_LabelDisplayEntity;
|
||||
class IGESData_ColorEntity;
|
||||
class gp_GTrsf;
|
||||
class Interface_EntityIterator;
|
||||
class Interface_EntityList;
|
||||
|
||||
|
||||
class IGESData_IGESEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_IGESEntity, MMgt_TShared)
|
||||
|
||||
//! defines root of IGES Entity definition, including Directory
|
||||
//! Part, lists of (optionnal) Properties and Associativities
|
||||
class IGESData_IGESEntity : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! gives IGES typing info (includes "Type" and "Form" data)
|
||||
Standard_EXPORT IGESData_IGESType IGESType() const;
|
||||
|
||||
//! gives IGES Type Number (often coupled with Form Number)
|
||||
Standard_EXPORT Standard_Integer TypeNumber() const;
|
||||
|
||||
//! Returns the form number for that
|
||||
//! type of an IGES entity. The default form number is 0.
|
||||
Standard_EXPORT Standard_Integer FormNumber() const;
|
||||
|
||||
//! Returns the Entity which has been recorded for a given
|
||||
//! Field Number, i.e. without any cast. Maps with :
|
||||
//! 3 : Structure 4 : LineFont 5 : LevelList 6 : View
|
||||
//! 7 : Transf(ormation Matrix) 8 : LabelDisplay
|
||||
//! 13 : Color. Other values give a null handle
|
||||
//! It can then be of any kind, while specific items have a Type
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) DirFieldEntity (const Standard_Integer fieldnum) const;
|
||||
|
||||
//! returns True if an IGESEntity is defined with a Structure
|
||||
//! (it is normally reserved for certain classes, such as Macros)
|
||||
Standard_EXPORT Standard_Boolean HasStructure() const;
|
||||
|
||||
//! Returns Structure (used by some types of IGES Entities only)
|
||||
//! Returns a Null Handle if Structure is not defined
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) Structure() const;
|
||||
|
||||
//! Returns the definition status of LineFont
|
||||
Standard_EXPORT virtual IGESData_DefType DefLineFont() const;
|
||||
|
||||
//! Returns LineFont definition as an Integer (if defined as Rank)
|
||||
//! If LineFont is defined as an Entity, returns a negative value
|
||||
Standard_EXPORT Standard_Integer RankLineFont() const;
|
||||
|
||||
//! Returns LineFont as an Entity (if defined as Reference)
|
||||
//! Returns a Null Handle if DefLineFont is not "DefReference"
|
||||
Standard_EXPORT Handle(IGESData_LineFontEntity) LineFont() const;
|
||||
|
||||
//! Returns the definition status of Level
|
||||
Standard_EXPORT virtual IGESData_DefList DefLevel() const;
|
||||
|
||||
//! Returns the level the entity
|
||||
//! belongs to. Returns -1 if the entity belongs to more than one level.
|
||||
Standard_EXPORT Standard_Integer Level() const;
|
||||
|
||||
//! Returns LevelList if Level is
|
||||
//! defined as a list. Returns a null handle if DefLevel is not DefSeveral.
|
||||
Standard_EXPORT Handle(IGESData_LevelListEntity) LevelList() const;
|
||||
|
||||
//! Returns the definition status of
|
||||
//! the view. This can be: none, one or several.
|
||||
Standard_EXPORT virtual IGESData_DefList DefView() const;
|
||||
|
||||
//! Returns the view of this IGES entity.
|
||||
//! This view can be a single view or a list of views.
|
||||
//! Warning A null handle is returned if the view is not defined.
|
||||
Standard_EXPORT Handle(IGESData_ViewKindEntity) View() const;
|
||||
|
||||
//! Returns the view as a single view
|
||||
//! if it was defined as such and not as a list of views.
|
||||
//! Warning A null handle is returned if DefView does not have the value DefOne.
|
||||
Standard_EXPORT Handle(IGESData_ViewKindEntity) SingleView() const;
|
||||
|
||||
//! Returns the view of this IGES entity as a list.
|
||||
//! Warning A null handle is returned if the
|
||||
//! definition status does not have the value DefSeveral.
|
||||
Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewList() const;
|
||||
|
||||
//! Returns True if a Transformation Matrix is defined
|
||||
Standard_EXPORT Standard_Boolean HasTransf() const;
|
||||
|
||||
//! Returns the Transformation Matrix (under IGES definition)
|
||||
//! Returns a Null Handle if there is none
|
||||
//! for a more complete use, see Location & CompoundLocation
|
||||
Standard_EXPORT Handle(IGESData_TransfEntity) Transf() const;
|
||||
|
||||
//! Returns True if a LabelDisplay mode is defined for this entity
|
||||
Standard_EXPORT Standard_Boolean HasLabelDisplay() const;
|
||||
|
||||
//! Returns the Label Display
|
||||
//! Associativity Entity if there is one. Returns a null handle if there is none.
|
||||
Standard_EXPORT Handle(IGESData_LabelDisplayEntity) LabelDisplay() const;
|
||||
|
||||
//! gives Blank Status (0 visible, 1 blanked)
|
||||
Standard_EXPORT Standard_Integer BlankStatus() const;
|
||||
|
||||
//! gives Subordinate Switch (0-1-2-3)
|
||||
Standard_EXPORT Standard_Integer SubordinateStatus() const;
|
||||
|
||||
//! gives Entity's Use Flag (0 to 5)
|
||||
Standard_EXPORT Standard_Integer UseFlag() const;
|
||||
|
||||
//! gives Hierarchy status (0-1-2)
|
||||
Standard_EXPORT Standard_Integer HierarchyStatus() const;
|
||||
|
||||
//! Returns the LineWeight Number (0 not defined), see also LineWeight
|
||||
Standard_EXPORT Standard_Integer LineWeightNumber() const;
|
||||
|
||||
//! Returns the true Line Weight, computed from LineWeightNumber and
|
||||
//! Global Parameter in the Model by call to SetLineWeight
|
||||
Standard_EXPORT Standard_Real LineWeight() const;
|
||||
|
||||
//! Returns the definition status of Color.
|
||||
Standard_EXPORT virtual IGESData_DefType DefColor() const;
|
||||
|
||||
//! Returns the color definition as
|
||||
//! an integer value if the color was defined as a rank.
|
||||
//! Warning A negative value is returned if the color was defined as an entity.
|
||||
Standard_EXPORT Standard_Integer RankColor() const;
|
||||
|
||||
//! Returns the IGES entity which
|
||||
//! describes the color of the entity.
|
||||
//! Returns a null handle if this entity was defined as an integer.
|
||||
Standard_EXPORT Handle(IGESData_ColorEntity) Color() const;
|
||||
|
||||
//! returns "reserved" alphanumeric values res1 and res2
|
||||
//! res1 and res2 have to be reserved as Character[9 at least]
|
||||
//! (remark : their content is changed)
|
||||
//! returned values are ended by null character in 9th
|
||||
//! returned Boolean is False if res1 and res2 are blank, true else
|
||||
Standard_EXPORT Standard_Boolean CResValues (const Standard_CString res1, const Standard_CString res2) const;
|
||||
|
||||
//! Returns true if a short label is defined.
|
||||
//! A short label is a non-blank 8-character string.
|
||||
Standard_EXPORT Standard_Boolean HasShortLabel() const;
|
||||
|
||||
//! Returns the label value for this IGES entity as a string.
|
||||
//! Warning If the label is blank, this string is null.
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) ShortLabel() const;
|
||||
|
||||
//! Returns true if a subscript number is defined.
|
||||
//! A subscript number is an integer used to identify a label.
|
||||
Standard_EXPORT virtual Standard_Boolean HasSubScriptNumber() const;
|
||||
|
||||
//! Returns the integer subscript number used to identify this IGES entity.
|
||||
//! Warning 0 is returned if no subscript number is defined for this IGES entity.
|
||||
Standard_EXPORT Standard_Integer SubScriptNumber() const;
|
||||
|
||||
//! Initializes a directory field as an Entiy of any kind
|
||||
//! See DirFieldEntity for more details
|
||||
Standard_EXPORT void InitDirFieldEntity (const Standard_Integer fieldnum, const Handle(IGESData_IGESEntity)& ent);
|
||||
|
||||
//! Initializes Transf, or erases it if <ent> is given Null
|
||||
Standard_EXPORT void InitTransf (const Handle(IGESData_TransfEntity)& ent);
|
||||
|
||||
//! Initializes View, or erases it if <ent> is given Null
|
||||
Standard_EXPORT void InitView (const Handle(IGESData_ViewKindEntity)& ent);
|
||||
|
||||
//! Initializes LineFont : if <ent> is not Null, it gives LineFont,
|
||||
//! else <rank> gives or erases (if zero) RankLineFont
|
||||
Standard_EXPORT void InitLineFont (const Handle(IGESData_LineFontEntity)& ent, const Standard_Integer rank = 0);
|
||||
|
||||
//! Initializes Level : if <ent> is not Null, it gives LevelList,
|
||||
//! else <val> gives or erases (if zero) unique Level
|
||||
Standard_EXPORT void InitLevel (const Handle(IGESData_LevelListEntity)& ent, const Standard_Integer val = 0);
|
||||
|
||||
//! Initializes Color data : if <ent> is not Null, it gives Color,
|
||||
//! else <rank> gives or erases (if zero) RankColor
|
||||
Standard_EXPORT void InitColor (const Handle(IGESData_ColorEntity)& ent, const Standard_Integer rank = 0);
|
||||
|
||||
//! Initializes the Status of Directory Part
|
||||
Standard_EXPORT void InitStatus (const Standard_Integer blank, const Standard_Integer subordinate, const Standard_Integer useflag, const Standard_Integer hierarchy);
|
||||
|
||||
//! Sets a new Label to an IGES Entity
|
||||
//! If <sub> is given, it sets value of SubScriptNumber
|
||||
//! else, SubScriptNumber is erased
|
||||
Standard_EXPORT void SetLabel (const Handle(TCollection_HAsciiString)& label, const Standard_Integer sub = -1);
|
||||
|
||||
//! Initializes various data (those not yet seen above), or erases
|
||||
//! them if they are given as Null (Zero for <weightnum>) :
|
||||
//! <str> for Structure, <lab> for LabelDisplay, and
|
||||
//! <weightnum> for WeightNumber
|
||||
Standard_EXPORT void InitMisc (const Handle(IGESData_IGESEntity)& str, const Handle(IGESData_LabelDisplayEntity)& lab, const Standard_Integer weightnum);
|
||||
|
||||
//! Returns True if an entity has one and only one parent, defined
|
||||
//! by a SingleParentEntity Type Associativity (explicit sharing).
|
||||
//! Thus, implicit sharing remains defined at model level
|
||||
//! (see class ToolLocation)
|
||||
Standard_EXPORT Standard_Boolean HasOneParent() const;
|
||||
|
||||
//! Returns the Unique Parent (in the sense given by HasOneParent)
|
||||
//! Error if there is none or several
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) UniqueParent() const;
|
||||
|
||||
//! Returns Location given by Transf in Directory Part (see above)
|
||||
//! It must be considered for local definition : if the Entity is
|
||||
//! set in a "Parent", that one can add its one Location, but this
|
||||
//! is not taken in account here : see CompoundLocation for that.
|
||||
//! If no Transf is defined, returns Identity
|
||||
//! If Transf is itself compound, gives the final result
|
||||
Standard_EXPORT gp_GTrsf Location() const;
|
||||
|
||||
//! Returns Location considered for Vectors, i.e. without its
|
||||
//! Translation Part. As Location, it gives local definition.
|
||||
Standard_EXPORT gp_GTrsf VectorLocation() const;
|
||||
|
||||
//! Returns Location by taking in account a Parent which has its
|
||||
//! own Location : that one will be combined to that of <me>
|
||||
//! The Parent is considered only if HasOneParent is True,
|
||||
//! else it is ignored and CompoundLocation = Location
|
||||
Standard_EXPORT gp_GTrsf CompoundLocation() const;
|
||||
|
||||
//! says if a Name is defined, as Short Label or as Name Property
|
||||
//! (Property is looked first, else ShortLabel is considered)
|
||||
Standard_EXPORT Standard_Boolean HasName() const;
|
||||
|
||||
//! returns Name value as a String (Property Name or ShortLabel)
|
||||
//! if SubNumber is defined, it is concatenated after ShortLabel
|
||||
//! as follows label(number). Ignored with a Property Name
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) NameValue() const;
|
||||
|
||||
//! Returns True if the Entity is defined with an Associativity
|
||||
//! list, even empty (that is, file contains its length 0)
|
||||
//! Else, the file contained NO idencation at all about this list.
|
||||
Standard_EXPORT Standard_Boolean ArePresentAssociativities() const;
|
||||
|
||||
//! gives number of recorded associativities (0 no list defined)
|
||||
Standard_EXPORT Standard_Integer NbAssociativities() const;
|
||||
|
||||
//! Returns the Associativity List under the form of an EntityIterator.
|
||||
Standard_EXPORT Interface_EntityIterator Associativities() const;
|
||||
|
||||
//! gives how many Associativities have a given type
|
||||
Standard_EXPORT Standard_Integer NbTypedAssociativities (const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! returns the Associativity of a given Type (if only one exists)
|
||||
//! Error if none or more than one
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) TypedAssociativity (const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! Sets "me" in the Associativity list of another Entity
|
||||
Standard_EXPORT void Associate (const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! Resets "me" from the Associativity list of another Entity
|
||||
Standard_EXPORT void Dissociate (const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! Returns True if the Entity is defined with a Property list,
|
||||
//! even empty (that is, file contains its length 0)
|
||||
//! Else, the file contained NO idencation at all about this list
|
||||
Standard_EXPORT Standard_Boolean ArePresentProperties() const;
|
||||
|
||||
//! Gives number of recorded properties (0 no list defined)
|
||||
Standard_EXPORT Standard_Integer NbProperties() const;
|
||||
|
||||
//! Returns Property List under the form of an EntityIterator
|
||||
Standard_EXPORT Interface_EntityIterator Properties() const;
|
||||
|
||||
//! gives how many Properties have a given type
|
||||
Standard_EXPORT Standard_Integer NbTypedProperties (const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! returns the Property of a given Type
|
||||
//! Error if none or more than one
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) TypedProperty (const Handle(Standard_Type)& atype, const Standard_Integer anum = 0) const;
|
||||
|
||||
//! Adds a Property in the list
|
||||
Standard_EXPORT void AddProperty (const Handle(IGESData_IGESEntity)& ent);
|
||||
|
||||
//! Removes a Property from the list
|
||||
Standard_EXPORT void RemoveProperty (const Handle(IGESData_IGESEntity)& ent);
|
||||
|
||||
//! computes and sets "true" line weight according IGES rules from
|
||||
//! global data MaxLineWeight (maxv) and LineWeightGrad (gradw),
|
||||
//! or sets it to defw (Default) if LineWeightNumber is null
|
||||
Standard_EXPORT void SetLineWeight (const Standard_Real defw, const Standard_Real maxw, const Standard_Integer gradw);
|
||||
|
||||
|
||||
friend class IGESData_ReadWriteModule;
|
||||
friend class IGESData_GeneralModule;
|
||||
friend class IGESData_IGESReaderTool;
|
||||
friend class IGESData_DirChecker;
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_IGESEntity,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! prepares lists of optionnal data, set values to defaults
|
||||
Standard_EXPORT IGESData_IGESEntity();
|
||||
|
||||
//! Initializes Type and Form Numbers to new values. Reserved for
|
||||
//! special uses
|
||||
Standard_EXPORT void InitTypeAndForm (const Standard_Integer typenum, const Standard_Integer formnum);
|
||||
|
||||
//! Loads a complete, already loaded, List of Asociativities
|
||||
//! (used during Read or Copy Operations)
|
||||
Standard_EXPORT void LoadAssociativities (const Interface_EntityList& list);
|
||||
|
||||
//! Loads a complete, already loaded, List of Properties
|
||||
//! (used during Read or Copy Operations)
|
||||
Standard_EXPORT void LoadProperties (const Interface_EntityList& list);
|
||||
|
||||
//! Removes all properties in once
|
||||
Standard_EXPORT void ClearProperties();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Clears specific IGES data
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
//! Adds an Associativity in the list (called by Associate only)
|
||||
Standard_EXPORT void AddAssociativity (const Handle(IGESData_IGESEntity)& ent);
|
||||
|
||||
//! Removes an Associativity from the list (called by Dissociate)
|
||||
Standard_EXPORT void RemoveAssociativity (const Handle(IGESData_IGESEntity)& ent);
|
||||
|
||||
//! Removes all associativities in once
|
||||
Standard_EXPORT void ClearAssociativities();
|
||||
|
||||
Standard_Integer theType;
|
||||
Standard_Integer theForm;
|
||||
Handle(IGESData_IGESEntity) theStructure;
|
||||
IGESData_DefSwitch theDefLineFont;
|
||||
Handle(IGESData_IGESEntity) theLineFont;
|
||||
Standard_Integer theDefLevel;
|
||||
Handle(IGESData_IGESEntity) theLevelList;
|
||||
Handle(IGESData_IGESEntity) theView;
|
||||
Handle(IGESData_IGESEntity) theTransf;
|
||||
Handle(IGESData_IGESEntity) theLabDisplay;
|
||||
Standard_Integer theStatusNum;
|
||||
Standard_Integer theLWeightNum;
|
||||
Standard_Real theLWeightVal;
|
||||
IGESData_DefSwitch theDefColor;
|
||||
Handle(IGESData_IGESEntity) theColor;
|
||||
Standard_Character theRes1[9];
|
||||
Standard_Character theRes2[9];
|
||||
Handle(TCollection_HAsciiString) theShortLabel;
|
||||
Standard_Integer theSubScriptN;
|
||||
Interface_EntityList theAssocs;
|
||||
Interface_EntityList theProps;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESEntity_HeaderFile
|
@@ -1,151 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class IGESModel from IGESData inherits InterfaceModel
|
||||
|
||||
---Purpose : Defines the file header and
|
||||
-- entities for IGES files. These headers and entities result from
|
||||
-- a complete data translation using the IGES data exchange processor.
|
||||
-- Each entity is contained in a single model only and has a
|
||||
-- unique identifier. You can access this identifier using the method Number.
|
||||
-- Gives an access to the general data in the Start and the Global
|
||||
-- sections of an IGES file.
|
||||
-- The IGES file includes the following sections:
|
||||
-- -Start,
|
||||
-- -Global,
|
||||
-- -Directory Entry,
|
||||
-- -Parameter Data,
|
||||
-- -Terminate
|
||||
|
||||
uses Check, CString,
|
||||
Messenger from Message,
|
||||
HAsciiString from TCollection, HSequenceOfHAsciiString,
|
||||
IGESEntity, GlobalSection, IGESWriter
|
||||
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create returns IGESModel;
|
||||
|
||||
ClearHeader (me : mutable);
|
||||
---Purpose : Erases all data specific to IGES file Header (Start + Global)
|
||||
|
||||
DumpHeader (me; S : Messenger from Message; level : Integer = 0);
|
||||
---Purpose : Prints the IGES file header
|
||||
-- (Start and Global Sections) to the log file. The integer
|
||||
-- parameter is intended to be used as a level indicator but is not used at present.
|
||||
|
||||
StartSection (me) returns HSequenceOfHAsciiString is static;
|
||||
---Purpose : Returns Model's Start Section (list of comment lines)
|
||||
|
||||
NbStartLines (me) returns Integer is static;
|
||||
---Purpose : Returns the count of recorded Start Lines
|
||||
|
||||
StartLine (me; num : Integer) returns CString is static;
|
||||
---Purpose : Returns a line from the IGES file
|
||||
-- Start section by specifying its number. An empty string is
|
||||
-- returned if the number given is out of range, the range being
|
||||
-- from 1 to NbStartLines.
|
||||
|
||||
ClearStartSection (me : mutable) is static;
|
||||
---Purpose : Clears the IGES file Start Section
|
||||
|
||||
SetStartSection (me : mutable; list : HSequenceOfHAsciiString;
|
||||
copy : Boolean = Standard_True) is static;
|
||||
---Purpose : Sets a new Start section from a list of strings.
|
||||
-- If copy is false, the Start section will be shared. Any
|
||||
-- modifications made to the strings later on, will have an effect on
|
||||
-- the Start section. If copy is true (default value),
|
||||
-- an independent copy of the strings is created and used as
|
||||
-- the Start section. Any modifications made to the strings
|
||||
-- later on, will have no effect on the Start section.
|
||||
|
||||
AddStartLine (me : mutable; line : CString; atnum : Integer = 0) is static;
|
||||
---Purpose : Adds a new string to the existing
|
||||
-- Start section at the end if atnum is 0 or not given, or before
|
||||
-- atnumth line.
|
||||
|
||||
GlobalSection (me) returns GlobalSection;
|
||||
---Purpose : Returns the Global section of the IGES file.
|
||||
---C++ : return const &
|
||||
|
||||
SetGlobalSection (me : mutable; header : GlobalSection);
|
||||
---Purpose : Sets the Global section of the IGES file.
|
||||
|
||||
ApplyStatic (me : mutable; param : CString = "") returns Boolean;
|
||||
---Purpose : Sets some of the Global section
|
||||
-- parameters with the values defined by the translation
|
||||
-- parameters. param may be:
|
||||
-- - receiver (value read in XSTEP.iges.header.receiver),
|
||||
-- - author (value read in XSTEP.iges.header.author),
|
||||
-- - company (value read in XSTEP.iges.header.company).
|
||||
-- The default value for param is an empty string.
|
||||
-- Returns True when done and if param is given, False if param is
|
||||
-- unknown or empty. Note: Set the unit in the IGES
|
||||
-- file Global section via IGESData_BasicEditor class.
|
||||
|
||||
Entity (me; num : Integer) returns IGESEntity;
|
||||
---Purpose : Returns an IGES entity given by its rank number.
|
||||
|
||||
DNum (me; ent : IGESEntity) returns Integer;
|
||||
---Purpose : Returns the equivalent DE Number for an Entity, i.e.
|
||||
-- 2*Number(ent)-1 , or 0 if <ent> is unknown from <me>
|
||||
-- This DE Number is used for File Writing for instance
|
||||
|
||||
GetFromAnother (me : mutable; other : InterfaceModel);
|
||||
---Purpose : gets Header (GlobalSection) from another Model
|
||||
|
||||
NewEmptyModel (me) returns InterfaceModel;
|
||||
---Purpose : Returns a New Empty Model, same type as <me> i.e. IGESModel
|
||||
|
||||
VerifyCheck (me; ach : in out Check) is redefined;
|
||||
---Purpose : Checks that the IGES file Global
|
||||
-- section contains valid data that conforms to the IGES specifications.
|
||||
|
||||
SetLineWeights (me : mutable; defw : Real);
|
||||
---Purpose : Sets LineWeights of contained Entities according header data
|
||||
-- (MaxLineWeight and LineWeightGrad) or to a default value for
|
||||
-- undefined weights
|
||||
|
||||
|
||||
ClearLabels (me : mutable);
|
||||
---Purpose : erases specific labels, i.e. does nothing
|
||||
|
||||
PrintLabel (me; ent : Transient; S : Messenger from Message);
|
||||
---Purpose : Prints label specific to IGES norm for a given entity, i.e.
|
||||
-- its directory entry number (2*Number-1)
|
||||
|
||||
PrintToLog (me; ent : Transient; S : Messenger from Message) is redefined;
|
||||
---Purpose : Prints label specific to IGES norm for a given -- --
|
||||
-- entity, i.e. its directory entry number (2*Number-1)
|
||||
-- in the log file format.
|
||||
|
||||
PrintInfo (me; ent : Transient; S : Messenger from Message);
|
||||
---Purpose : Prints label specific to IGES norm for a given entity, i.e.
|
||||
-- its directory entry number (2*Number-1)
|
||||
|
||||
StringLabel (me; ent : Transient) returns HAsciiString from TCollection;
|
||||
---Purpose : Returns a string with the label attached to a given entity,
|
||||
-- i.e. a string "Dnn" with nn = directory entry number (2*N-1)
|
||||
|
||||
fields
|
||||
|
||||
thestart : HSequenceOfHAsciiString;
|
||||
theheader : GlobalSection;
|
||||
|
||||
end IGESModel;
|
@@ -14,17 +14,24 @@
|
||||
//pdn 11.01.99 modification for linking on NT
|
||||
//#73 rln 10.03.99 S4135: "read.scale.unit" does not affect GlobalSection
|
||||
//#13 smh 13.01.2000 : Parsing long year date
|
||||
#include <IGESData_IGESModel.ixx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
|
||||
#include <IGESData_BasicEditor.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
static Standard_CString voidline = "";
|
||||
|
||||
// Routine interne utilisee pour VerifyCheck
|
||||
|
187
src/IGESData/IGESData_IGESModel.hxx
Normal file
187
src/IGESData/IGESData_IGESModel.hxx
Normal file
@@ -0,0 +1,187 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_IGESModel_HeaderFile
|
||||
#define _IGESData_IGESModel_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Interface_InterfaceError;
|
||||
class Message_Messenger;
|
||||
class IGESData_GlobalSection;
|
||||
class IGESData_IGESEntity;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_Check;
|
||||
class Standard_Transient;
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
|
||||
class IGESData_IGESModel;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_IGESModel, Interface_InterfaceModel)
|
||||
|
||||
//! Defines the file header and
|
||||
//! entities for IGES files. These headers and entities result from
|
||||
//! a complete data translation using the IGES data exchange processor.
|
||||
//! Each entity is contained in a single model only and has a
|
||||
//! unique identifier. You can access this identifier using the method Number.
|
||||
//! Gives an access to the general data in the Start and the Global
|
||||
//! sections of an IGES file.
|
||||
//! The IGES file includes the following sections:
|
||||
//! -Start,
|
||||
//! -Global,
|
||||
//! -Directory Entry,
|
||||
//! -Parameter Data,
|
||||
//! -Terminate
|
||||
class IGESData_IGESModel : public Interface_InterfaceModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_IGESModel();
|
||||
|
||||
//! Erases all data specific to IGES file Header (Start + Global)
|
||||
Standard_EXPORT void ClearHeader();
|
||||
|
||||
//! Prints the IGES file header
|
||||
//! (Start and Global Sections) to the log file. The integer
|
||||
//! parameter is intended to be used as a level indicator but is not used at present.
|
||||
Standard_EXPORT void DumpHeader (const Handle(Message_Messenger)& S, const Standard_Integer level = 0) const;
|
||||
|
||||
//! Returns Model's Start Section (list of comment lines)
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) StartSection() const;
|
||||
|
||||
//! Returns the count of recorded Start Lines
|
||||
Standard_EXPORT Standard_Integer NbStartLines() const;
|
||||
|
||||
//! Returns a line from the IGES file
|
||||
//! Start section by specifying its number. An empty string is
|
||||
//! returned if the number given is out of range, the range being
|
||||
//! from 1 to NbStartLines.
|
||||
Standard_EXPORT Standard_CString StartLine (const Standard_Integer num) const;
|
||||
|
||||
//! Clears the IGES file Start Section
|
||||
Standard_EXPORT void ClearStartSection();
|
||||
|
||||
//! Sets a new Start section from a list of strings.
|
||||
//! If copy is false, the Start section will be shared. Any
|
||||
//! modifications made to the strings later on, will have an effect on
|
||||
//! the Start section. If copy is true (default value),
|
||||
//! an independent copy of the strings is created and used as
|
||||
//! the Start section. Any modifications made to the strings
|
||||
//! later on, will have no effect on the Start section.
|
||||
Standard_EXPORT void SetStartSection (const Handle(TColStd_HSequenceOfHAsciiString)& list, const Standard_Boolean copy = Standard_True);
|
||||
|
||||
//! Adds a new string to the existing
|
||||
//! Start section at the end if atnum is 0 or not given, or before
|
||||
//! atnumth line.
|
||||
Standard_EXPORT void AddStartLine (const Standard_CString line, const Standard_Integer atnum = 0);
|
||||
|
||||
//! Returns the Global section of the IGES file.
|
||||
Standard_EXPORT const IGESData_GlobalSection& GlobalSection() const;
|
||||
|
||||
//! Sets the Global section of the IGES file.
|
||||
Standard_EXPORT void SetGlobalSection (const IGESData_GlobalSection& header);
|
||||
|
||||
//! Sets some of the Global section
|
||||
//! parameters with the values defined by the translation
|
||||
//! parameters. param may be:
|
||||
//! - receiver (value read in XSTEP.iges.header.receiver),
|
||||
//! - author (value read in XSTEP.iges.header.author),
|
||||
//! - company (value read in XSTEP.iges.header.company).
|
||||
//! The default value for param is an empty string.
|
||||
//! Returns True when done and if param is given, False if param is
|
||||
//! unknown or empty. Note: Set the unit in the IGES
|
||||
//! file Global section via IGESData_BasicEditor class.
|
||||
Standard_EXPORT Standard_Boolean ApplyStatic (const Standard_CString param = "");
|
||||
|
||||
//! Returns an IGES entity given by its rank number.
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) Entity (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the equivalent DE Number for an Entity, i.e.
|
||||
//! 2*Number(ent)-1 , or 0 if <ent> is unknown from <me>
|
||||
//! This DE Number is used for File Writing for instance
|
||||
Standard_EXPORT Standard_Integer DNum (const Handle(IGESData_IGESEntity)& ent) const;
|
||||
|
||||
//! gets Header (GlobalSection) from another Model
|
||||
Standard_EXPORT void GetFromAnother (const Handle(Interface_InterfaceModel)& other);
|
||||
|
||||
//! Returns a New Empty Model, same type as <me> i.e. IGESModel
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) NewEmptyModel() const;
|
||||
|
||||
//! Checks that the IGES file Global
|
||||
//! section contains valid data that conforms to the IGES specifications.
|
||||
Standard_EXPORT virtual void VerifyCheck (Handle(Interface_Check)& ach) const Standard_OVERRIDE;
|
||||
|
||||
//! Sets LineWeights of contained Entities according header data
|
||||
//! (MaxLineWeight and LineWeightGrad) or to a default value for
|
||||
//! undefined weights
|
||||
Standard_EXPORT void SetLineWeights (const Standard_Real defw);
|
||||
|
||||
//! erases specific labels, i.e. does nothing
|
||||
Standard_EXPORT void ClearLabels();
|
||||
|
||||
//! Prints label specific to IGES norm for a given entity, i.e.
|
||||
//! its directory entry number (2*Number-1)
|
||||
Standard_EXPORT void PrintLabel (const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
//! Prints label specific to IGES norm for a given -- --
|
||||
//! entity, i.e. its directory entry number (2*Number-1)
|
||||
//! in the log file format.
|
||||
Standard_EXPORT virtual void PrintToLog (const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const Standard_OVERRIDE;
|
||||
|
||||
//! Prints label specific to IGES norm for a given entity, i.e.
|
||||
//! its directory entry number (2*Number-1)
|
||||
Standard_EXPORT void PrintInfo (const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
//! Returns a string with the label attached to a given entity,
|
||||
//! i.e. a string "Dnn" with nn = directory entry number (2*N-1)
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) StringLabel (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_IGESModel,Interface_InterfaceModel)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfHAsciiString) thestart;
|
||||
IGESData_GlobalSection theheader;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESModel_HeaderFile
|
@@ -1,113 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class IGESReaderData from IGESData inherits FileReaderData
|
||||
|
||||
---Purpose : specific FileReaderData for IGES
|
||||
-- contains header as GlobalSection, and for each Entity, its
|
||||
-- directory part as DirPart, list of Parameters as ParamSet
|
||||
-- Each Item has a DirPart, plus classically a ParamSet and the
|
||||
-- correspondant recognized Entity (inherited from FileReaderData)
|
||||
-- Parameters are accessed through specific objects, ParamReaders
|
||||
|
||||
uses Integer, Boolean, CString, HAsciiString, HSequenceOfHAsciiString,
|
||||
ParamType, ParamSet, Check,
|
||||
GlobalSection, DirPart, Array1OfDirPart, IGESType, ReadStage
|
||||
|
||||
is
|
||||
|
||||
Create (nbe,nbp : Integer) returns IGESReaderData;
|
||||
---Purpose : creates IGESReaderData correctly dimensionned (for arrays)
|
||||
-- <nbe> count of entities, that is, half nb of directory lines
|
||||
-- <nbp> : count of parameters
|
||||
|
||||
AddStartLine (me : mutable; aval : CString);
|
||||
---Purpose : adds a start line to start section
|
||||
|
||||
StartSection (me) returns HSequenceOfHAsciiString;
|
||||
---Purpose : Returns the Start Section in once
|
||||
|
||||
AddGlobal (me : mutable; atype : ParamType; aval : CString);
|
||||
---Purpose : adds a parameter to global section's parameter list
|
||||
|
||||
SetGlobalSection (me : mutable);
|
||||
---Purpose : reads header (as GlobalSection) content from the ParamSet
|
||||
-- after it has been filled by successive calls to AddGlobal
|
||||
|
||||
GlobalSection (me) returns GlobalSection;
|
||||
---Purpose : returns header as GlobalSection
|
||||
---C++ : return const &
|
||||
|
||||
SetDirPart (me : mutable; num : Integer;
|
||||
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17 : Integer;
|
||||
res1,res2,label,subs : CString);
|
||||
---Purpose : fills a DirPart, designated by its rank (that is, (N+1)/2 if N
|
||||
-- is its first number in section D)
|
||||
|
||||
DirPart (me; num : Integer) returns DirPart;
|
||||
---Purpose : returns DirPart identified by record no (half Dsect number)
|
||||
---C++ : return const &
|
||||
|
||||
DirValues (me; num : Integer;
|
||||
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17 : out Integer;
|
||||
res1,res2,label,subs : out CString);
|
||||
---Purpose : returns values recorded in directory part n0 <num>
|
||||
|
||||
DirType (me; num : Integer) returns IGESType;
|
||||
---Purpose : returns "type" and "form" info from a directory part
|
||||
|
||||
-- -- General -- --
|
||||
|
||||
NbEntities (me) returns Integer is redefined;
|
||||
---Purpose : Returns count of recorded Entities (i.e. size of Directory)
|
||||
|
||||
FindNextRecord (me; num : Integer) returns Integer;
|
||||
---Purpose : determines next suitable record from num; that is num+1 except
|
||||
-- for last one which gives 0
|
||||
|
||||
SetEntityNumbers (me : mutable);
|
||||
---Purpose : determines reference numbers in EntityNumber fields (called by
|
||||
-- SetEntities from IGESReaderTool)
|
||||
-- works on "Integer" type Parameters, because IGES does not
|
||||
-- distinguish Integer and Entity Refs : every Integer which is
|
||||
-- odd and less than twice NbRecords can be an Entity Ref ...
|
||||
-- (Ref Number is then (N+1)/2 if N is the Integer Value)
|
||||
|
||||
-- Loading the IGESModel --
|
||||
|
||||
GlobalCheck (me) returns Check;
|
||||
---Purpose : Returns the recorded Global Check
|
||||
|
||||
SetDefaultLineWeight (me : mutable; defw : Real);
|
||||
---Purpose : allows to set a default line weight, will be later applied at
|
||||
-- load time, on Entities which have no specified line weight
|
||||
|
||||
DefaultLineWeight (me) returns Real;
|
||||
---Purpose : Returns the recorded Default Line Weight, if there is
|
||||
-- (else, returns 0)
|
||||
|
||||
fields
|
||||
|
||||
thectyp : IGESType; -- its IGESType (for purpose of optimization)
|
||||
thestar : HSequenceOfHAsciiString; -- start section
|
||||
theparh : ParamSet; -- ParamSet reading global parameters
|
||||
thehead : GlobalSection;
|
||||
thedirs : Array1OfDirPart;
|
||||
thestep : ReadStage; -- to continue an interrupted party
|
||||
thedefw : Real; -- default line weight (if desired)
|
||||
thechk : Check; -- check on header (kept by IGESModel)
|
||||
|
||||
end IGESReaderData;
|
@@ -11,17 +11,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_IGESReaderData.ixx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
|
||||
#include <IGESData_DirPart.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_IGESReaderData.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <Interface_ParamSet.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IGESData_IGESReaderData::IGESData_IGESReaderData
|
||||
(const Standard_Integer nbe, const Standard_Integer nbp)
|
||||
|
146
src/IGESData/IGESData_IGESReaderData.hxx
Normal file
146
src/IGESData/IGESData_IGESReaderData.hxx
Normal file
@@ -0,0 +1,146 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_IGESReaderData_HeaderFile
|
||||
#define _IGESData_IGESReaderData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <IGESData_Array1OfDirPart.hxx>
|
||||
#include <IGESData_ReadStage.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Interface_FileReaderData.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
class Interface_ParamSet;
|
||||
class Interface_Check;
|
||||
class IGESData_GlobalSection;
|
||||
class IGESData_DirPart;
|
||||
class IGESData_IGESType;
|
||||
|
||||
|
||||
class IGESData_IGESReaderData;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_IGESReaderData, Interface_FileReaderData)
|
||||
|
||||
//! specific FileReaderData for IGES
|
||||
//! contains header as GlobalSection, and for each Entity, its
|
||||
//! directory part as DirPart, list of Parameters as ParamSet
|
||||
//! Each Item has a DirPart, plus classically a ParamSet and the
|
||||
//! correspondant recognized Entity (inherited from FileReaderData)
|
||||
//! Parameters are accessed through specific objects, ParamReaders
|
||||
class IGESData_IGESReaderData : public Interface_FileReaderData
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! creates IGESReaderData correctly dimensionned (for arrays)
|
||||
//! <nbe> count of entities, that is, half nb of directory lines
|
||||
//! <nbp> : count of parameters
|
||||
Standard_EXPORT IGESData_IGESReaderData(const Standard_Integer nbe, const Standard_Integer nbp);
|
||||
|
||||
//! adds a start line to start section
|
||||
Standard_EXPORT void AddStartLine (const Standard_CString aval);
|
||||
|
||||
//! Returns the Start Section in once
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) StartSection() const;
|
||||
|
||||
//! adds a parameter to global section's parameter list
|
||||
Standard_EXPORT void AddGlobal (const Interface_ParamType atype, const Standard_CString aval);
|
||||
|
||||
//! reads header (as GlobalSection) content from the ParamSet
|
||||
//! after it has been filled by successive calls to AddGlobal
|
||||
Standard_EXPORT void SetGlobalSection();
|
||||
|
||||
//! returns header as GlobalSection
|
||||
Standard_EXPORT const IGESData_GlobalSection& GlobalSection() const;
|
||||
|
||||
//! fills a DirPart, designated by its rank (that is, (N+1)/2 if N
|
||||
//! is its first number in section D)
|
||||
Standard_EXPORT void SetDirPart (const Standard_Integer num, const Standard_Integer i1, const Standard_Integer i2, const Standard_Integer i3, const Standard_Integer i4, const Standard_Integer i5, const Standard_Integer i6, const Standard_Integer i7, const Standard_Integer i8, const Standard_Integer i9, const Standard_Integer i10, const Standard_Integer i11, const Standard_Integer i12, const Standard_Integer i13, const Standard_Integer i14, const Standard_Integer i15, const Standard_Integer i16, const Standard_Integer i17, const Standard_CString res1, const Standard_CString res2, const Standard_CString label, const Standard_CString subs);
|
||||
|
||||
//! returns DirPart identified by record no (half Dsect number)
|
||||
Standard_EXPORT const IGESData_DirPart& DirPart (const Standard_Integer num) const;
|
||||
|
||||
//! returns values recorded in directory part n0 <num>
|
||||
Standard_EXPORT void DirValues (const Standard_Integer num, Standard_Integer& i1, Standard_Integer& i2, Standard_Integer& i3, Standard_Integer& i4, Standard_Integer& i5, Standard_Integer& i6, Standard_Integer& i7, Standard_Integer& i8, Standard_Integer& i9, Standard_Integer& i10, Standard_Integer& i11, Standard_Integer& i12, Standard_Integer& i13, Standard_Integer& i14, Standard_Integer& i15, Standard_Integer& i16, Standard_Integer& i17, Standard_CString& res1, Standard_CString& res2, Standard_CString& label, Standard_CString& subs) const;
|
||||
|
||||
//! returns "type" and "form" info from a directory part
|
||||
Standard_EXPORT IGESData_IGESType DirType (const Standard_Integer num) const;
|
||||
|
||||
//! Returns count of recorded Entities (i.e. size of Directory)
|
||||
Standard_EXPORT virtual Standard_Integer NbEntities() const Standard_OVERRIDE;
|
||||
|
||||
//! determines next suitable record from num; that is num+1 except
|
||||
//! for last one which gives 0
|
||||
Standard_EXPORT Standard_Integer FindNextRecord (const Standard_Integer num) const;
|
||||
|
||||
//! determines reference numbers in EntityNumber fields (called by
|
||||
//! SetEntities from IGESReaderTool)
|
||||
//! works on "Integer" type Parameters, because IGES does not
|
||||
//! distinguish Integer and Entity Refs : every Integer which is
|
||||
//! odd and less than twice NbRecords can be an Entity Ref ...
|
||||
//! (Ref Number is then (N+1)/2 if N is the Integer Value)
|
||||
Standard_EXPORT void SetEntityNumbers();
|
||||
|
||||
//! Returns the recorded Global Check
|
||||
Standard_EXPORT Handle(Interface_Check) GlobalCheck() const;
|
||||
|
||||
//! allows to set a default line weight, will be later applied at
|
||||
//! load time, on Entities which have no specified line weight
|
||||
Standard_EXPORT void SetDefaultLineWeight (const Standard_Real defw);
|
||||
|
||||
//! Returns the recorded Default Line Weight, if there is
|
||||
//! (else, returns 0)
|
||||
Standard_EXPORT Standard_Real DefaultLineWeight() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_IGESReaderData,Interface_FileReaderData)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
IGESData_IGESType thectyp;
|
||||
Handle(TColStd_HSequenceOfHAsciiString) thestar;
|
||||
Handle(Interface_ParamSet) theparh;
|
||||
IGESData_GlobalSection thehead;
|
||||
IGESData_Array1OfDirPart thedirs;
|
||||
IGESData_ReadStage thestep;
|
||||
Standard_Real thedefw;
|
||||
Handle(Interface_Check) thechk;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESReaderData_HeaderFile
|
@@ -1,109 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class IGESReaderTool from IGESData inherits FileReaderTool
|
||||
|
||||
---Purpose : specific FileReaderTool for IGES
|
||||
-- Parameters are accessed through specific objects, ParamReaders
|
||||
|
||||
uses Integer, Boolean, Transient,
|
||||
Check, InterfaceModel, GeneralLib, ReaderLib, ParamList,
|
||||
IGESReaderData, Protocol from IGESData, FileRecognizer,
|
||||
IGESType, IGESEntity, DirPart, ReadStage, ParamReader
|
||||
|
||||
is
|
||||
|
||||
Create (reader : IGESReaderData; protocol : Protocol from IGESData)
|
||||
returns IGESReaderTool;
|
||||
---Purpose : creates IGESReaderTool to work with an IGESReaderData and an
|
||||
-- IGES Protocol.
|
||||
-- Actually, no Lib is used
|
||||
|
||||
-- -- General -- --
|
||||
|
||||
Prepare (me : in out; reco : FileRecognizer);
|
||||
---Purpose : binds empty entities to records, works with the Protocol
|
||||
-- (from IGESData) stored and later used
|
||||
-- RQ : Actually, sets DNum into IGES Entities
|
||||
-- Also loads the list of parameters for ParamReader
|
||||
|
||||
Recognize (me : in out; num : Integer;
|
||||
ach : in out Check; ent : out Transient)
|
||||
returns Boolean;
|
||||
---Purpose : recognizes records by asking Protocol (on data of DirType)
|
||||
|
||||
-- Loading the IGESModel --
|
||||
|
||||
BeginRead (me : in out; amodel : InterfaceModel);
|
||||
---Purpose : fills model's header, that is, its GlobalSection
|
||||
|
||||
AnalyseRecord (me : in out;
|
||||
num : Integer; anent : Transient; acheck : in out Check)
|
||||
returns Boolean;
|
||||
---Purpose : fills an entity, given record no; works by calling ReadDirPart
|
||||
-- then ReadParams (with help of a ParamReader), then if required
|
||||
-- ReadProps and ReadAssocs, from IGESEntity
|
||||
-- Returns True if no fail has been recorded
|
||||
|
||||
EndRead (me : in out; amodel : InterfaceModel) is redefined;
|
||||
---Purpose : after reading entities, true line weights can be computed
|
||||
|
||||
-- For each IGESEntity --
|
||||
|
||||
ReadDir (me; ent : IGESEntity; IR : IGESReaderData;
|
||||
DP : DirPart; ach : in out Check);
|
||||
---Purpose : Reads directory part componants from file; DP is the litteral
|
||||
-- directory part, IR detains entities referenced by DP
|
||||
|
||||
ReadOwnParams (me; ent : IGESEntity;
|
||||
IR : IGESReaderData; PR : in out ParamReader);
|
||||
---Purpose : Performs Reading of own Parameters for each IGESEntity
|
||||
-- Works with the ReaderLib loaded with ReadWriteModules for IGES
|
||||
-- In case of failure, tries UndefinedEntity from IGES
|
||||
|
||||
ReadProps (me; ent : IGESEntity; IR : IGESReaderData;
|
||||
PR : in out ParamReader);
|
||||
---Purpose : Reads Property List, if there is (if not, does nothing)
|
||||
-- criterium is : current parameter of PR remains inside params
|
||||
-- list, and Stage is "Own"
|
||||
-- Current parameter must be a positive integer, which value
|
||||
-- gives the length of the list; else, a Fail is produced (into
|
||||
-- Check of PR) and reading process is stopped
|
||||
|
||||
ReadAssocs (me; ent : IGESEntity; IR : IGESReaderData;
|
||||
PR : in out ParamReader);
|
||||
---Purpose : Reads Associativity List, if there is (if not, does nothing)
|
||||
-- criterium is : current parameter of PR remains inside params
|
||||
-- list, and Stage is "Own"
|
||||
-- Same conditions as above; in addition, no parameter must be
|
||||
-- let after the list once read
|
||||
-- Note that "Associated" entities are not declared "Shared"
|
||||
|
||||
fields
|
||||
|
||||
thelist : ParamList; -- (loaded once, allows optimization)
|
||||
thereco : FileRecognizer;
|
||||
theglib : GeneralLib;
|
||||
therlib : ReaderLib;
|
||||
thecnum : Integer; -- current entity number for recognize
|
||||
thectyp : IGESType; -- its IGESType (for purpose of optimization)
|
||||
thestep : ReadStage; -- to continue an interrupted party
|
||||
thechk : Check; -- check on header (kept by IGESModel)
|
||||
thegradweight : Integer;
|
||||
themaxweight : Real;
|
||||
thedefweight : Real;
|
||||
|
||||
end IGESReaderTool;
|
@@ -11,31 +11,37 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_IGESReaderTool.ixx>
|
||||
#include <IGESData_IGESReaderData.hxx>
|
||||
#include <IGESData_ParamCursor.hxx>
|
||||
#include <Interface_ReaderModule.hxx>
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DirPart.hxx>
|
||||
#include <IGESData_FileRecognizer.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_IGESReaderData.hxx>
|
||||
#include <IGESData_IGESReaderTool.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_ParamCursor.hxx>
|
||||
#include <IGESData_ParamReader.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <Interface_ReaderModule.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
// MGE 17/06/98
|
||||
// To use Msg class
|
||||
#include <Message_Msg.hxx>
|
||||
|
||||
|
||||
IGESData_IGESReaderTool::IGESData_IGESReaderTool
|
||||
(const Handle(IGESData_IGESReaderData)& reader,
|
||||
const Handle(IGESData_Protocol)& protocol)
|
||||
|
138
src/IGESData/IGESData_IGESReaderTool.hxx
Normal file
138
src/IGESData/IGESData_IGESReaderTool.hxx
Normal file
@@ -0,0 +1,138 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_IGESReaderTool_HeaderFile
|
||||
#define _IGESData_IGESReaderTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_ReaderLib.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <IGESData_ReadStage.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Interface_FileReaderTool.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_ParamList;
|
||||
class IGESData_FileRecognizer;
|
||||
class Interface_Check;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_Protocol;
|
||||
class Standard_Transient;
|
||||
class Interface_InterfaceModel;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_DirPart;
|
||||
class IGESData_ParamReader;
|
||||
|
||||
|
||||
//! specific FileReaderTool for IGES
|
||||
//! Parameters are accessed through specific objects, ParamReaders
|
||||
class IGESData_IGESReaderTool : public Interface_FileReaderTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates IGESReaderTool to work with an IGESReaderData and an
|
||||
//! IGES Protocol.
|
||||
//! Actually, no Lib is used
|
||||
Standard_EXPORT IGESData_IGESReaderTool(const Handle(IGESData_IGESReaderData)& reader, const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! binds empty entities to records, works with the Protocol
|
||||
//! (from IGESData) stored and later used
|
||||
//! RQ : Actually, sets DNum into IGES Entities
|
||||
//! Also loads the list of parameters for ParamReader
|
||||
Standard_EXPORT void Prepare (const Handle(IGESData_FileRecognizer)& reco);
|
||||
|
||||
//! recognizes records by asking Protocol (on data of DirType)
|
||||
Standard_EXPORT Standard_Boolean Recognize (const Standard_Integer num, Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent);
|
||||
|
||||
//! fills model's header, that is, its GlobalSection
|
||||
Standard_EXPORT void BeginRead (const Handle(Interface_InterfaceModel)& amodel);
|
||||
|
||||
//! fills an entity, given record no; works by calling ReadDirPart
|
||||
//! then ReadParams (with help of a ParamReader), then if required
|
||||
//! ReadProps and ReadAssocs, from IGESEntity
|
||||
//! Returns True if no fail has been recorded
|
||||
Standard_EXPORT Standard_Boolean AnalyseRecord (const Standard_Integer num, const Handle(Standard_Transient)& anent, Handle(Interface_Check)& acheck);
|
||||
|
||||
//! after reading entities, true line weights can be computed
|
||||
Standard_EXPORT virtual void EndRead (const Handle(Interface_InterfaceModel)& amodel) Standard_OVERRIDE;
|
||||
|
||||
//! Reads directory part componants from file; DP is the litteral
|
||||
//! directory part, IR detains entities referenced by DP
|
||||
Standard_EXPORT void ReadDir (const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, const IGESData_DirPart& DP, Handle(Interface_Check)& ach) const;
|
||||
|
||||
//! Performs Reading of own Parameters for each IGESEntity
|
||||
//! Works with the ReaderLib loaded with ReadWriteModules for IGES
|
||||
//! In case of failure, tries UndefinedEntity from IGES
|
||||
Standard_EXPORT void ReadOwnParams (const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const;
|
||||
|
||||
//! Reads Property List, if there is (if not, does nothing)
|
||||
//! criterium is : current parameter of PR remains inside params
|
||||
//! list, and Stage is "Own"
|
||||
//! Current parameter must be a positive integer, which value
|
||||
//! gives the length of the list; else, a Fail is produced (into
|
||||
//! Check of PR) and reading process is stopped
|
||||
Standard_EXPORT void ReadProps (const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const;
|
||||
|
||||
//! Reads Associativity List, if there is (if not, does nothing)
|
||||
//! criterium is : current parameter of PR remains inside params
|
||||
//! list, and Stage is "Own"
|
||||
//! Same conditions as above; in addition, no parameter must be
|
||||
//! let after the list once read
|
||||
//! Note that "Associated" entities are not declared "Shared"
|
||||
Standard_EXPORT void ReadAssocs (const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Interface_ParamList) thelist;
|
||||
Handle(IGESData_FileRecognizer) thereco;
|
||||
Interface_GeneralLib theglib;
|
||||
Interface_ReaderLib therlib;
|
||||
Standard_Integer thecnum;
|
||||
IGESData_IGESType thectyp;
|
||||
IGESData_ReadStage thestep;
|
||||
Handle(Interface_Check) thechk;
|
||||
Standard_Integer thegradweight;
|
||||
Standard_Real themaxweight;
|
||||
Standard_Real thedefweight;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESReaderTool_HeaderFile
|
@@ -1,48 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class IGESType from IGESData
|
||||
|
||||
---Purpose : taken from directory part of an entity (from file or model),
|
||||
-- gives "type" and "form" data, used to recognize entity's type
|
||||
|
||||
uses Integer
|
||||
|
||||
is
|
||||
|
||||
Create returns IGESType; -- default constructor (gives type = form = 0)
|
||||
|
||||
Create (atype, aform : Integer) returns IGESType;
|
||||
|
||||
Type (me) returns Integer is static;
|
||||
---Purpose : returns "type" data
|
||||
|
||||
Form (me) returns Integer is static;
|
||||
---Purpose : returns "form" data
|
||||
|
||||
IsEqual (me; another : IGESType) returns Boolean is static;
|
||||
---Purpose : compares two IGESTypes, avoiding comparing their fields
|
||||
---C++ : alias operator ==
|
||||
|
||||
Nullify (me : in out) is static;
|
||||
---Purpose : resets fields (usefull when an IGESType is stored as mask)
|
||||
|
||||
fields
|
||||
|
||||
thetype : Integer;
|
||||
theform : Integer;
|
||||
|
||||
end IGESType;
|
@@ -11,9 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_IGESType.ixx>
|
||||
|
||||
|
||||
#include <IGESData_IGESType.hxx>
|
||||
|
||||
IGESData_IGESType::IGESData_IGESType () { thetype = 0; theform = 0; }
|
||||
|
||||
|
82
src/IGESData/IGESData_IGESType.hxx
Normal file
82
src/IGESData/IGESData_IGESType.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_IGESType_HeaderFile
|
||||
#define _IGESData_IGESType_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
//! taken from directory part of an entity (from file or model),
|
||||
//! gives "type" and "form" data, used to recognize entity's type
|
||||
class IGESData_IGESType
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_IGESType();
|
||||
|
||||
Standard_EXPORT IGESData_IGESType(const Standard_Integer atype, const Standard_Integer aform);
|
||||
|
||||
//! returns "type" data
|
||||
Standard_EXPORT Standard_Integer Type() const;
|
||||
|
||||
//! returns "form" data
|
||||
Standard_EXPORT Standard_Integer Form() const;
|
||||
|
||||
//! compares two IGESTypes, avoiding comparing their fields
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const IGESData_IGESType& another) const;
|
||||
Standard_Boolean operator == (const IGESData_IGESType& another) const
|
||||
{
|
||||
return IsEqual(another);
|
||||
}
|
||||
|
||||
//! resets fields (usefull when an IGESType is stored as mask)
|
||||
Standard_EXPORT void Nullify();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer thetype;
|
||||
Standard_Integer theform;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESType_HeaderFile
|
@@ -1,204 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
class IGESWriter from IGESData
|
||||
|
||||
---Purpose : manages atomic file writing, under control of IGESModel :
|
||||
-- prepare text to be sent then sends it
|
||||
-- takes into account distinction between successive Sections
|
||||
|
||||
uses Integer, Real, Character,
|
||||
HAsciiString from TCollection, HSequenceOfHAsciiString from TColStd,
|
||||
Array1OfInteger from TColStd,
|
||||
IGESModel, GlobalSection, IGESEntity, Array1OfDirPart, ReadStage,
|
||||
Protocol from IGESData, WriterLib, LineBuffer, FloatWriter,
|
||||
XY, XYZ
|
||||
|
||||
raises InterfaceMismatch
|
||||
|
||||
is
|
||||
|
||||
Create (amodel : IGESModel) returns IGESWriter;
|
||||
---Purpose : Creates an IGESWriter, empty ready to work
|
||||
-- (see the methods SendModel and Print)
|
||||
|
||||
Create returns IGESWriter;
|
||||
---Purpose : Default constructor (not used) to satisfy the compiler
|
||||
|
||||
Create (other : IGESWriter) returns IGESWriter;
|
||||
---Purpose : Constructor by copy (not used) to satisfy the compiler
|
||||
|
||||
-- Options for Sending Forms --
|
||||
|
||||
FloatWriter (me : in out) returns FloatWriter;
|
||||
---Purpose : Returns the embedded FloatWriter, which controls sending Reals
|
||||
-- Use this method to access FloatWriter in order to consult or
|
||||
-- change its options (MainFormat, FormatForRange,ZeroSuppress),
|
||||
-- because it is returned as the address of its field
|
||||
---C++ : return &
|
||||
|
||||
WriteMode (me : in out) returns Integer;
|
||||
---Purpose : Returns the write mode, in order to be read and/or changed
|
||||
-- Write Mode controls the way final print works
|
||||
-- 0 (D) : Normal IGES, 10 : FNES
|
||||
---C++ : return &
|
||||
|
||||
-- -- Management of building file -- --
|
||||
|
||||
SendStartLine (me : in out; startline : CString);
|
||||
---Purpose : Sends an additionnal Starting Line : this is the way used to
|
||||
-- send comments in an IGES File (at beginning of the file).
|
||||
-- If the line is more than 72 char.s long, it is splited into
|
||||
-- as many lines as required to send it completely
|
||||
|
||||
SendModel (me : in out; protocol : Protocol from IGESData);
|
||||
---Purpose : Sends the complete IGESModel (Global Section, Entities as
|
||||
-- Directory Entries & Parameter Lists, etc...)
|
||||
-- i.e. fills a list of texts. Once filled, it can be sent by
|
||||
-- method Print
|
||||
|
||||
SectionS (me : in out) raises InterfaceMismatch;
|
||||
---Purpose : declares sending of S section (only a declaration)
|
||||
-- error if state is not initial
|
||||
|
||||
SectionG (me : in out; header : GlobalSection) raises InterfaceMismatch;
|
||||
---Purpose : prepares sending of header, from a GlobalSection (stores it)
|
||||
-- error if SectionS was not called just before
|
||||
-- takes in account special characters (Separator, EndMark)
|
||||
|
||||
SectionsDP (me : in out) raises InterfaceMismatch;
|
||||
---Purpose : prepares sending of list of entities, as Sections D (directory
|
||||
-- list) and P (Parameters lists, one per entity)
|
||||
-- Entities will be then processed, one after the other
|
||||
-- error if SectionG has not be called just before
|
||||
|
||||
SectionT (me : in out) raises InterfaceMismatch;
|
||||
---Purpose : declares sending of T section (only a declaration)
|
||||
-- error if does not follow Entities sending
|
||||
|
||||
DirPart (me : in out; anent : IGESEntity) raises InterfaceMismatch;
|
||||
---Purpose : translates directory part of an Entity into a litteral DirPart
|
||||
-- Some infos are computed after sending parameters
|
||||
-- Error if not in sections DP or Stage not "Dir"
|
||||
|
||||
OwnParams (me : in out; anent : IGESEntity) raises InterfaceMismatch;
|
||||
---Purpose : sends own parameters of the entity, by sending firstly its
|
||||
-- type, then calling specific method WriteOwnParams
|
||||
-- Error if not in sections DP or Stage not "Own"
|
||||
|
||||
Associativities (me : in out; anent : IGESEntity) raises InterfaceMismatch;
|
||||
---Purpose : sends associativity list, as complement of parameters list
|
||||
-- error if not in sections DP or Stage not "Associativity"
|
||||
|
||||
Properties (me : in out; anent : IGESEntity) raises InterfaceMismatch;
|
||||
---Purpose : sends property list, as complement of parameters list
|
||||
-- error if not in sections DP or Stage not "Property"
|
||||
|
||||
EndEntity (me : in out) raises InterfaceMismatch;
|
||||
---Purpose : declares end of sending an entity (ends param list by ';')
|
||||
|
||||
-- -- Sending parameters (to be used by WriteOwnParams) -- --
|
||||
|
||||
AddString (me : in out; val : HAsciiString from TCollection;
|
||||
more : Integer = 0) is private;
|
||||
---Purpose : Basic action of adding a string to current parameter list as a
|
||||
-- line; manages size limit (64 or 72 according Sestion G or P)
|
||||
-- <more>, if precised, requires that <more> characters will
|
||||
-- remain free on the current line once this AddString done
|
||||
|
||||
AddString (me : in out; val : CString; lnval : Integer = 0;
|
||||
more : Integer = 0) is private;
|
||||
---Purpose : Basic action of adding a string to current parameter list as a
|
||||
-- line. Manages size limit (64 or 72 according Sestion G or P)
|
||||
-- <val> is the string and <lnval> its length. If <lnval> is not
|
||||
-- given, it is computed by strlen(val).
|
||||
-- <more>, if precised, requires that <more> characters will
|
||||
-- remain free on the current line once this AddString done
|
||||
|
||||
AddChar (me : in out; val : Character; more : Integer = 0) is private;
|
||||
---Purpose : Adds a string defined as a single character (for instance, the
|
||||
-- parameter separator). Manages size limit
|
||||
-- <more>, if precised, requires that <more> characters will
|
||||
-- remain free on the current line once this AddString done
|
||||
|
||||
|
||||
SendVoid (me : in out);
|
||||
---Purpose : sends a void parameter, that is null text
|
||||
|
||||
Send (me : in out; val : Integer);
|
||||
---Purpose : sends an Integer parameter
|
||||
|
||||
SendBoolean (me : in out; val : Boolean);
|
||||
---Purpose : sends a Boolean parameter as an Integer value 0(False)/1(True)
|
||||
|
||||
Send (me : in out; val : Real);
|
||||
---Purpose : sends a Real parameter. Works with FloatWriter
|
||||
|
||||
Send (me : in out; val : HAsciiString from TCollection);
|
||||
---Purpose : sends a Text parameter under Hollerith form
|
||||
|
||||
Send (me : in out; val : IGESEntity; negative : Boolean = Standard_False);
|
||||
---Purpose : sends a Reference to an Entity (if its Number is N, its
|
||||
-- pointer is 2*N-1)
|
||||
-- If <val> is Null, "0" will be sent
|
||||
-- If <negative> is True, "Pointer" is sent as negative
|
||||
---C++: alias "template <class T> void Send (const Handle(T)& val, Standard_Boolean negative = Standard_False, typename std::enable_if<std::is_base_of<IGESData_IGESEntity, T>::value>::type * = 0) { Send ((const Handle(IGESData_IGESEntity)&)val, negative); }"
|
||||
|
||||
SendString (me : in out; val : HAsciiString from TCollection);
|
||||
---Purpose : sends a parameter under its exact form given as a string
|
||||
|
||||
Send (me : in out; val : XY);
|
||||
---Purpose : Sends a XY, interpreted as a couple of 2 Reals (X & Y)
|
||||
|
||||
Send (me : in out; val : XYZ);
|
||||
---Purpose : Sends a XYZ, interpreted as a couple of 2 Reals (X , Y & Z)
|
||||
|
||||
-- -- Conclusion : printing on an output -- --
|
||||
|
||||
SectionStrings (me; numsec : Integer)
|
||||
returns HSequenceOfHAsciiString from TColStd;
|
||||
---Purpose : Returns the list of strings for a section given its rank
|
||||
-- 1 : Start (if not empty) 2 : Global 3 or 4 : Parameters
|
||||
-- RQ: no string list for Directory section
|
||||
-- An empty section gives a null handle
|
||||
|
||||
Print (me; S : in out OStream) returns Boolean
|
||||
---Purpose : Writes result on an output defined as an OStream
|
||||
-- resolves stored infos at this time; in particular, numbers of
|
||||
-- lines used to adress P-section from D-section and final totals
|
||||
-- Takes WriteMode into account
|
||||
raises InterfaceMismatch;
|
||||
-- Error if not at Section "T"
|
||||
|
||||
fields
|
||||
|
||||
themodel : IGESModel;
|
||||
thestar : HSequenceOfHAsciiString from TColStd; -- starting lines
|
||||
thehead : HSequenceOfHAsciiString from TColStd; -- parameters for header
|
||||
|
||||
thesep : Character; -- separator (gotten from GlobalSection)
|
||||
theendm : Character; -- end mark ( id )
|
||||
thedirs : Array1OfDirPart;
|
||||
thepnum : Array1OfInteger from TColStd; -- rank in P-section for each entity
|
||||
thepars : HSequenceOfHAsciiString from TColStd; -- parameters for file
|
||||
thesect : Integer; -- section number (initial:0-S-G-DP-T)
|
||||
thestep : ReadStage; -- step for each entity
|
||||
thecurr : LineBuffer; -- current line (for sections G then P)
|
||||
|
||||
themodew : Integer; -- control of writing mode
|
||||
thefloatw : FloatWriter; -- control of sending Reals
|
||||
|
||||
end IGESWriter;
|
@@ -11,34 +11,41 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_IGESWriter.ixx>
|
||||
|
||||
#include <gp_XY.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DefType.hxx>
|
||||
#include <IGESData_DirPart.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_WriterLib.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_FloatWriter.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_InterfaceMismatch.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <Interface_ParamSet.hxx>
|
||||
#include <Interface_ReportEntity.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Message.hxx>
|
||||
|
||||
#include <IGESData_WriterLib.hxx>
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <IGESData_TransfEntity.hxx>
|
||||
#include <IGESData_ViewKindEntity.hxx>
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <stdio.h>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_PCharacter.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
#define MaxcarsG 72
|
||||
#define MaxcarsP 64
|
||||
|
||||
|
229
src/IGESData/IGESData_IGESWriter.hxx
Normal file
229
src/IGESData/IGESData_IGESWriter.hxx
Normal file
@@ -0,0 +1,229 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_IGESWriter_HeaderFile
|
||||
#define _IGESData_IGESWriter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||
#include <Standard_Character.hxx>
|
||||
#include <IGESData_Array1OfDirPart.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IGESData_ReadStage.hxx>
|
||||
#include <Interface_LineBuffer.hxx>
|
||||
#include <Interface_FloatWriter.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class IGESData_IGESModel;
|
||||
class Interface_InterfaceMismatch;
|
||||
class Interface_FloatWriter;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_GlobalSection;
|
||||
class IGESData_IGESEntity;
|
||||
class TCollection_HAsciiString;
|
||||
class gp_XY;
|
||||
class gp_XYZ;
|
||||
|
||||
|
||||
//! manages atomic file writing, under control of IGESModel :
|
||||
//! prepare text to be sent then sends it
|
||||
//! takes into account distinction between successive Sections
|
||||
class IGESData_IGESWriter
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates an IGESWriter, empty ready to work
|
||||
//! (see the methods SendModel and Print)
|
||||
Standard_EXPORT IGESData_IGESWriter(const Handle(IGESData_IGESModel)& amodel);
|
||||
|
||||
//! Default constructor (not used) to satisfy the compiler
|
||||
Standard_EXPORT IGESData_IGESWriter();
|
||||
|
||||
//! Constructor by copy (not used) to satisfy the compiler
|
||||
Standard_EXPORT IGESData_IGESWriter(const IGESData_IGESWriter& other);
|
||||
|
||||
//! Returns the embedded FloatWriter, which controls sending Reals
|
||||
//! Use this method to access FloatWriter in order to consult or
|
||||
//! change its options (MainFormat, FormatForRange,ZeroSuppress),
|
||||
//! because it is returned as the address of its field
|
||||
Standard_EXPORT Interface_FloatWriter& FloatWriter();
|
||||
|
||||
//! Returns the write mode, in order to be read and/or changed
|
||||
//! Write Mode controls the way final print works
|
||||
//! 0 (D) : Normal IGES, 10 : FNES
|
||||
Standard_EXPORT Standard_Integer& WriteMode();
|
||||
|
||||
//! Sends an additionnal Starting Line : this is the way used to
|
||||
//! send comments in an IGES File (at beginning of the file).
|
||||
//! If the line is more than 72 char.s long, it is splited into
|
||||
//! as many lines as required to send it completely
|
||||
Standard_EXPORT void SendStartLine (const Standard_CString startline);
|
||||
|
||||
//! Sends the complete IGESModel (Global Section, Entities as
|
||||
//! Directory Entries & Parameter Lists, etc...)
|
||||
//! i.e. fills a list of texts. Once filled, it can be sent by
|
||||
//! method Print
|
||||
Standard_EXPORT void SendModel (const Handle(IGESData_Protocol)& protocol);
|
||||
|
||||
//! declares sending of S section (only a declaration)
|
||||
//! error if state is not initial
|
||||
Standard_EXPORT void SectionS();
|
||||
|
||||
//! prepares sending of header, from a GlobalSection (stores it)
|
||||
//! error if SectionS was not called just before
|
||||
//! takes in account special characters (Separator, EndMark)
|
||||
Standard_EXPORT void SectionG (const IGESData_GlobalSection& header);
|
||||
|
||||
//! prepares sending of list of entities, as Sections D (directory
|
||||
//! list) and P (Parameters lists, one per entity)
|
||||
//! Entities will be then processed, one after the other
|
||||
//! error if SectionG has not be called just before
|
||||
Standard_EXPORT void SectionsDP();
|
||||
|
||||
//! declares sending of T section (only a declaration)
|
||||
//! error if does not follow Entities sending
|
||||
Standard_EXPORT void SectionT();
|
||||
|
||||
//! translates directory part of an Entity into a litteral DirPart
|
||||
//! Some infos are computed after sending parameters
|
||||
//! Error if not in sections DP or Stage not "Dir"
|
||||
Standard_EXPORT void DirPart (const Handle(IGESData_IGESEntity)& anent);
|
||||
|
||||
//! sends own parameters of the entity, by sending firstly its
|
||||
//! type, then calling specific method WriteOwnParams
|
||||
//! Error if not in sections DP or Stage not "Own"
|
||||
Standard_EXPORT void OwnParams (const Handle(IGESData_IGESEntity)& anent);
|
||||
|
||||
//! sends associativity list, as complement of parameters list
|
||||
//! error if not in sections DP or Stage not "Associativity"
|
||||
Standard_EXPORT void Associativities (const Handle(IGESData_IGESEntity)& anent);
|
||||
|
||||
//! sends property list, as complement of parameters list
|
||||
//! error if not in sections DP or Stage not "Property"
|
||||
Standard_EXPORT void Properties (const Handle(IGESData_IGESEntity)& anent);
|
||||
|
||||
//! declares end of sending an entity (ends param list by ';')
|
||||
Standard_EXPORT void EndEntity();
|
||||
|
||||
//! sends a void parameter, that is null text
|
||||
Standard_EXPORT void SendVoid();
|
||||
|
||||
//! sends an Integer parameter
|
||||
Standard_EXPORT void Send (const Standard_Integer val);
|
||||
|
||||
//! sends a Boolean parameter as an Integer value 0(False)/1(True)
|
||||
Standard_EXPORT void SendBoolean (const Standard_Boolean val);
|
||||
|
||||
//! sends a Real parameter. Works with FloatWriter
|
||||
Standard_EXPORT void Send (const Standard_Real val);
|
||||
|
||||
//! sends a Text parameter under Hollerith form
|
||||
Standard_EXPORT void Send (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
//! sends a Reference to an Entity (if its Number is N, its
|
||||
//! pointer is 2*N-1)
|
||||
//! If <val> is Null, "0" will be sent
|
||||
//! If <negative> is True, "Pointer" is sent as negative
|
||||
Standard_EXPORT void Send (const Handle(IGESData_IGESEntity)& val, const Standard_Boolean negative = Standard_False);
|
||||
template <class T> void Send (const Handle(T)& val, Standard_Boolean negative = Standard_False, typename std::enable_if<std::is_base_of<IGESData_IGESEntity, T>::value>::type * = 0) { Send ((const Handle(IGESData_IGESEntity)&)val, negative); }
|
||||
|
||||
//! sends a parameter under its exact form given as a string
|
||||
Standard_EXPORT void SendString (const Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
//! Sends a XY, interpreted as a couple of 2 Reals (X & Y)
|
||||
Standard_EXPORT void Send (const gp_XY& val);
|
||||
|
||||
//! Sends a XYZ, interpreted as a couple of 2 Reals (X , Y & Z)
|
||||
Standard_EXPORT void Send (const gp_XYZ& val);
|
||||
|
||||
//! Returns the list of strings for a section given its rank
|
||||
//! 1 : Start (if not empty) 2 : Global 3 or 4 : Parameters
|
||||
//! RQ: no string list for Directory section
|
||||
//! An empty section gives a null handle
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) SectionStrings (const Standard_Integer numsec) const;
|
||||
|
||||
//! Writes result on an output defined as an OStream
|
||||
//! resolves stored infos at this time; in particular, numbers of
|
||||
//! lines used to adress P-section from D-section and final totals
|
||||
//! Takes WriteMode into account
|
||||
Standard_EXPORT Standard_Boolean Print (Standard_OStream& S) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Basic action of adding a string to current parameter list as a
|
||||
//! line; manages size limit (64 or 72 according Sestion G or P)
|
||||
//! <more>, if precised, requires that <more> characters will
|
||||
//! remain free on the current line once this AddString done
|
||||
Standard_EXPORT void AddString (const Handle(TCollection_HAsciiString)& val, const Standard_Integer more = 0);
|
||||
|
||||
//! Basic action of adding a string to current parameter list as a
|
||||
//! line. Manages size limit (64 or 72 according Sestion G or P)
|
||||
//! <val> is the string and <lnval> its length. If <lnval> is not
|
||||
//! given, it is computed by strlen(val).
|
||||
//! <more>, if precised, requires that <more> characters will
|
||||
//! remain free on the current line once this AddString done
|
||||
Standard_EXPORT void AddString (const Standard_CString val, const Standard_Integer lnval = 0, const Standard_Integer more = 0);
|
||||
|
||||
//! Adds a string defined as a single character (for instance, the
|
||||
//! parameter separator). Manages size limit
|
||||
//! <more>, if precised, requires that <more> characters will
|
||||
//! remain free on the current line once this AddString done
|
||||
Standard_EXPORT void AddChar (const Standard_Character val, const Standard_Integer more = 0);
|
||||
|
||||
|
||||
Handle(IGESData_IGESModel) themodel;
|
||||
Handle(TColStd_HSequenceOfHAsciiString) thestar;
|
||||
Handle(TColStd_HSequenceOfHAsciiString) thehead;
|
||||
Standard_Character thesep;
|
||||
Standard_Character theendm;
|
||||
IGESData_Array1OfDirPart thedirs;
|
||||
TColStd_Array1OfInteger thepnum;
|
||||
Handle(TColStd_HSequenceOfHAsciiString) thepars;
|
||||
Standard_Integer thesect;
|
||||
IGESData_ReadStage thestep;
|
||||
Interface_LineBuffer thecurr;
|
||||
Standard_Integer themodew;
|
||||
Interface_FloatWriter thefloatw;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_IGESWriter_HeaderFile
|
@@ -1,24 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
deferred class LabelDisplayEntity from IGESData inherits IGESEntity
|
||||
|
||||
---Purpose : defines required type for LabelDisplay in directory part
|
||||
-- an effective LabelDisplay entity must inherits it
|
||||
|
||||
is
|
||||
|
||||
end LabelDisplayEntity;
|
@@ -11,5 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_LabelDisplayEntity.ixx>
|
||||
|
||||
#include <IGESData_LabelDisplayEntity.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
// LabelDisplayEntity ne sert qu'au controle de type (pour le directory part)
|
||||
|
60
src/IGESData/IGESData_LabelDisplayEntity.hxx
Normal file
60
src/IGESData/IGESData_LabelDisplayEntity.hxx
Normal file
@@ -0,0 +1,60 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_LabelDisplayEntity_HeaderFile
|
||||
#define _IGESData_LabelDisplayEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
|
||||
|
||||
class IGESData_LabelDisplayEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_LabelDisplayEntity, IGESData_IGESEntity)
|
||||
|
||||
//! defines required type for LabelDisplay in directory part
|
||||
//! an effective LabelDisplay entity must inherits it
|
||||
class IGESData_LabelDisplayEntity : public IGESData_IGESEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_LabelDisplayEntity,IGESData_IGESEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_LabelDisplayEntity_HeaderFile
|
@@ -1,39 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
deferred class LevelListEntity from IGESData inherits IGESEntity
|
||||
|
||||
---Purpose : defines required type for LevelList in directory part
|
||||
-- an effective LevelList entity must inherits it
|
||||
|
||||
uses Boolean, Integer
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
NbLevelNumbers (me) returns Integer is deferred;
|
||||
---Purpose : Must return the count of levels
|
||||
|
||||
LevelNumber (me; num : Integer) returns Integer
|
||||
raises OutOfRange is deferred;
|
||||
---Purpose : returns the Level Number of <me>, indicated by <num>
|
||||
-- raises an exception if num is out of range
|
||||
|
||||
HasLevelNumber (me; level : Integer) returns Boolean;
|
||||
---Purpose : returns True if <level> is in the list
|
||||
|
||||
end LevelListEntity;
|
@@ -11,10 +11,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_LevelListEntity.ixx>
|
||||
|
||||
#include <IGESData_LevelListEntity.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
// LevelListEntity ne sert qu'au controle de type (pour le directory part)
|
||||
|
||||
|
||||
Standard_Boolean IGESData_LevelListEntity::HasLevelNumber
|
||||
(const Standard_Integer level) const
|
||||
{
|
||||
|
73
src/IGESData/IGESData_LevelListEntity.hxx
Normal file
73
src/IGESData/IGESData_LevelListEntity.hxx
Normal file
@@ -0,0 +1,73 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_LevelListEntity_HeaderFile
|
||||
#define _IGESData_LevelListEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_OutOfRange;
|
||||
|
||||
|
||||
class IGESData_LevelListEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_LevelListEntity, IGESData_IGESEntity)
|
||||
|
||||
//! defines required type for LevelList in directory part
|
||||
//! an effective LevelList entity must inherits it
|
||||
class IGESData_LevelListEntity : public IGESData_IGESEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Must return the count of levels
|
||||
Standard_EXPORT virtual Standard_Integer NbLevelNumbers() const = 0;
|
||||
|
||||
//! returns the Level Number of <me>, indicated by <num>
|
||||
//! raises an exception if num is out of range
|
||||
Standard_EXPORT virtual Standard_Integer LevelNumber (const Standard_Integer num) const = 0;
|
||||
|
||||
//! returns True if <level> is in the list
|
||||
Standard_EXPORT Standard_Boolean HasLevelNumber (const Standard_Integer level) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_LevelListEntity,IGESData_IGESEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_LevelListEntity_HeaderFile
|
@@ -1,24 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
deferred class LineFontEntity from IGESData inherits IGESEntity
|
||||
|
||||
---Purpose : defines required type for LineFont in directory part
|
||||
-- an effective LineFont entity must inherits it
|
||||
|
||||
is
|
||||
|
||||
end LineFontEntity;
|
@@ -11,5 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_LineFontEntity.ixx>
|
||||
|
||||
#include <IGESData_LineFontEntity.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
// LineTypeEntity ne sert qu'au controle de type (pour le directory part)
|
||||
|
60
src/IGESData/IGESData_LineFontEntity.hxx
Normal file
60
src/IGESData/IGESData_LineFontEntity.hxx
Normal file
@@ -0,0 +1,60 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_LineFontEntity_HeaderFile
|
||||
#define _IGESData_LineFontEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
|
||||
|
||||
class IGESData_LineFontEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_LineFontEntity, IGESData_IGESEntity)
|
||||
|
||||
//! defines required type for LineFont in directory part
|
||||
//! an effective LineFont entity must inherits it
|
||||
class IGESData_LineFontEntity : public IGESData_IGESEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_LineFontEntity,IGESData_IGESEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_LineFontEntity_HeaderFile
|
@@ -1,30 +0,0 @@
|
||||
-- Created on: 1992-04-07
|
||||
-- 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.
|
||||
|
||||
deferred class NameEntity from IGESData inherits IGESEntity
|
||||
|
||||
---Purpose : a NameEntity is a kind of IGESEntity which can provide a Name
|
||||
-- under alphanumeric (String) form, from Properties list
|
||||
-- an effective Name entity must inherit it
|
||||
|
||||
uses HAsciiString from TCollection
|
||||
|
||||
is
|
||||
|
||||
Value (me) returns HAsciiString from TCollection is deferred;
|
||||
---Purpose : Retyrns the alphanumeric value of the Name, to be defined
|
||||
|
||||
end NameEntity;
|
@@ -11,5 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_NameEntity.ixx>
|
||||
|
||||
#include <IGESData_NameEntity.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
// NameEntity sert a decrire des entites "propriete nom" (Value a definir)
|
||||
|
65
src/IGESData/IGESData_NameEntity.hxx
Normal file
65
src/IGESData/IGESData_NameEntity.hxx
Normal file
@@ -0,0 +1,65 @@
|
||||
// Created on: 1992-04-07
|
||||
// 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 _IGESData_NameEntity_HeaderFile
|
||||
#define _IGESData_NameEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
|
||||
class IGESData_NameEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_NameEntity, IGESData_IGESEntity)
|
||||
|
||||
//! a NameEntity is a kind of IGESEntity which can provide a Name
|
||||
//! under alphanumeric (String) form, from Properties list
|
||||
//! an effective Name entity must inherit it
|
||||
class IGESData_NameEntity : public IGESData_IGESEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Retyrns the alphanumeric value of the Name, to be defined
|
||||
Standard_EXPORT virtual Handle(TCollection_HAsciiString) Value() const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_NameEntity,IGESData_IGESEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_NameEntity_HeaderFile
|
76
src/IGESData/IGESData_NodeOfSpecificLib.hxx
Normal file
76
src/IGESData/IGESData_NodeOfSpecificLib.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_NodeOfSpecificLib_HeaderFile
|
||||
#define _IGESData_NodeOfSpecificLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
class IGESData_GlobalNodeOfSpecificLib;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_SpecificModule;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_SpecificLib;
|
||||
|
||||
|
||||
class IGESData_NodeOfSpecificLib;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_NodeOfSpecificLib, MMgt_TShared)
|
||||
|
||||
|
||||
class IGESData_NodeOfSpecificLib : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_NodeOfSpecificLib();
|
||||
|
||||
Standard_EXPORT void AddNode (const Handle(IGESData_GlobalNodeOfSpecificLib)& anode);
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_SpecificModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_NodeOfSpecificLib)& Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_NodeOfSpecificLib,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(IGESData_GlobalNodeOfSpecificLib) thenode;
|
||||
Handle(IGESData_NodeOfSpecificLib) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_NodeOfSpecificLib_HeaderFile
|
54
src/IGESData/IGESData_NodeOfSpecificLib_0.cxx
Normal file
54
src/IGESData/IGESData_NodeOfSpecificLib_0.cxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 <IGESData_NodeOfSpecificLib.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
#include <IGESData_NodeOfSpecificLib.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_SpecificLib.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheObject Handle(IGESData_IGESEntity)
|
||||
#define TheObject_hxx <IGESData_IGESEntity.hxx>
|
||||
#define Handle_TheModule Handle(IGESData_SpecificModule)
|
||||
#define TheModule IGESData_SpecificModule
|
||||
#define TheModule_hxx <IGESData_SpecificModule.hxx>
|
||||
#define Handle_TheProtocol Handle(IGESData_Protocol)
|
||||
#define TheProtocol IGESData_Protocol
|
||||
#define TheProtocol_hxx <IGESData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
|
||||
#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
#define LibCtl_Node IGESData_NodeOfSpecificLib
|
||||
#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
|
||||
#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
|
||||
#define LibCtl_Library IGESData_SpecificLib
|
||||
#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
|
||||
#include <LibCtl_Node.gxx>
|
||||
|
76
src/IGESData/IGESData_NodeOfWriterLib.hxx
Normal file
76
src/IGESData/IGESData_NodeOfWriterLib.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_NodeOfWriterLib_HeaderFile
|
||||
#define _IGESData_NodeOfWriterLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
class IGESData_GlobalNodeOfWriterLib;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_ReadWriteModule;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_WriterLib;
|
||||
|
||||
|
||||
class IGESData_NodeOfWriterLib;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_NodeOfWriterLib, MMgt_TShared)
|
||||
|
||||
|
||||
class IGESData_NodeOfWriterLib : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_NodeOfWriterLib();
|
||||
|
||||
Standard_EXPORT void AddNode (const Handle(IGESData_GlobalNodeOfWriterLib)& anode);
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_ReadWriteModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_NodeOfWriterLib)& Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_NodeOfWriterLib,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(IGESData_GlobalNodeOfWriterLib) thenode;
|
||||
Handle(IGESData_NodeOfWriterLib) thenext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_NodeOfWriterLib_HeaderFile
|
54
src/IGESData/IGESData_NodeOfWriterLib_0.cxx
Normal file
54
src/IGESData/IGESData_NodeOfWriterLib_0.cxx
Normal file
@@ -0,0 +1,54 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 <IGESData_NodeOfWriterLib.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_GlobalNodeOfWriterLib.hxx>
|
||||
#include <IGESData_NodeOfWriterLib.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_ReadWriteModule.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_WriterLib.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheObject Handle(IGESData_IGESEntity)
|
||||
#define TheObject_hxx <IGESData_IGESEntity.hxx>
|
||||
#define Handle_TheModule Handle(IGESData_ReadWriteModule)
|
||||
#define TheModule IGESData_ReadWriteModule
|
||||
#define TheModule_hxx <IGESData_ReadWriteModule.hxx>
|
||||
#define Handle_TheProtocol Handle(IGESData_Protocol)
|
||||
#define TheProtocol IGESData_Protocol
|
||||
#define TheProtocol_hxx <IGESData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode IGESData_GlobalNodeOfWriterLib
|
||||
#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfWriterLib.hxx>
|
||||
#define LibCtl_Node IGESData_NodeOfWriterLib
|
||||
#define LibCtl_Node_hxx <IGESData_NodeOfWriterLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfWriterLib)
|
||||
#define Handle_LibCtl_Node Handle(IGESData_NodeOfWriterLib)
|
||||
#define LibCtl_Library IGESData_WriterLib
|
||||
#define LibCtl_Library_hxx <IGESData_WriterLib.hxx>
|
||||
#include <LibCtl_Node.gxx>
|
||||
|
@@ -1,140 +0,0 @@
|
||||
-- Created on: 1992-10-26
|
||||
-- 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.
|
||||
|
||||
class ParamCursor from IGESData
|
||||
|
||||
---Purpose : Auxiliary class for ParamReader.
|
||||
-- It stores commands for a ParamReader to manage the current
|
||||
-- parameter number. Used by methods Read... from ParamReader.
|
||||
-- It allows to define the following commands :
|
||||
-- - read a parameter specified by a precise Number (basic case)
|
||||
-- - read a parameter then set Current Number to follow its number
|
||||
-- - read the current parameter (with Current Number) then
|
||||
-- advance Current Number by one
|
||||
-- - idem with several : read "nb" parameters from one specified,
|
||||
-- included, with or without setting Current Number to follow
|
||||
-- last parameter read
|
||||
-- - read several parameter from the current one, then advance
|
||||
-- Current Number to follow the last one read
|
||||
-- - Read several parameters (as above) but in interlaced lists,
|
||||
-- i.e. from complex items (each one including successively for
|
||||
-- instance, an Integer, a Real, an Entity ...)
|
||||
--
|
||||
-- If commands to advance Current Number are not set, it must be
|
||||
-- set by the user (with method SetCurrent from ParamReader)
|
||||
-- ParamReader offers methods which create most useful cases
|
||||
---See also : class ParamReader
|
||||
|
||||
uses Integer, Boolean
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create (num : Integer) returns ParamCursor;
|
||||
---Purpose : Creates a Cursor to read a precise parameter of ParamReader,
|
||||
-- identified by its number, then set Current Number to "num + 1"
|
||||
-- (this constructor allows to simply give a Number to a method
|
||||
-- Read... from ParamReader, which will be translated into a
|
||||
-- ParamCursor by compiler)
|
||||
|
||||
Create (num, nb : Integer; size : Integer = 1) returns ParamCursor;
|
||||
---Purpose : Creates a Cursor to read a list of parameters (count "nb")
|
||||
-- starting from a precise one (number "num") included, then
|
||||
-- set Current Number of ParamNumber to the first following one
|
||||
-- ("num + nb")
|
||||
-- If size is given, it means that each parameter is made of more
|
||||
-- than one term. One term is the normal (default) case : for
|
||||
-- instance, a Parameter comprises one Integer, or one Entity ...
|
||||
-- Size gives the complete size of each Item if it is complex.
|
||||
-- To be used ONLY IF it is constant
|
||||
|
||||
SetTerm (me : in out; size : Integer; autoadv : Boolean = Standard_True)
|
||||
raises InterfaceError is static;
|
||||
---Purpose : Defines the size of a term to read in the item : this commands
|
||||
-- ParamReader to read "size" parameters for each item, then
|
||||
-- skip the remainder of the item to the same term of next Item
|
||||
-- (that is, skip "item size" - "term size")
|
||||
--
|
||||
-- In addition, Offset from beginning of Item is managed :
|
||||
-- After being created, and for the frist call to SetTerm, the
|
||||
-- part of Item to be read begins exactly as the Item begins
|
||||
-- But after a SetTerm, the next read will add an offset which is
|
||||
-- the size of former term.
|
||||
--
|
||||
-- autoadv commands Advance management. If it is True (default),
|
||||
-- the last SetTerm (Item size has been covered) calls SetAdvance
|
||||
-- If it is False, SetAdvance must be called directly if necessary
|
||||
--
|
||||
-- Error if a SetTerm overpasses the size of the Item
|
||||
|
||||
SetOne (me : in out; autoadv : Boolean = Standard_True)
|
||||
raises InterfaceError is static;
|
||||
---Purpose : Defines a term of one Parameter (very current case)
|
||||
|
||||
SetXY (me : in out; autoadv : Boolean = Standard_True)
|
||||
raises InterfaceError is static;
|
||||
---Purpose : Defines a term of two Parameters for a XY (current case)
|
||||
|
||||
SetXYZ (me : in out; autoadv : Boolean = Standard_True)
|
||||
raises InterfaceError is static;
|
||||
---Purpose : Defines a term of three Parameters for XYZ (current case)
|
||||
|
||||
|
||||
SetAdvance (me : in out; advance : Boolean) is static;
|
||||
---Purpose : Changes command to advance current cursor after reading
|
||||
-- parameters. If "advance" True, sets advance, if "False",
|
||||
-- resets it. ParamCursor is created by default with True.
|
||||
|
||||
Start (me) returns Integer is static;
|
||||
---Purpose : Returns (included) starting number for reading parameters
|
||||
---C++: inline
|
||||
|
||||
Limit (me) returns Integer is static;
|
||||
---Purpose : Returns (excluded) upper limit number for reading parameters
|
||||
---C++ : inline
|
||||
|
||||
Count (me) returns Integer is static;
|
||||
---Purpose : Returns required count of items to be read
|
||||
---C++ : inline
|
||||
|
||||
ItemSize (me) returns Integer is static;
|
||||
---Purpose : Returns length of item (count of parameters per item)
|
||||
---C++ : inline
|
||||
|
||||
TermSize (me) returns Integer is static;
|
||||
---Purpose : Returns length of current term (count of parameters) in item
|
||||
---C++ : inline
|
||||
|
||||
Offset (me) returns Integer is static;
|
||||
---Purpose : Returns offset from which current term must be read in item
|
||||
---C++ : inline
|
||||
|
||||
Advance (me) returns Boolean is static;
|
||||
---Purpose : Returns True if Advance command has been set
|
||||
---C++ : inline
|
||||
|
||||
fields
|
||||
|
||||
thestart : Integer;
|
||||
thelimit : Integer;
|
||||
thecount : Integer;
|
||||
theisize : Integer;
|
||||
theoffst : Integer;
|
||||
thetsize : Integer;
|
||||
theadv : Boolean;
|
||||
|
||||
end ParamCursor;
|
@@ -11,11 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_ParamCursor.ixx>
|
||||
|
||||
#include <IGESData_ParamCursor.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
|
||||
|
||||
|
||||
IGESData_ParamCursor::IGESData_ParamCursor (const Standard_Integer num)
|
||||
{
|
||||
thestart = num; thelimit = thestart+1;
|
||||
|
158
src/IGESData/IGESData_ParamCursor.hxx
Normal file
158
src/IGESData/IGESData_ParamCursor.hxx
Normal file
@@ -0,0 +1,158 @@
|
||||
// Created on: 1992-10-26
|
||||
// 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 _IGESData_ParamCursor_HeaderFile
|
||||
#define _IGESData_ParamCursor_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_InterfaceError;
|
||||
|
||||
|
||||
//! Auxiliary class for ParamReader.
|
||||
//! It stores commands for a ParamReader to manage the current
|
||||
//! parameter number. Used by methods Read... from ParamReader.
|
||||
//! It allows to define the following commands :
|
||||
//! - read a parameter specified by a precise Number (basic case)
|
||||
//! - read a parameter then set Current Number to follow its number
|
||||
//! - read the current parameter (with Current Number) then
|
||||
//! advance Current Number by one
|
||||
//! - idem with several : read "nb" parameters from one specified,
|
||||
//! included, with or without setting Current Number to follow
|
||||
//! last parameter read
|
||||
//! - read several parameter from the current one, then advance
|
||||
//! Current Number to follow the last one read
|
||||
//! - Read several parameters (as above) but in interlaced lists,
|
||||
//! i.e. from complex items (each one including successively for
|
||||
//! instance, an Integer, a Real, an Entity ...)
|
||||
//!
|
||||
//! If commands to advance Current Number are not set, it must be
|
||||
//! set by the user (with method SetCurrent from ParamReader)
|
||||
//! ParamReader offers methods which create most useful cases
|
||||
class IGESData_ParamCursor
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a Cursor to read a precise parameter of ParamReader,
|
||||
//! identified by its number, then set Current Number to "num + 1"
|
||||
//! (this constructor allows to simply give a Number to a method
|
||||
//! Read... from ParamReader, which will be translated into a
|
||||
//! ParamCursor by compiler)
|
||||
Standard_EXPORT IGESData_ParamCursor(const Standard_Integer num);
|
||||
|
||||
//! Creates a Cursor to read a list of parameters (count "nb")
|
||||
//! starting from a precise one (number "num") included, then
|
||||
//! set Current Number of ParamNumber to the first following one
|
||||
//! ("num + nb")
|
||||
//! If size is given, it means that each parameter is made of more
|
||||
//! than one term. One term is the normal (default) case : for
|
||||
//! instance, a Parameter comprises one Integer, or one Entity ...
|
||||
//! Size gives the complete size of each Item if it is complex.
|
||||
//! To be used ONLY IF it is constant
|
||||
Standard_EXPORT IGESData_ParamCursor(const Standard_Integer num, const Standard_Integer nb, const Standard_Integer size = 1);
|
||||
|
||||
//! Defines the size of a term to read in the item : this commands
|
||||
//! ParamReader to read "size" parameters for each item, then
|
||||
//! skip the remainder of the item to the same term of next Item
|
||||
//! (that is, skip "item size" - "term size")
|
||||
//!
|
||||
//! In addition, Offset from beginning of Item is managed :
|
||||
//! After being created, and for the frist call to SetTerm, the
|
||||
//! part of Item to be read begins exactly as the Item begins
|
||||
//! But after a SetTerm, the next read will add an offset which is
|
||||
//! the size of former term.
|
||||
//!
|
||||
//! autoadv commands Advance management. If it is True (default),
|
||||
//! the last SetTerm (Item size has been covered) calls SetAdvance
|
||||
//! If it is False, SetAdvance must be called directly if necessary
|
||||
//!
|
||||
//! Error if a SetTerm overpasses the size of the Item
|
||||
Standard_EXPORT void SetTerm (const Standard_Integer size, const Standard_Boolean autoadv = Standard_True);
|
||||
|
||||
//! Defines a term of one Parameter (very current case)
|
||||
Standard_EXPORT void SetOne (const Standard_Boolean autoadv = Standard_True);
|
||||
|
||||
//! Defines a term of two Parameters for a XY (current case)
|
||||
Standard_EXPORT void SetXY (const Standard_Boolean autoadv = Standard_True);
|
||||
|
||||
//! Defines a term of three Parameters for XYZ (current case)
|
||||
Standard_EXPORT void SetXYZ (const Standard_Boolean autoadv = Standard_True);
|
||||
|
||||
//! Changes command to advance current cursor after reading
|
||||
//! parameters. If "advance" True, sets advance, if "False",
|
||||
//! resets it. ParamCursor is created by default with True.
|
||||
Standard_EXPORT void SetAdvance (const Standard_Boolean advance);
|
||||
|
||||
//! Returns (included) starting number for reading parameters
|
||||
Standard_Integer Start() const;
|
||||
|
||||
//! Returns (excluded) upper limit number for reading parameters
|
||||
Standard_Integer Limit() const;
|
||||
|
||||
//! Returns required count of items to be read
|
||||
Standard_Integer Count() const;
|
||||
|
||||
//! Returns length of item (count of parameters per item)
|
||||
Standard_Integer ItemSize() const;
|
||||
|
||||
//! Returns length of current term (count of parameters) in item
|
||||
Standard_Integer TermSize() const;
|
||||
|
||||
//! Returns offset from which current term must be read in item
|
||||
Standard_Integer Offset() const;
|
||||
|
||||
//! Returns True if Advance command has been set
|
||||
Standard_Boolean Advance() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer thestart;
|
||||
Standard_Integer thelimit;
|
||||
Standard_Integer thecount;
|
||||
Standard_Integer theisize;
|
||||
Standard_Integer theoffst;
|
||||
Standard_Integer thetsize;
|
||||
Standard_Boolean theadv;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IGESData_ParamCursor.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_ParamCursor_HeaderFile
|
@@ -1,490 +0,0 @@
|
||||
-- Created on: 1992-04-06
|
||||
-- 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.
|
||||
|
||||
class ParamReader from IGESData
|
||||
|
||||
---Purpose : access to a list of parameters, with management of read stage
|
||||
-- (owned parameters, properties, associativities) and current
|
||||
-- parameter number, read errors (which feed a Check), plus
|
||||
-- convenient facilities to read parameters, in particular :
|
||||
-- - first parameter is ignored (it repeats entity type), hence
|
||||
-- number 1 gives 2nd parameter, etc...
|
||||
-- - lists are not explicit, list-reading methods are provided
|
||||
-- which manage a current param. number
|
||||
-- - interpretation is made as possible (texts, reals, entities ...)
|
||||
-- (in particular, Reading a Real accepts an Integer)
|
||||
|
||||
uses Integer, Boolean, Real, CString,
|
||||
HAsciiString from TCollection, XY, XYZ,
|
||||
HArray1OfInteger from TColStd, HArray1OfReal from TColStd,
|
||||
HArray1OfHAsciiString from Interface, HArray1OfIGESEntity,
|
||||
EntityList, ParamType, ParamList, Check,
|
||||
IGESEntity, ReadStage, IGESReaderData, ParamCursor, Msg from Message,
|
||||
Status from IGESData
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create (list : ParamList; ach : Check;
|
||||
base : Integer = 1; nbpar : Integer = 0; num : Integer = 0)
|
||||
returns ParamReader;
|
||||
---Purpose : Prepares a ParamReader, stage "Own", current param = 1
|
||||
-- It considers a part of the list, from <base> (excluded) for
|
||||
-- <nbpar> parameters; <nbpar> = 0 commands to take list length.
|
||||
-- Default is (1 to skip type)
|
||||
|
||||
EntityNumber (me) returns Integer;
|
||||
---Purpose : Returns the entity number in the file
|
||||
|
||||
-- -- State management -- --
|
||||
|
||||
Clear (me : in out);
|
||||
---Purpose : resets state (stage, current param number, check with no fail)
|
||||
|
||||
CurrentNumber (me) returns Integer;
|
||||
---Purpose : returns the current parameter number
|
||||
-- This notion is involved by the organisation of an IGES list of
|
||||
-- parameter : it can be ended by two lists (Associativities and
|
||||
-- Properties), which can be empty, or even absent. Hence, it is
|
||||
-- necessary to know, at the end of specific reading, how many
|
||||
-- parameters have been read : the optionnal lists follow
|
||||
---See Also : methods Current, CurrentList and Read...
|
||||
|
||||
SetCurrentNumber (me : in out; num : Integer);
|
||||
---Purpose : sets current parameter number to a new value
|
||||
-- must be done at end of each step : set on first parameter
|
||||
-- following last read one; is done by some Read... methods
|
||||
-- (must be done directly if these method are not used)
|
||||
-- num greater than NbParams means that following lists are empty
|
||||
-- If current num is not managed, it remains at 1, which probably
|
||||
-- will cause error when successive steps of reading are made
|
||||
|
||||
Stage (me) returns ReadStage;
|
||||
---Purpose : gives current stage (Own-Props-Assocs-End, begins at Own)
|
||||
|
||||
NextStage (me : in out);
|
||||
---Purpose : passes to next stage (must be linked with setting Current)
|
||||
|
||||
EndAll (me : in out);
|
||||
---Purpose : passes directly to the end of reading process
|
||||
|
||||
-- -- Queries on Parameters -- --
|
||||
|
||||
NbParams (me) returns Integer;
|
||||
---Purpose : returns number of parameters (minus the first one)
|
||||
-- following method skip the first parameter (1 gives the 2nd)
|
||||
|
||||
ParamType (me; num : Integer) returns ParamType;
|
||||
---Purpose : returns type of parameter; note that "Ident" or "Sub" cannot
|
||||
-- be encountered, they correspond to "Integer", see also below
|
||||
|
||||
ParamValue (me; num : Integer) returns CString;
|
||||
---Purpose : returns litteral value of a parameter, as it was in file
|
||||
---C++ : return const
|
||||
|
||||
-- -- Adapted Helps for Reading -- --
|
||||
|
||||
IsParamDefined (me; num : Integer) returns Boolean;
|
||||
---Purpose : says if a parameter is defined (not void)
|
||||
-- See also DefinedElseSkip
|
||||
|
||||
IsParamEntity (me; num : Integer) returns Boolean;
|
||||
---Purpose : says if a parameter can be regarded as an entity reference
|
||||
-- (see Prepare from IGESReaderData for more explanation)
|
||||
-- Note that such a parameter can seen as be a plain Integer too
|
||||
|
||||
ParamNumber (me; num : Integer) returns Integer;
|
||||
---Purpose : returns entity number corresponding to a parameter if there is
|
||||
-- otherwise zero (according criterium IsParamEntity)
|
||||
|
||||
ParamEntity (me : in out; IR : IGESReaderData; num : Integer)
|
||||
returns IGESEntity
|
||||
---Purpose : directly returns entity referenced by a parameter
|
||||
raises InterfaceError;
|
||||
-- Error if <num> cannot be regarded as an Entity reference
|
||||
-- (causes recording fail into check and raising an exception)
|
||||
-- More complete ways of reading -- --
|
||||
-- The following methods (Read...) allow to read data, manage errors,
|
||||
-- and manage Current number (through a ParamCursor)
|
||||
-- Managing error is done as follows :
|
||||
-- - the Check (contained in the ParamReader) is filled with a Fail
|
||||
-- message, composed with "mess" given as argument
|
||||
-- - returned Value is False
|
||||
-- - Finally, if it is not precise enough, status for last call to a
|
||||
-- method Read.. can be asked (but not ParamEntity or IsParamDefined)
|
||||
-- If a Correction occurs, returned Value is True, as a normal read
|
||||
-- (but a Warning message is recorded and LastStatus is different)
|
||||
--
|
||||
-- Params are identified through a ParamCursor, which allows :
|
||||
-- - basically, to designate a Parameter by its Number
|
||||
-- - also, to designate several ones (that is, a list)
|
||||
-- - and more, to define lists of complex items (involving interlaced
|
||||
-- lists for each term)
|
||||
-- - optionnally to work with the Current Number (this is the default):
|
||||
-- - Number of parameter (first one for a list) is Current Number;
|
||||
-- - after Reading, Current Number will follow the last paameter read
|
||||
-- Hence, SetCurrentNumber has not to be called
|
||||
-- - Except a Defined Parameter, else Skip Current Parameter if it is Void
|
||||
-- Options provided by methods Current and CurrentList
|
||||
-- Remark : If Read... receives directly an Integer value, it will be
|
||||
-- converted into a ParamCursor by the C++ compiler
|
||||
|
||||
Current (me) returns ParamCursor;
|
||||
---Purpose : Creates a ParamCursor from the Current Number, to read one
|
||||
-- parameter, and to advance Current Number after reading
|
||||
|
||||
CurrentList (me; nb : Integer; size : Integer = 1) returns ParamCursor;
|
||||
---Purpose : Creates a ParamCursor from the Current Number, to read a list
|
||||
-- of "nb" items, and to advance Current Number after reading
|
||||
-- By default, each item is made of one parameter
|
||||
-- If size is given, it precises the number of params per item
|
||||
|
||||
-- For Message
|
||||
PrepareRead (me : in out; PC : ParamCursor; several : Boolean; size : Integer = 1)
|
||||
returns Boolean is private;
|
||||
|
||||
|
||||
PrepareRead (me : in out; PC : ParamCursor; mess : CString;
|
||||
several : Boolean; size : Integer = 1)
|
||||
returns Boolean is private;
|
||||
---Purpose : Prepares work for Read... methods which call it to begin
|
||||
-- The required count of parameters must not overpass NbParams.
|
||||
-- If several is given False, PC count must be one.
|
||||
-- If size is given, the TermSize from ParmCursor must be a
|
||||
-- multiple count of this size.
|
||||
-- If one of above condition is not satisfied, a Fail Message is
|
||||
-- recorded into Check, using the root "mess" and return is False
|
||||
|
||||
FirstRead (me : in out; nb : Integer = 1) returns Integer is static private;
|
||||
---Purpose : Gets the first parameter number to be read, determined from
|
||||
-- ParamCursor data read by PrepareRead (Start + Offset)
|
||||
-- Then commands to skip 1 parameter (default) or nb if given
|
||||
|
||||
NextRead (me : in out; nb : Integer = 1) returns Integer is static private;
|
||||
---Purpose : Gets the next parameter number to be read. Skips to next Item
|
||||
-- if TermSize has been read.
|
||||
-- Then commands to skip 1 parameter (default) or nb if given
|
||||
|
||||
DefinedElseSkip (me : in out) returns Boolean;
|
||||
---Purpose : Allows to simply process a parameter which can be defaulted.
|
||||
-- Waits on the Current Number a defined parameter or skips it :
|
||||
-- If the parameter <num> is defined, changes nothing and returns True
|
||||
-- Hence, the next reading with current cursor will concern <num>
|
||||
-- If it is void, advances Current Position by one, and returns False
|
||||
-- The next reading will concern <num+1> (except if <num> = NbParams)
|
||||
--
|
||||
-- This allows to process Default values as follows (C++) :
|
||||
-- if (PR.DefinedElseSkip()) {
|
||||
-- .. PR.Read... (current parameter);
|
||||
-- } else {
|
||||
-- <current parameter> = default value
|
||||
-- .. nothing else to do with ParamReader
|
||||
-- }
|
||||
-- For Message
|
||||
ReadInteger (me : in out; PC : ParamCursor;
|
||||
val : out Integer) returns Boolean;
|
||||
|
||||
ReadInteger (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out Integer) returns Boolean;
|
||||
---Purpose : Reads an Integer value designated by PC
|
||||
-- The method Current designates the current parameter and
|
||||
-- advances the Current Number by one after reading
|
||||
-- Note that if a count (not 1) is given, it is ignored
|
||||
-- If it is not an Integer, fills Check with a Fail (using mess)
|
||||
-- and returns False
|
||||
|
||||
-- For Message
|
||||
ReadBoolean (me : in out; PC : ParamCursor; amsg : Msg from Message;
|
||||
val : out Boolean; exact : Boolean = Standard_True) returns Boolean;
|
||||
|
||||
ReadBoolean (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out Boolean; exact : Boolean = Standard_True) returns Boolean;
|
||||
---Purpose : Reads a Boolean value from parameter "num"
|
||||
-- A Boolean is given as an Integer value 0 (False) or 1 (True)
|
||||
-- Anyway, an Integer is demanded (else, Check is filled)
|
||||
-- If exact is given True, those precise values are demanded
|
||||
-- Else, Correction is done, as False for 0 or <0, True for >0
|
||||
-- (with a Warning error message, and return is True)
|
||||
-- In case of error (not an Integer, or not 0/1 and exact True),
|
||||
-- Check is filled with a Fail (using mess) and return is False
|
||||
|
||||
-- For Message
|
||||
ReadReal (me : in out; PC : ParamCursor;
|
||||
val : out Real) returns Boolean;
|
||||
|
||||
ReadReal (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out Real) returns Boolean;
|
||||
---Purpose : Reads a Real value from parameter "num"
|
||||
-- An Integer is accepted (Check is filled with a Warning
|
||||
-- message) and causes return to be True (as normal case)
|
||||
-- In other cases, Check is filled with a Fail and return is False
|
||||
|
||||
-- For Message
|
||||
ReadXY (me : in out; PC : ParamCursor;amsg : out Msg from Message ;
|
||||
val : out XY) returns Boolean;
|
||||
|
||||
ReadXY (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out XY) returns Boolean;
|
||||
---Purpose : Reads a couple of Real values (X,Y) from parameter "num"
|
||||
-- Integers are accepted (Check is filled with a Warning
|
||||
-- message) and cause return to be True (as normal case)
|
||||
-- In other cases, Check is filled with a Fail and return is False
|
||||
|
||||
-- For Message
|
||||
ReadXYZ (me : in out; PC : ParamCursor; amsg : out Msg from Message;
|
||||
val : out XYZ) returns Boolean;
|
||||
|
||||
ReadXYZ (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out XYZ) returns Boolean;
|
||||
---Purpose : Reads a triplet of Real values (X,Y,Z) from parameter "num"
|
||||
-- Integers are accepted (Check is filled with a Warning
|
||||
-- message) and cause return to be True (as normal case)
|
||||
-- In other cases, Check is filled with a Fail and return is False
|
||||
-- For Message
|
||||
ReadText (me : in out; PC : ParamCursor; amsg : Msg from Message;
|
||||
val : out HAsciiString from TCollection) returns Boolean;
|
||||
|
||||
ReadText (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out HAsciiString from TCollection) returns Boolean;
|
||||
---Purpose : Reads a Text value from parameter "num", as a String from
|
||||
-- Collection, that is, Hollerith text without leading "nnnH"
|
||||
-- If it is not a String, fills Check with a Fail (using mess)
|
||||
-- and returns False
|
||||
|
||||
-- For Message
|
||||
ReadEntity (me : in out; IR : IGESReaderData;
|
||||
PC : ParamCursor;
|
||||
aStatus: in out Status from IGESData;
|
||||
val : out IGESEntity;
|
||||
canbenul : Boolean = Standard_False)
|
||||
returns Boolean;
|
||||
|
||||
ReadEntity (me : in out; IR : IGESReaderData; PC : ParamCursor; mess : CString;
|
||||
val : out IGESEntity; canbenul : Boolean = Standard_False) returns Boolean;
|
||||
---Purpose : Reads an IGES entity from parameter "num"
|
||||
-- An Entity is known by its reference, which has the form of an
|
||||
-- odd Integer Value (a number in the Directory)
|
||||
-- If <canbenul> is given True, a Reference can also be Null :
|
||||
-- in this case, the result is a Null Handle with no Error
|
||||
-- If <canbenul> is False, a Null Reference causes an Error
|
||||
-- If the parameter cannot refer to an entity (or null), fills
|
||||
-- Check with a Fail (using mess) and returns False
|
||||
|
||||
|
||||
-- For Message
|
||||
ReadEntity (me : in out; IR : IGESReaderData;
|
||||
PC : ParamCursor;
|
||||
aStatus: in out Status from IGESData;
|
||||
type : Type from Standard;
|
||||
val : out IGESEntity;
|
||||
canbenul : Boolean = Standard_False) returns Boolean;
|
||||
|
||||
ReadEntity (me : in out; IR : IGESReaderData;
|
||||
PC : ParamCursor;
|
||||
mess : CString;
|
||||
type : Type from Standard;
|
||||
val : out IGESEntity;
|
||||
canbenul : Boolean = Standard_False) returns Boolean;
|
||||
---Purpose : Works as ReadEntity without Type, but in addition checks the
|
||||
-- Type of the Entity, which must be "kind of" a given <type>
|
||||
-- Then, gives the same fail cases as ReadEntity without Type,
|
||||
-- plus the case "Incorrect Type"
|
||||
-- (in such a case, returns False and givel <val> = Null)
|
||||
|
||||
-- For Message
|
||||
ReadInts (me : in out; PC : ParamCursor; amsg : Msg from Message;
|
||||
val : out HArray1OfInteger from TColStd; index : Integer = 1) returns Boolean;
|
||||
|
||||
ReadInts (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out HArray1OfInteger from TColStd; index : Integer = 1) returns Boolean;
|
||||
---Purpose : Reads a list of Integer values, defined by PC (with a count of
|
||||
-- parameters). PC can start from Current Number and command it
|
||||
-- to advance after reading (use method CurrentList to do this)
|
||||
-- The list is given as a HArray1, numered from "index"
|
||||
-- If all params are not Integer, Check is filled (using mess)
|
||||
-- and return value is False
|
||||
|
||||
-- For Message
|
||||
ReadReals (me : in out; PC : ParamCursor;amsg : out Msg from Message;
|
||||
val : out HArray1OfReal from TColStd; index : Integer = 1) returns Boolean;
|
||||
|
||||
ReadReals (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out HArray1OfReal from TColStd; index : Integer = 1) returns Boolean;
|
||||
---Purpose : Reads a list of Real values defined by PC
|
||||
-- Same conditions as for ReadInts, for PC and index
|
||||
-- An Integer parameter is accepted, if at least one parameter is
|
||||
-- Integer, Check is filled with a "Warning" message
|
||||
-- If all params are neither Real nor Integer, Check is filled
|
||||
-- (using mess) and return value is False
|
||||
|
||||
-- For Message
|
||||
ReadTexts (me : in out; PC : ParamCursor; amsg : Msg from Message;
|
||||
val : out HArray1OfHAsciiString; index : Integer = 1) returns Boolean;
|
||||
|
||||
ReadTexts (me : in out; PC : ParamCursor; mess : CString;
|
||||
val : out HArray1OfHAsciiString; index : Integer = 1) returns Boolean;
|
||||
---Purpose : Reads a list of Hollerith Texts, defined by PC
|
||||
-- Texts are read as Hollerith texts without leading "nnnH"
|
||||
-- Same conditions as for ReadInts, for PC and index
|
||||
-- If all params are not Text, Check is filled (using mess)
|
||||
-- and return value is False
|
||||
|
||||
-- For Message
|
||||
ReadEnts (me : in out; IR : IGESReaderData; PC : ParamCursor;amsg : Msg from Message;
|
||||
val : out HArray1OfIGESEntity; index : Integer = 1) returns Boolean;
|
||||
|
||||
ReadEnts (me : in out; IR : IGESReaderData; PC : ParamCursor; mess : CString;
|
||||
val : out HArray1OfIGESEntity; index : Integer = 1) returns Boolean;
|
||||
---Purpose : Reads a list of Entities defined by PC
|
||||
-- Same conditions as for ReadInts, for PC and index
|
||||
-- The list is given as a HArray1, numered from "index"
|
||||
-- If all params cannot be read as Entities, Check is filled
|
||||
-- (using mess) and return value is False
|
||||
-- Remark : Null references are accepted, they are ignored
|
||||
-- (negative pointers too : they provoke a Warning message)
|
||||
-- If the caller wants to check them, a loop on ReadEntity should
|
||||
-- be used
|
||||
|
||||
|
||||
-- For Message
|
||||
ReadEntList (me : in out; IR : IGESReaderData; PC : ParamCursor;amsg : in out Msg from Message;
|
||||
val : in out EntityList; ord : Boolean = Standard_True) returns Boolean;
|
||||
|
||||
ReadEntList (me : in out; IR : IGESReaderData; PC : ParamCursor; mess : CString;
|
||||
val : in out EntityList; ord : Boolean = Standard_True) returns Boolean;
|
||||
---Purpose : Reads a list of Entities defined by PC
|
||||
-- Same conditions as for ReadEnts, for PC
|
||||
-- The list is given as an EntityList
|
||||
-- (index has no meaning; the EntityList starts from clear)
|
||||
-- If "ord" is given True (default), entities will be added to
|
||||
-- the list in their original order
|
||||
-- Remark : Negative or Null Pointers are ignored
|
||||
-- Else ("ord" False), order is not garanteed (faster mode)
|
||||
-- If all params cannot be read as Entities, same as above
|
||||
-- Warning Give "ord" to False ONLY if order is not significant
|
||||
|
||||
-- For Message
|
||||
ReadingReal (me : in out; num : Integer;
|
||||
val : out Real) returns Boolean;
|
||||
|
||||
ReadingReal (me : in out; num : Integer; mess : CString;
|
||||
val : out Real) returns Boolean;
|
||||
---Purpose : Routine which reads a Real parameter, given its number
|
||||
-- Same conditions as ReadReal for mess, val, and return value
|
||||
|
||||
-- For Message
|
||||
ReadingEntityNumber (me : in out; num : Integer;
|
||||
val : out Integer) returns Boolean;
|
||||
|
||||
ReadingEntityNumber (me : in out; num : Integer; mess : CString;
|
||||
val : out Integer) returns Boolean;
|
||||
---Purpose : Routine which reads an Entity Number (which allows to read the
|
||||
-- Entity in the IGESReaderData by BoundEntity), given its number
|
||||
-- in the list of Parameters
|
||||
-- Same conditions as ReadEntity for mess, val, and return value
|
||||
-- In particular, returns True and val to zero means Null Entity,
|
||||
-- and val not zero means Entity read by BoundEntity
|
||||
|
||||
|
||||
-- -- Check management for Message -- --
|
||||
|
||||
SendFail (me : in out; amsg : Msg from Message)
|
||||
is static;
|
||||
|
||||
|
||||
SendWarning (me : in out; amsg :Msg from Message)
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
|
||||
-- -- Check management -- --
|
||||
|
||||
AddFail (me : in out; idm : CString; af,bf : HAsciiString from TCollection)
|
||||
is static private;
|
||||
---Purpose : internal method which builds a Fail message from an
|
||||
-- identification "idm" and a diagnostic ("afail")
|
||||
-- Also feeds LastReadStatus
|
||||
-- <af> for final message, bf (can be different) for original
|
||||
|
||||
AddFail (me : in out; idm, afail : CString; bfail : CString)
|
||||
is static private;
|
||||
---Purpose : Same as above but with CString
|
||||
-- <bf> empty means = <af>
|
||||
|
||||
AddWarning (me : in out; idm : CString; aw,bw : HAsciiString from TCollection)
|
||||
is static private;
|
||||
---Purpose : internal method which builds a Warning message from an
|
||||
-- identification "idm" and a diagnostic
|
||||
-- <aw> is final message, bw is original (can be different)
|
||||
-- Also feeds LastReadStatus
|
||||
|
||||
AddWarning (me : in out; idm, aw : CString; bw : CString)
|
||||
is static private;
|
||||
---Purpose : Same as above but with CString
|
||||
-- <bw> empty means = <aw>
|
||||
|
||||
AddFail (me : in out; afail : CString; bfail : CString = "") is static;
|
||||
AddFail (me : in out; af,bf : HAsciiString from TCollection) is static;
|
||||
---Purpose : feeds the Check with a new fail (as a String or as a CString)
|
||||
|
||||
AddWarning (me : in out; awarn : CString; bwarn : CString = "") is static;
|
||||
AddWarning (me : in out; aw,bw : HAsciiString from TCollection) is static;
|
||||
---Purpose : feeds the Check with a new Warning message
|
||||
|
||||
Mend (me : in out; pref : CString = "");
|
||||
--Purpose : Mends the Fail messages, by calling Mend from Check
|
||||
|
||||
HasFailed (me) returns Boolean is static;
|
||||
---Purpose : says if fails have been recorded into the Check
|
||||
|
||||
Check (me) returns Check is static;
|
||||
---Purpose : returns the Check
|
||||
-- Note that any error signaled above is also recorded into it
|
||||
---C++ : return const&
|
||||
|
||||
CCheck (me : in out) returns Check is static;
|
||||
---Purpose : returns the check in a way which allows to work on it directly
|
||||
-- (i.e. messages added to the Check are added to ParamReader too)
|
||||
---C++ : return &
|
||||
|
||||
|
||||
IsCheckEmpty (me) returns Boolean is static;
|
||||
---Purpose : Returns True if the Check is Empty
|
||||
-- Else, it has to be recorded with the Read Entity
|
||||
|
||||
fields
|
||||
|
||||
theparams : ParamList;
|
||||
thecheck : Check;
|
||||
thebase : Integer;
|
||||
thenbpar : Integer;
|
||||
thecurr : Integer;
|
||||
thestage : ReadStage; -- following organisation of an IGESEntity
|
||||
thelast : Boolean; -- LastReadStatus
|
||||
theindex : Integer; -- data to manage Read... process
|
||||
thenbitem : Integer;
|
||||
theitemsz : Integer;
|
||||
theoffset : Integer;
|
||||
thetermsz : Integer;
|
||||
themaxind : Integer;
|
||||
thenbterm : Integer;
|
||||
pbrealint : Integer;
|
||||
pbrealform : Integer;
|
||||
thenum : Integer;
|
||||
|
||||
end ParamReader;
|
@@ -12,18 +12,28 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
//pdn S4135 05.04.99 comment uninitialized Interface_Static::IVal("iges.convert.read");
|
||||
#include <IGESData_ParamReader.ixx>
|
||||
|
||||
#include <gp_XY.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESReaderData.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <IGESData_ParamCursor.hxx>
|
||||
#include <IGESData_ParamReader.hxx>
|
||||
#include <IGESData_Status.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_EntityList.hxx>
|
||||
#include <Interface_FileParameter.hxx>
|
||||
#include <Interface_FileReaderData.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_ParamList.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <stdio.h>
|
||||
#include <IGESData_Status.hxx>
|
||||
|
||||
// MGE 03/08/98
|
||||
#include <Message_Msg.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
// MGE 03/08/98
|
||||
static Standard_Integer testconv = -1; // cf parametre de session
|
||||
|
||||
// .... Gestion generale (etat, courant ...) ....
|
||||
|
418
src/IGESData/IGESData_ParamReader.hxx
Normal file
418
src/IGESData/IGESData_ParamReader.hxx
Normal file
@@ -0,0 +1,418 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_ParamReader_HeaderFile
|
||||
#define _IGESData_ParamReader_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IGESData_ReadStage.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IGESData_Status.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <Interface_HArray1OfHAsciiString.hxx>
|
||||
#include <IGESData_HArray1OfIGESEntity.hxx>
|
||||
class Interface_ParamList;
|
||||
class Interface_Check;
|
||||
class Interface_InterfaceError;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_ParamCursor;
|
||||
class Message_Msg;
|
||||
class gp_XY;
|
||||
class gp_XYZ;
|
||||
class TCollection_HAsciiString;
|
||||
class Interface_EntityList;
|
||||
|
||||
|
||||
//! access to a list of parameters, with management of read stage
|
||||
//! (owned parameters, properties, associativities) and current
|
||||
//! parameter number, read errors (which feed a Check), plus
|
||||
//! convenient facilities to read parameters, in particular :
|
||||
//! - first parameter is ignored (it repeats entity type), hence
|
||||
//! number 1 gives 2nd parameter, etc...
|
||||
//! - lists are not explicit, list-reading methods are provided
|
||||
//! which manage a current param. number
|
||||
//! - interpretation is made as possible (texts, reals, entities ...)
|
||||
//! (in particular, Reading a Real accepts an Integer)
|
||||
class IGESData_ParamReader
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Prepares a ParamReader, stage "Own", current param = 1
|
||||
//! It considers a part of the list, from <base> (excluded) for
|
||||
//! <nbpar> parameters; <nbpar> = 0 commands to take list length.
|
||||
//! Default is (1 to skip type)
|
||||
Standard_EXPORT IGESData_ParamReader(const Handle(Interface_ParamList)& list, const Handle(Interface_Check)& ach, const Standard_Integer base = 1, const Standard_Integer nbpar = 0, const Standard_Integer num = 0);
|
||||
|
||||
//! Returns the entity number in the file
|
||||
Standard_EXPORT Standard_Integer EntityNumber() const;
|
||||
|
||||
//! resets state (stage, current param number, check with no fail)
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
//! returns the current parameter number
|
||||
//! This notion is involved by the organisation of an IGES list of
|
||||
//! parameter : it can be ended by two lists (Associativities and
|
||||
//! Properties), which can be empty, or even absent. Hence, it is
|
||||
//! necessary to know, at the end of specific reading, how many
|
||||
//! parameters have been read : the optionnal lists follow
|
||||
Standard_EXPORT Standard_Integer CurrentNumber() const;
|
||||
|
||||
//! sets current parameter number to a new value
|
||||
//! must be done at end of each step : set on first parameter
|
||||
//! following last read one; is done by some Read... methods
|
||||
//! (must be done directly if these method are not used)
|
||||
//! num greater than NbParams means that following lists are empty
|
||||
//! If current num is not managed, it remains at 1, which probably
|
||||
//! will cause error when successive steps of reading are made
|
||||
Standard_EXPORT void SetCurrentNumber (const Standard_Integer num);
|
||||
|
||||
//! gives current stage (Own-Props-Assocs-End, begins at Own)
|
||||
Standard_EXPORT IGESData_ReadStage Stage() const;
|
||||
|
||||
//! passes to next stage (must be linked with setting Current)
|
||||
Standard_EXPORT void NextStage();
|
||||
|
||||
//! passes directly to the end of reading process
|
||||
Standard_EXPORT void EndAll();
|
||||
|
||||
//! returns number of parameters (minus the first one)
|
||||
//! following method skip the first parameter (1 gives the 2nd)
|
||||
Standard_EXPORT Standard_Integer NbParams() const;
|
||||
|
||||
//! returns type of parameter; note that "Ident" or "Sub" cannot
|
||||
//! be encountered, they correspond to "Integer", see also below
|
||||
Standard_EXPORT Interface_ParamType ParamType (const Standard_Integer num) const;
|
||||
|
||||
//! returns litteral value of a parameter, as it was in file
|
||||
Standard_EXPORT const Standard_CString ParamValue (const Standard_Integer num) const;
|
||||
|
||||
//! says if a parameter is defined (not void)
|
||||
//! See also DefinedElseSkip
|
||||
Standard_EXPORT Standard_Boolean IsParamDefined (const Standard_Integer num) const;
|
||||
|
||||
//! says if a parameter can be regarded as an entity reference
|
||||
//! (see Prepare from IGESReaderData for more explanation)
|
||||
//! Note that such a parameter can seen as be a plain Integer too
|
||||
Standard_EXPORT Standard_Boolean IsParamEntity (const Standard_Integer num) const;
|
||||
|
||||
//! returns entity number corresponding to a parameter if there is
|
||||
//! otherwise zero (according criterium IsParamEntity)
|
||||
Standard_EXPORT Standard_Integer ParamNumber (const Standard_Integer num) const;
|
||||
|
||||
//! directly returns entity referenced by a parameter
|
||||
Standard_EXPORT Handle(IGESData_IGESEntity) ParamEntity (const Handle(IGESData_IGESReaderData)& IR, const Standard_Integer num);
|
||||
|
||||
//! Creates a ParamCursor from the Current Number, to read one
|
||||
//! parameter, and to advance Current Number after reading
|
||||
Standard_EXPORT IGESData_ParamCursor Current() const;
|
||||
|
||||
//! Creates a ParamCursor from the Current Number, to read a list
|
||||
//! of "nb" items, and to advance Current Number after reading
|
||||
//! By default, each item is made of one parameter
|
||||
//! If size is given, it precises the number of params per item
|
||||
Standard_EXPORT IGESData_ParamCursor CurrentList (const Standard_Integer nb, const Standard_Integer size = 1) const;
|
||||
|
||||
//! Allows to simply process a parameter which can be defaulted.
|
||||
//! Waits on the Current Number a defined parameter or skips it :
|
||||
//! If the parameter <num> is defined, changes nothing and returns True
|
||||
//! Hence, the next reading with current cursor will concern <num>
|
||||
//! If it is void, advances Current Position by one, and returns False
|
||||
//! The next reading will concern <num+1> (except if <num> = NbParams)
|
||||
//!
|
||||
//! This allows to process Default values as follows (C++) :
|
||||
//! if (PR.DefinedElseSkip()) {
|
||||
//! .. PR.Read... (current parameter);
|
||||
//! } else {
|
||||
//! <current parameter> = default value
|
||||
//! .. nothing else to do with ParamReader
|
||||
//! }
|
||||
//! For Message
|
||||
Standard_EXPORT Standard_Boolean DefinedElseSkip();
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadInteger (const IGESData_ParamCursor& PC, Standard_Integer& val);
|
||||
|
||||
//! Reads an Integer value designated by PC
|
||||
//! The method Current designates the current parameter and
|
||||
//! advances the Current Number by one after reading
|
||||
//! Note that if a count (not 1) is given, it is ignored
|
||||
//! If it is not an Integer, fills Check with a Fail (using mess)
|
||||
//! and returns False
|
||||
Standard_EXPORT Standard_Boolean ReadInteger (const IGESData_ParamCursor& PC, const Standard_CString mess, Standard_Integer& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadBoolean (const IGESData_ParamCursor& PC, const Message_Msg& amsg, Standard_Boolean& val, const Standard_Boolean exact = Standard_True);
|
||||
|
||||
//! Reads a Boolean value from parameter "num"
|
||||
//! A Boolean is given as an Integer value 0 (False) or 1 (True)
|
||||
//! Anyway, an Integer is demanded (else, Check is filled)
|
||||
//! If exact is given True, those precise values are demanded
|
||||
//! Else, Correction is done, as False for 0 or <0, True for >0
|
||||
//! (with a Warning error message, and return is True)
|
||||
//! In case of error (not an Integer, or not 0/1 and exact True),
|
||||
//! Check is filled with a Fail (using mess) and return is False
|
||||
Standard_EXPORT Standard_Boolean ReadBoolean (const IGESData_ParamCursor& PC, const Standard_CString mess, Standard_Boolean& val, const Standard_Boolean exact = Standard_True);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadReal (const IGESData_ParamCursor& PC, Standard_Real& val);
|
||||
|
||||
//! Reads a Real value from parameter "num"
|
||||
//! An Integer is accepted (Check is filled with a Warning
|
||||
//! message) and causes return to be True (as normal case)
|
||||
//! In other cases, Check is filled with a Fail and return is False
|
||||
Standard_EXPORT Standard_Boolean ReadReal (const IGESData_ParamCursor& PC, const Standard_CString mess, Standard_Real& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadXY (const IGESData_ParamCursor& PC, Message_Msg& amsg, gp_XY& val);
|
||||
|
||||
//! Reads a couple of Real values (X,Y) from parameter "num"
|
||||
//! Integers are accepted (Check is filled with a Warning
|
||||
//! message) and cause return to be True (as normal case)
|
||||
//! In other cases, Check is filled with a Fail and return is False
|
||||
Standard_EXPORT Standard_Boolean ReadXY (const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XY& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadXYZ (const IGESData_ParamCursor& PC, Message_Msg& amsg, gp_XYZ& val);
|
||||
|
||||
//! Reads a triplet of Real values (X,Y,Z) from parameter "num"
|
||||
//! Integers are accepted (Check is filled with a Warning
|
||||
//! message) and cause return to be True (as normal case)
|
||||
//! In other cases, Check is filled with a Fail and return is False
|
||||
//! For Message
|
||||
Standard_EXPORT Standard_Boolean ReadXYZ (const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XYZ& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadText (const IGESData_ParamCursor& PC, const Message_Msg& amsg, Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
//! Reads a Text value from parameter "num", as a String from
|
||||
//! Collection, that is, Hollerith text without leading "nnnH"
|
||||
//! If it is not a String, fills Check with a Fail (using mess)
|
||||
//! and returns False
|
||||
Standard_EXPORT Standard_Boolean ReadText (const IGESData_ParamCursor& PC, const Standard_CString mess, Handle(TCollection_HAsciiString)& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadEntity (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, IGESData_Status& aStatus, Handle(IGESData_IGESEntity)& val, const Standard_Boolean canbenul = Standard_False);
|
||||
|
||||
//! Reads an IGES entity from parameter "num"
|
||||
//! An Entity is known by its reference, which has the form of an
|
||||
//! odd Integer Value (a number in the Directory)
|
||||
//! If <canbenul> is given True, a Reference can also be Null :
|
||||
//! in this case, the result is a Null Handle with no Error
|
||||
//! If <canbenul> is False, a Null Reference causes an Error
|
||||
//! If the parameter cannot refer to an entity (or null), fills
|
||||
//! Check with a Fail (using mess) and returns False
|
||||
Standard_EXPORT Standard_Boolean ReadEntity (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, const Standard_CString mess, Handle(IGESData_IGESEntity)& val, const Standard_Boolean canbenul = Standard_False);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadEntity (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, IGESData_Status& aStatus, const Handle(Standard_Type)& type, Handle(IGESData_IGESEntity)& val, const Standard_Boolean canbenul = Standard_False);
|
||||
|
||||
//! Works as ReadEntity without Type, but in addition checks the
|
||||
//! Type of the Entity, which must be "kind of" a given <type>
|
||||
//! Then, gives the same fail cases as ReadEntity without Type,
|
||||
//! plus the case "Incorrect Type"
|
||||
//! (in such a case, returns False and givel <val> = Null)
|
||||
Standard_EXPORT Standard_Boolean ReadEntity (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, const Standard_CString mess, const Handle(Standard_Type)& type, Handle(IGESData_IGESEntity)& val, const Standard_Boolean canbenul = Standard_False);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadInts (const IGESData_ParamCursor& PC, const Message_Msg& amsg, Handle(TColStd_HArray1OfInteger)& val, const Standard_Integer index = 1);
|
||||
|
||||
//! Reads a list of Integer values, defined by PC (with a count of
|
||||
//! parameters). PC can start from Current Number and command it
|
||||
//! to advance after reading (use method CurrentList to do this)
|
||||
//! The list is given as a HArray1, numered from "index"
|
||||
//! If all params are not Integer, Check is filled (using mess)
|
||||
//! and return value is False
|
||||
Standard_EXPORT Standard_Boolean ReadInts (const IGESData_ParamCursor& PC, const Standard_CString mess, Handle(TColStd_HArray1OfInteger)& val, const Standard_Integer index = 1);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadReals (const IGESData_ParamCursor& PC, Message_Msg& amsg, Handle(TColStd_HArray1OfReal)& val, const Standard_Integer index = 1);
|
||||
|
||||
//! Reads a list of Real values defined by PC
|
||||
//! Same conditions as for ReadInts, for PC and index
|
||||
//! An Integer parameter is accepted, if at least one parameter is
|
||||
//! Integer, Check is filled with a "Warning" message
|
||||
//! If all params are neither Real nor Integer, Check is filled
|
||||
//! (using mess) and return value is False
|
||||
Standard_EXPORT Standard_Boolean ReadReals (const IGESData_ParamCursor& PC, const Standard_CString mess, Handle(TColStd_HArray1OfReal)& val, const Standard_Integer index = 1);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadTexts (const IGESData_ParamCursor& PC, const Message_Msg& amsg, Handle(Interface_HArray1OfHAsciiString)& val, const Standard_Integer index = 1);
|
||||
|
||||
//! Reads a list of Hollerith Texts, defined by PC
|
||||
//! Texts are read as Hollerith texts without leading "nnnH"
|
||||
//! Same conditions as for ReadInts, for PC and index
|
||||
//! If all params are not Text, Check is filled (using mess)
|
||||
//! and return value is False
|
||||
Standard_EXPORT Standard_Boolean ReadTexts (const IGESData_ParamCursor& PC, const Standard_CString mess, Handle(Interface_HArray1OfHAsciiString)& val, const Standard_Integer index = 1);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadEnts (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, const Message_Msg& amsg, Handle(IGESData_HArray1OfIGESEntity)& val, const Standard_Integer index = 1);
|
||||
|
||||
//! Reads a list of Entities defined by PC
|
||||
//! Same conditions as for ReadInts, for PC and index
|
||||
//! The list is given as a HArray1, numered from "index"
|
||||
//! If all params cannot be read as Entities, Check is filled
|
||||
//! (using mess) and return value is False
|
||||
//! Remark : Null references are accepted, they are ignored
|
||||
//! (negative pointers too : they provoke a Warning message)
|
||||
//! If the caller wants to check them, a loop on ReadEntity should
|
||||
//! be used
|
||||
Standard_EXPORT Standard_Boolean ReadEnts (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, const Standard_CString mess, Handle(IGESData_HArray1OfIGESEntity)& val, const Standard_Integer index = 1);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadEntList (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, Message_Msg& amsg, Interface_EntityList& val, const Standard_Boolean ord = Standard_True);
|
||||
|
||||
//! Reads a list of Entities defined by PC
|
||||
//! Same conditions as for ReadEnts, for PC
|
||||
//! The list is given as an EntityList
|
||||
//! (index has no meaning; the EntityList starts from clear)
|
||||
//! If "ord" is given True (default), entities will be added to
|
||||
//! the list in their original order
|
||||
//! Remark : Negative or Null Pointers are ignored
|
||||
//! Else ("ord" False), order is not garanteed (faster mode)
|
||||
//! If all params cannot be read as Entities, same as above
|
||||
//! Warning Give "ord" to False ONLY if order is not significant
|
||||
Standard_EXPORT Standard_Boolean ReadEntList (const Handle(IGESData_IGESReaderData)& IR, const IGESData_ParamCursor& PC, const Standard_CString mess, Interface_EntityList& val, const Standard_Boolean ord = Standard_True);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadingReal (const Standard_Integer num, Standard_Real& val);
|
||||
|
||||
//! Routine which reads a Real parameter, given its number
|
||||
//! Same conditions as ReadReal for mess, val, and return value
|
||||
Standard_EXPORT Standard_Boolean ReadingReal (const Standard_Integer num, const Standard_CString mess, Standard_Real& val);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadingEntityNumber (const Standard_Integer num, Standard_Integer& val);
|
||||
|
||||
//! Routine which reads an Entity Number (which allows to read the
|
||||
//! Entity in the IGESReaderData by BoundEntity), given its number
|
||||
//! in the list of Parameters
|
||||
//! Same conditions as ReadEntity for mess, val, and return value
|
||||
//! In particular, returns True and val to zero means Null Entity,
|
||||
//! and val not zero means Entity read by BoundEntity
|
||||
Standard_EXPORT Standard_Boolean ReadingEntityNumber (const Standard_Integer num, const Standard_CString mess, Standard_Integer& val);
|
||||
|
||||
Standard_EXPORT void SendFail (const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void SendWarning (const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void AddFail (const Standard_CString afail, const Standard_CString bfail = "");
|
||||
|
||||
//! feeds the Check with a new fail (as a String or as a CString)
|
||||
Standard_EXPORT void AddFail (const Handle(TCollection_HAsciiString)& af, const Handle(TCollection_HAsciiString)& bf);
|
||||
|
||||
Standard_EXPORT void AddWarning (const Standard_CString awarn, const Standard_CString bwarn = "");
|
||||
|
||||
//! feeds the Check with a new Warning message
|
||||
Standard_EXPORT void AddWarning (const Handle(TCollection_HAsciiString)& aw, const Handle(TCollection_HAsciiString)& bw);
|
||||
|
||||
Standard_EXPORT void Mend (const Standard_CString pref = "");
|
||||
|
||||
//! says if fails have been recorded into the Check
|
||||
Standard_EXPORT Standard_Boolean HasFailed() const;
|
||||
|
||||
//! returns the Check
|
||||
//! Note that any error signaled above is also recorded into it
|
||||
Standard_EXPORT const Handle(Interface_Check)& Check() const;
|
||||
|
||||
//! returns the check in a way which allows to work on it directly
|
||||
//! (i.e. messages added to the Check are added to ParamReader too)
|
||||
Standard_EXPORT Handle(Interface_Check)& CCheck();
|
||||
|
||||
//! Returns True if the Check is Empty
|
||||
//! Else, it has to be recorded with the Read Entity
|
||||
Standard_EXPORT Standard_Boolean IsCheckEmpty() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean PrepareRead (const IGESData_ParamCursor& PC, const Standard_Boolean several, const Standard_Integer size = 1);
|
||||
|
||||
//! Prepares work for Read... methods which call it to begin
|
||||
//! The required count of parameters must not overpass NbParams.
|
||||
//! If several is given False, PC count must be one.
|
||||
//! If size is given, the TermSize from ParmCursor must be a
|
||||
//! multiple count of this size.
|
||||
//! If one of above condition is not satisfied, a Fail Message is
|
||||
//! recorded into Check, using the root "mess" and return is False
|
||||
Standard_EXPORT Standard_Boolean PrepareRead (const IGESData_ParamCursor& PC, const Standard_CString mess, const Standard_Boolean several, const Standard_Integer size = 1);
|
||||
|
||||
//! Gets the first parameter number to be read, determined from
|
||||
//! ParamCursor data read by PrepareRead (Start + Offset)
|
||||
//! Then commands to skip 1 parameter (default) or nb if given
|
||||
Standard_EXPORT Standard_Integer FirstRead (const Standard_Integer nb = 1);
|
||||
|
||||
//! Gets the next parameter number to be read. Skips to next Item
|
||||
//! if TermSize has been read.
|
||||
//! Then commands to skip 1 parameter (default) or nb if given
|
||||
Standard_EXPORT Standard_Integer NextRead (const Standard_Integer nb = 1);
|
||||
|
||||
//! internal method which builds a Fail message from an
|
||||
//! identification "idm" and a diagnostic ("afail")
|
||||
//! Also feeds LastReadStatus
|
||||
//! <af> for final message, bf (can be different) for original
|
||||
Standard_EXPORT void AddFail (const Standard_CString idm, const Handle(TCollection_HAsciiString)& af, const Handle(TCollection_HAsciiString)& bf);
|
||||
|
||||
//! Same as above but with CString
|
||||
//! <bf> empty means = <af>
|
||||
Standard_EXPORT void AddFail (const Standard_CString idm, const Standard_CString afail, const Standard_CString bfail);
|
||||
|
||||
//! internal method which builds a Warning message from an
|
||||
//! identification "idm" and a diagnostic
|
||||
//! <aw> is final message, bw is original (can be different)
|
||||
//! Also feeds LastReadStatus
|
||||
Standard_EXPORT void AddWarning (const Standard_CString idm, const Handle(TCollection_HAsciiString)& aw, const Handle(TCollection_HAsciiString)& bw);
|
||||
|
||||
//! Same as above but with CString
|
||||
//! <bw> empty means = <aw>
|
||||
Standard_EXPORT void AddWarning (const Standard_CString idm, const Standard_CString aw, const Standard_CString bw);
|
||||
|
||||
|
||||
Handle(Interface_ParamList) theparams;
|
||||
Handle(Interface_Check) thecheck;
|
||||
Standard_Integer thebase;
|
||||
Standard_Integer thenbpar;
|
||||
Standard_Integer thecurr;
|
||||
IGESData_ReadStage thestage;
|
||||
Standard_Boolean thelast;
|
||||
Standard_Integer theindex;
|
||||
Standard_Integer thenbitem;
|
||||
Standard_Integer theitemsz;
|
||||
Standard_Integer theoffset;
|
||||
Standard_Integer thetermsz;
|
||||
Standard_Integer themaxind;
|
||||
Standard_Integer thenbterm;
|
||||
Standard_Integer pbrealint;
|
||||
Standard_Integer pbrealform;
|
||||
Standard_Integer thenum;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_ParamReader_HeaderFile
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 1993-05-05
|
||||
-- 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 IGESData inherits Protocol from Interface
|
||||
|
||||
---Purpose : Description of basic Protocol for IGES
|
||||
-- This comprises treatement of IGESModel and Recognition of
|
||||
-- Undefined-FreeFormat-Entity
|
||||
|
||||
uses OStream, Type, InterfaceModel, Check
|
||||
|
||||
is
|
||||
|
||||
Create returns Protocol from IGESData;
|
||||
|
||||
NbResources (me) returns Integer;
|
||||
---Purpose : Gives the count of Resource Protocol. Here, none
|
||||
|
||||
Resource (me; num : Integer) returns Protocol from Interface;
|
||||
---Purpose : Returns a Resource, given a rank. Here, none
|
||||
|
||||
TypeNumber (me; atype : any Type) returns Integer;
|
||||
---Purpose : Returns a Case Number, specific of each recognized Type
|
||||
-- Here, Undefined and Free Format Entities have the Number 1.
|
||||
|
||||
-- -- General Services (defined at Norm level) -- --
|
||||
|
||||
NewModel (me) returns InterfaceModel;
|
||||
---Purpose : Creates an empty Model for IGES Norm
|
||||
|
||||
IsSuitableModel (me; model : InterfaceModel) returns Boolean;
|
||||
---Purpose : Returns True if <model> is a Model of IGES Norm
|
||||
|
||||
UnknownEntity (me) returns Transient;
|
||||
---Purpose : Creates a new Unknown Entity for IGES (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
|
||||
|
||||
end Protocol;
|
@@ -11,13 +11,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_Protocol.ixx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
|
||||
#include <IGESData_FreeFormatEntity.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
|
||||
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_UndefinedEntity.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IGESData_Protocol::IGESData_Protocol () { }
|
||||
|
||||
|
92
src/IGESData/IGESData_Protocol.hxx
Normal file
92
src/IGESData/IGESData_Protocol.hxx
Normal file
@@ -0,0 +1,92 @@
|
||||
// Created on: 1993-05-05
|
||||
// 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 _IGESData_Protocol_HeaderFile
|
||||
#define _IGESData_Protocol_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Protocol;
|
||||
class Interface_InterfaceModel;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class IGESData_Protocol;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_Protocol, Interface_Protocol)
|
||||
|
||||
//! Description of basic Protocol for IGES
|
||||
//! This comprises treatement of IGESModel and Recognition of
|
||||
//! Undefined-FreeFormat-Entity
|
||||
class IGESData_Protocol : public Interface_Protocol
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IGESData_Protocol();
|
||||
|
||||
//! Gives the count of Resource Protocol. Here, none
|
||||
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 Case Number, specific of each recognized Type
|
||||
//! Here, Undefined and Free Format Entities have the Number 1.
|
||||
Standard_EXPORT Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! Creates an empty Model for IGES Norm
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const;
|
||||
|
||||
//! Returns True if <model> is a Model of IGES Norm
|
||||
Standard_EXPORT Standard_Boolean IsSuitableModel (const Handle(Interface_InterfaceModel)& model) const;
|
||||
|
||||
//! Creates a new Unknown Entity for IGES (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;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_Protocol,Interface_Protocol)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_Protocol_HeaderFile
|
30
src/IGESData/IGESData_ReadStage.hxx
Normal file
30
src/IGESData/IGESData_ReadStage.hxx
Normal file
@@ -0,0 +1,30 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_ReadStage_HeaderFile
|
||||
#define _IGESData_ReadStage_HeaderFile
|
||||
|
||||
//! gives successive stages of reading an entity (see ParamReader)
|
||||
enum IGESData_ReadStage
|
||||
{
|
||||
IGESData_ReadDir,
|
||||
IGESData_ReadOwn,
|
||||
IGESData_ReadAssocs,
|
||||
IGESData_ReadProps,
|
||||
IGESData_ReadEnd
|
||||
};
|
||||
|
||||
#endif // _IGESData_ReadStage_HeaderFile
|
@@ -1,84 +0,0 @@
|
||||
-- Created on: 1993-09-06
|
||||
-- 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 IGESData
|
||||
inherits ReaderModule from Interface
|
||||
|
||||
---Purpose : Defines basic File Access Module, under the control of
|
||||
-- IGESReaderTool for Reading and IGESWriter for Writing :
|
||||
-- Specific actions concern : Read and Write Own Parameters of
|
||||
-- an IGESEntity.
|
||||
-- The common parts (Directory Entry, Lists of Associativities
|
||||
-- and Properties) are processed by IGESReaderTool & IGESWriter
|
||||
--
|
||||
-- Each sub-class of ReadWriteModule is used in conjunction with
|
||||
-- a sub-class of Protocol from IGESData and processes several
|
||||
-- types of IGESEntity (typically, them of a package) :
|
||||
-- The Protocol gives a unique positive integer Case Number for
|
||||
-- each type of IGESEntity it recognizes, the corresponding
|
||||
-- ReadWriteModule processes an Entity by using the Case Number
|
||||
-- to known what is to do
|
||||
-- On Reading, the general service NewVoid is used to create an
|
||||
-- IGES Entity the first time
|
||||
--
|
||||
-- Warning : Works with an IGESReaderData which stores "DE parts" of Items
|
||||
|
||||
uses Transient, FileReaderData, Check,
|
||||
IGESEntity, DirPart, IGESReaderData, ParamReader, IGESWriter
|
||||
|
||||
raises DomainError
|
||||
|
||||
is
|
||||
|
||||
CaseNum (me; data : FileReaderData; num : Integer) returns Integer;
|
||||
---Purpose : Translates the Type of record <num> in <data> to a positive
|
||||
-- Case Number, or 0 if failed.
|
||||
-- Works with IGESReaderData which provides Type & Form Numbers,
|
||||
-- and calls CaseIGES (see below)
|
||||
|
||||
CaseIGES (me; typenum, formnum : Integer) returns Integer is deferred;
|
||||
---Purpose : Defines Case Numbers corresponding to the Entity Types taken
|
||||
-- into account by a sub-class of ReadWriteModule (hence, each
|
||||
-- sub-class of ReadWriteModule has to redefine this method)
|
||||
-- Called by CaseNum. Its result will then be used to call
|
||||
-- Read, etc ...
|
||||
|
||||
Read (me; CN : Integer; data : FileReaderData; num : Integer;
|
||||
ach : in out Check; ent : Transient)
|
||||
raises DomainError;
|
||||
---Purpose : General Read Function. See IGESReaderTool for more info
|
||||
|
||||
ReadOwnParams (me; CN : Integer; ent : IGESEntity;
|
||||
IR : IGESReaderData; PR : in out ParamReader)
|
||||
raises DomainError is deferred;
|
||||
---Purpose : Reads own parameters from file for an Entity; <PR> gives
|
||||
-- access to them, <IR> detains parameter types and values
|
||||
-- For each class, there must be a specific action provided
|
||||
-- Note that Properties and Associativities Lists are Read by
|
||||
-- specific methods (see below), they are called under control
|
||||
-- of reading process (only one call) according Stage recorded
|
||||
-- in ParamReader
|
||||
|
||||
|
||||
WriteOwnParams (me; CN : Integer; ent : IGESEntity;
|
||||
IW : in out IGESWriter)
|
||||
is deferred;
|
||||
---Purpose : Writes own parameters to IGESWriter; defined for each class
|
||||
-- (to be redefined for other IGES ReadWriteModules)
|
||||
-- Warning : Properties and Associativities are directly managed by
|
||||
-- WriteIGES, must not be sent by this method
|
||||
|
||||
end ReadWriteModule;
|
@@ -11,12 +11,19 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_ReadWriteModule.ixx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESReaderData.hxx>
|
||||
#include <IGESData_IGESType.hxx>
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <IGESData_ParamReader.hxx>
|
||||
#include <IGESData_ReadWriteModule.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>
|
||||
|
||||
Standard_Integer IGESData_ReadWriteModule::CaseNum
|
||||
(const Handle(Interface_FileReaderData)& data,
|
||||
|
116
src/IGESData/IGESData_ReadWriteModule.hxx
Normal file
116
src/IGESData/IGESData_ReadWriteModule.hxx
Normal file
@@ -0,0 +1,116 @@
|
||||
// Created on: 1993-09-06
|
||||
// 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 _IGESData_ReadWriteModule_HeaderFile
|
||||
#define _IGESData_ReadWriteModule_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_ReaderModule.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_DomainError;
|
||||
class Interface_FileReaderData;
|
||||
class Interface_Check;
|
||||
class Standard_Transient;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_ParamReader;
|
||||
class IGESData_IGESWriter;
|
||||
|
||||
|
||||
class IGESData_ReadWriteModule;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_ReadWriteModule, Interface_ReaderModule)
|
||||
|
||||
//! Defines basic File Access Module, under the control of
|
||||
//! IGESReaderTool for Reading and IGESWriter for Writing :
|
||||
//! Specific actions concern : Read and Write Own Parameters of
|
||||
//! an IGESEntity.
|
||||
//! The common parts (Directory Entry, Lists of Associativities
|
||||
//! and Properties) are processed by IGESReaderTool & IGESWriter
|
||||
//!
|
||||
//! Each sub-class of ReadWriteModule is used in conjunction with
|
||||
//! a sub-class of Protocol from IGESData and processes several
|
||||
//! types of IGESEntity (typically, them of a package) :
|
||||
//! The Protocol gives a unique positive integer Case Number for
|
||||
//! each type of IGESEntity it recognizes, the corresponding
|
||||
//! ReadWriteModule processes an Entity by using the Case Number
|
||||
//! to known what is to do
|
||||
//! On Reading, the general service NewVoid is used to create an
|
||||
//! IGES Entity the first time
|
||||
//!
|
||||
//! Warning : Works with an IGESReaderData which stores "DE parts" of Items
|
||||
class IGESData_ReadWriteModule : public Interface_ReaderModule
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Translates the Type of record <num> in <data> to a positive
|
||||
//! Case Number, or 0 if failed.
|
||||
//! Works with IGESReaderData which provides Type & Form Numbers,
|
||||
//! and calls CaseIGES (see below)
|
||||
Standard_EXPORT Standard_Integer CaseNum (const Handle(Interface_FileReaderData)& data, const Standard_Integer num) const;
|
||||
|
||||
//! Defines Case Numbers corresponding to the Entity Types taken
|
||||
//! into account by a sub-class of ReadWriteModule (hence, each
|
||||
//! sub-class of ReadWriteModule has to redefine this method)
|
||||
//! Called by CaseNum. Its result will then be used to call
|
||||
//! Read, etc ...
|
||||
Standard_EXPORT virtual Standard_Integer CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const = 0;
|
||||
|
||||
//! General Read Function. See IGESReaderTool for more info
|
||||
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;
|
||||
|
||||
//! Reads own parameters from file for an Entity; <PR> gives
|
||||
//! access to them, <IR> detains parameter types and values
|
||||
//! For each class, there must be a specific action provided
|
||||
//! Note that Properties and Associativities Lists are Read by
|
||||
//! specific methods (see below), they are called under control
|
||||
//! of reading process (only one call) according Stage recorded
|
||||
//! in ParamReader
|
||||
Standard_EXPORT virtual void ReadOwnParams (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const = 0;
|
||||
|
||||
//! Writes own parameters to IGESWriter; defined for each class
|
||||
//! (to be redefined for other IGES ReadWriteModules)
|
||||
//! Warning : Properties and Associativities are directly managed by
|
||||
//! WriteIGES, must not be sent by this method
|
||||
Standard_EXPORT virtual void WriteOwnParams (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, IGESData_IGESWriter& IW) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_ReadWriteModule,Interface_ReaderModule)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_ReadWriteModule_HeaderFile
|
@@ -1,40 +0,0 @@
|
||||
-- Created on: 1992-10-21
|
||||
-- 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.
|
||||
|
||||
deferred class SingleParentEntity from IGESData inherits IGESEntity
|
||||
|
||||
---Purpose : a SingleParentEntity is a kind of IGESEntity which can refer
|
||||
-- to a (Single) Parent, from Associativities list of an Entity
|
||||
-- a effective SingleParent definition entity must inherit it
|
||||
|
||||
uses Integer
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
SingleParent (me) returns IGESEntity is deferred;
|
||||
---Purpose : Returns the parent designated by the Entity, if only one !
|
||||
|
||||
NbChildren (me) returns Integer is deferred;
|
||||
---Purpose : Returns the count of Entities designated as children
|
||||
|
||||
Child (me; num : Integer) returns IGESEntity
|
||||
---Purpose : Returns a Child given its rank
|
||||
raises OutOfRange is deferred;
|
||||
-- Error if <num> is below one or over <NbChildren>
|
||||
|
||||
end SingleParentEntity;
|
@@ -11,6 +11,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IGESData_SingleParentEntity.ixx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_SingleParentEntity.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
// SingleParentEntity sert a decrire des entites "associativite parent"
|
||||
// (methode Parent a definir)
|
||||
|
73
src/IGESData/IGESData_SingleParentEntity.hxx
Normal file
73
src/IGESData/IGESData_SingleParentEntity.hxx
Normal file
@@ -0,0 +1,73 @@
|
||||
// Created on: 1992-10-21
|
||||
// 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 _IGESData_SingleParentEntity_HeaderFile
|
||||
#define _IGESData_SingleParentEntity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class IGESData_IGESEntity;
|
||||
|
||||
|
||||
class IGESData_SingleParentEntity;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_SingleParentEntity, IGESData_IGESEntity)
|
||||
|
||||
//! a SingleParentEntity is a kind of IGESEntity which can refer
|
||||
//! to a (Single) Parent, from Associativities list of an Entity
|
||||
//! a effective SingleParent definition entity must inherit it
|
||||
class IGESData_SingleParentEntity : public IGESData_IGESEntity
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns the parent designated by the Entity, if only one !
|
||||
Standard_EXPORT virtual Handle(IGESData_IGESEntity) SingleParent() const = 0;
|
||||
|
||||
//! Returns the count of Entities designated as children
|
||||
Standard_EXPORT virtual Standard_Integer NbChildren() const = 0;
|
||||
|
||||
//! Returns a Child given its rank
|
||||
Standard_EXPORT virtual Handle(IGESData_IGESEntity) Child (const Standard_Integer num) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IGESData_SingleParentEntity,IGESData_IGESEntity)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_SingleParentEntity_HeaderFile
|
92
src/IGESData/IGESData_SpecificLib.hxx
Normal file
92
src/IGESData/IGESData_SpecificLib.hxx
Normal file
@@ -0,0 +1,92 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 _IGESData_SpecificLib_HeaderFile
|
||||
#define _IGESData_SpecificLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESData_NodeOfSpecificLib;
|
||||
class Standard_NoSuchObject;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_SpecificModule;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_GlobalNodeOfSpecificLib;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
|
||||
class IGESData_SpecificLib
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT static void SetGlobal (const Handle(IGESData_SpecificModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
|
||||
|
||||
Standard_EXPORT IGESData_SpecificLib(const Handle(IGESData_Protocol)& aprotocol);
|
||||
|
||||
Standard_EXPORT IGESData_SpecificLib();
|
||||
|
||||
Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
Standard_EXPORT void SetComplete();
|
||||
|
||||
Standard_EXPORT Standard_Boolean Select (const Handle(IGESData_IGESEntity)& obj, Handle(IGESData_SpecificModule)& module, Standard_Integer& CN) const;
|
||||
|
||||
Standard_EXPORT void Start();
|
||||
|
||||
Standard_EXPORT Standard_Boolean More() const;
|
||||
|
||||
Standard_EXPORT void Next();
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_SpecificModule)& Module() const;
|
||||
|
||||
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(IGESData_NodeOfSpecificLib) thelist;
|
||||
Handle(IGESData_NodeOfSpecificLib) thecurr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_SpecificLib_HeaderFile
|
45
src/IGESData/IGESData_SpecificLib_0.cxx
Normal file
45
src/IGESData/IGESData_SpecificLib_0.cxx
Normal file
@@ -0,0 +1,45 @@
|
||||
// Created on: 1992-04-06
|
||||
// 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 <IGESData_SpecificLib.hxx>
|
||||
|
||||
#include <IGESData_NodeOfSpecificLib.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
|
||||
#define TheObject Handle(IGESData_IGESEntity)
|
||||
#define TheObject_hxx <IGESData_IGESEntity.hxx>
|
||||
#define Handle_TheModule Handle(IGESData_SpecificModule)
|
||||
#define TheModule IGESData_SpecificModule
|
||||
#define TheModule_hxx <IGESData_SpecificModule.hxx>
|
||||
#define Handle_TheProtocol Handle(IGESData_Protocol)
|
||||
#define TheProtocol IGESData_Protocol
|
||||
#define TheProtocol_hxx <IGESData_Protocol.hxx>
|
||||
#define LibCtl_GlobalNode IGESData_GlobalNodeOfSpecificLib
|
||||
#define LibCtl_GlobalNode_hxx <IGESData_GlobalNodeOfSpecificLib.hxx>
|
||||
#define LibCtl_Node IGESData_NodeOfSpecificLib
|
||||
#define LibCtl_Node_hxx <IGESData_NodeOfSpecificLib.hxx>
|
||||
#define Handle_LibCtl_GlobalNode Handle(IGESData_GlobalNodeOfSpecificLib)
|
||||
#define Handle_LibCtl_Node Handle(IGESData_NodeOfSpecificLib)
|
||||
#define LibCtl_Library IGESData_SpecificLib
|
||||
#define LibCtl_Library_hxx <IGESData_SpecificLib.hxx>
|
||||
#include <LibCtl_Library.gxx>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user