|
|
|||
File indexing completed on 2026-07-25 09:23:25
0001 // Created on: 1993-09-06 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _IGESData_ReadWriteModule_HeaderFile 0018 #define _IGESData_ReadWriteModule_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Interface_ReaderModule.hxx> 0024 #include <Standard_Integer.hxx> 0025 class Interface_FileReaderData; 0026 class Interface_Check; 0027 class Standard_Transient; 0028 class IGESData_IGESEntity; 0029 class IGESData_IGESReaderData; 0030 class IGESData_ParamReader; 0031 class IGESData_IGESWriter; 0032 0033 class IGESData_ReadWriteModule; 0034 DEFINE_STANDARD_HANDLE(IGESData_ReadWriteModule, Interface_ReaderModule) 0035 0036 //! Defines basic File Access Module, under the control of 0037 //! IGESReaderTool for Reading and IGESWriter for Writing : 0038 //! Specific actions concern : Read and Write Own Parameters of 0039 //! an IGESEntity. 0040 //! The common parts (Directory Entry, Lists of Associativities 0041 //! and Properties) are processed by IGESReaderTool & IGESWriter 0042 //! 0043 //! Each sub-class of ReadWriteModule is used in conjunction with 0044 //! a sub-class of Protocol from IGESData and processes several 0045 //! types of IGESEntity (typically, them of a package) : 0046 //! The Protocol gives a unique positive integer Case Number for 0047 //! each type of IGESEntity it recognizes, the corresponding 0048 //! ReadWriteModule processes an Entity by using the Case Number 0049 //! to known what is to do 0050 //! On Reading, the general service NewVoid is used to create an 0051 //! IGES Entity the first time 0052 //! 0053 //! Warning : Works with an IGESReaderData which stores "DE parts" of Items 0054 class IGESData_ReadWriteModule : public Interface_ReaderModule 0055 { 0056 0057 public: 0058 //! Translates the Type of record <num> in <data> to a positive 0059 //! Case Number, or 0 if failed. 0060 //! Works with IGESReaderData which provides Type & Form Numbers, 0061 //! and calls CaseIGES (see below) 0062 Standard_EXPORT Standard_Integer CaseNum(const Handle(Interface_FileReaderData)& data, 0063 const Standard_Integer num) const Standard_OVERRIDE; 0064 0065 //! Defines Case Numbers corresponding to the Entity Types taken 0066 //! into account by a sub-class of ReadWriteModule (hence, each 0067 //! sub-class of ReadWriteModule has to redefine this method) 0068 //! Called by CaseNum. Its result will then be used to call 0069 //! Read, etc ... 0070 Standard_EXPORT virtual Standard_Integer CaseIGES(const Standard_Integer typenum, 0071 const Standard_Integer formnum) const = 0; 0072 0073 //! General Read Function. See IGESReaderTool for more info 0074 Standard_EXPORT void Read(const Standard_Integer CN, 0075 const Handle(Interface_FileReaderData)& data, 0076 const Standard_Integer num, 0077 Handle(Interface_Check)& ach, 0078 const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; 0079 0080 //! Reads own parameters from file for an Entity; <PR> gives 0081 //! access to them, <IR> detains parameter types and values 0082 //! For each class, there must be a specific action provided 0083 //! Note that Properties and Associativities Lists are Read by 0084 //! specific methods (see below), they are called under control 0085 //! of reading process (only one call) according Stage recorded 0086 //! in ParamReader 0087 Standard_EXPORT virtual void ReadOwnParams(const Standard_Integer CN, 0088 const Handle(IGESData_IGESEntity)& ent, 0089 const Handle(IGESData_IGESReaderData)& IR, 0090 IGESData_ParamReader& PR) const = 0; 0091 0092 //! Writes own parameters to IGESWriter; defined for each class 0093 //! (to be redefined for other IGES ReadWriteModules) 0094 //! Warning : Properties and Associativities are directly managed by 0095 //! WriteIGES, must not be sent by this method 0096 Standard_EXPORT virtual void WriteOwnParams(const Standard_Integer CN, 0097 const Handle(IGESData_IGESEntity)& ent, 0098 IGESData_IGESWriter& IW) const = 0; 0099 0100 DEFINE_STANDARD_RTTIEXT(IGESData_ReadWriteModule, Interface_ReaderModule) 0101 0102 protected: 0103 private: 0104 }; 0105 0106 #endif // _IGESData_ReadWriteModule_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|