|
|
|||
File indexing completed on 2026-09-23 09:17:53
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 //! Defines basic File Access Module, under the control of 0034 //! IGESReaderTool for Reading and IGESWriter for Writing : 0035 //! Specific actions concern : Read and Write Own Parameters of 0036 //! an IGESEntity. 0037 //! The common parts (Directory Entry, Lists of Associativities 0038 //! and Properties) are processed by IGESReaderTool & IGESWriter 0039 //! 0040 //! Each sub-class of ReadWriteModule is used in conjunction with 0041 //! a sub-class of Protocol from IGESData and processes several 0042 //! types of IGESEntity (typically, them of a package) : 0043 //! The Protocol gives a unique positive integer Case Number for 0044 //! each type of IGESEntity it recognizes, the corresponding 0045 //! ReadWriteModule processes an Entity by using the Case Number 0046 //! to known what is to do 0047 //! On Reading, the general service NewVoid is used to create an 0048 //! IGES Entity the first time 0049 //! 0050 //! Warning : Works with an IGESReaderData which stores "DE parts" of Items 0051 class IGESData_ReadWriteModule : public Interface_ReaderModule 0052 { 0053 0054 public: 0055 //! Translates the Type of record <num> in <data> to a positive 0056 //! Case Number, or 0 if failed. 0057 //! Works with IGESReaderData which provides Type & Form Numbers, 0058 //! and calls CaseIGES (see below) 0059 Standard_EXPORT int CaseNum(const occ::handle<Interface_FileReaderData>& data, 0060 const int num) const override; 0061 0062 //! Defines Case Numbers corresponding to the Entity Types taken 0063 //! into account by a sub-class of ReadWriteModule (hence, each 0064 //! sub-class of ReadWriteModule has to redefine this method) 0065 //! Called by CaseNum. Its result will then be used to call 0066 //! Read, etc ... 0067 Standard_EXPORT virtual int CaseIGES(const int typenum, const int formnum) const = 0; 0068 0069 //! General Read Function. See IGESReaderTool for more info 0070 Standard_EXPORT void Read(const int CN, 0071 const occ::handle<Interface_FileReaderData>& data, 0072 const int num, 0073 occ::handle<Interface_Check>& ach, 0074 const occ::handle<Standard_Transient>& ent) const override; 0075 0076 //! Reads own parameters from file for an Entity; <PR> gives 0077 //! access to them, <IR> detains parameter types and values 0078 //! For each class, there must be a specific action provided 0079 //! Note that Properties and Associativities Lists are Read by 0080 //! specific methods (see below), they are called under control 0081 //! of reading process (only one call) according Stage recorded 0082 //! in ParamReader 0083 Standard_EXPORT virtual void ReadOwnParams(const int CN, 0084 const occ::handle<IGESData_IGESEntity>& ent, 0085 const occ::handle<IGESData_IGESReaderData>& IR, 0086 IGESData_ParamReader& PR) const = 0; 0087 0088 //! Writes own parameters to IGESWriter; defined for each class 0089 //! (to be redefined for other IGES ReadWriteModules) 0090 //! Warning : Properties and Associativities are directly managed by 0091 //! WriteIGES, must not be sent by this method 0092 Standard_EXPORT virtual void WriteOwnParams(const int CN, 0093 const occ::handle<IGESData_IGESEntity>& ent, 0094 IGESData_IGESWriter& IW) const = 0; 0095 0096 DEFINE_STANDARD_RTTIEXT(IGESData_ReadWriteModule, Interface_ReaderModule) 0097 }; 0098 0099 #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 |
|