|
|
|||
File indexing completed on 2026-10-05 09:24:05
0001 // Created on: 1993-01-25 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 _StepData_ReadWriteModule_HeaderFile 0018 #define _StepData_ReadWriteModule_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <Interface_ReaderModule.hxx> 0023 #include <TCollection_AsciiString.hxx> 0024 #include <NCollection_Sequence.hxx> 0025 0026 #include <string_view> 0027 0028 class Interface_FileReaderData; 0029 class TCollection_AsciiString; 0030 class Interface_Check; 0031 class Standard_Transient; 0032 class StepData_StepReaderData; 0033 class StepData_StepWriter; 0034 0035 //! Defines basic File Access Module (Recognize, Read, Write) 0036 //! That is : ReaderModule (Recognize & Read) + Write for 0037 //! StepWriter (for a more centralized description) 0038 //! Warning : A sub-class of ReadWriteModule, which belongs to a particular 0039 //! Protocol, must use the same definition for Case Numbers (give 0040 //! the same Value for a StepType defined as a String from a File 0041 //! as the Protocol does for the corresponding Entity) 0042 class StepData_ReadWriteModule : public Interface_ReaderModule 0043 { 0044 0045 public: 0046 //! Translate the Type of record <num> in <data> to a positive 0047 //! Case Number, or 0 if failed. 0048 //! Works with a StepReaderData, in which the Type of an Entity 0049 //! is defined as a String : Reads the RecordType <num> then calls 0050 //! CaseNum (this type) 0051 //! Warning : The methods CaseStep, StepType and Recognize, 0052 //! must be in phase (triplets CaseNum-StepType-Type of Object) 0053 Standard_EXPORT int CaseNum(const occ::handle<Interface_FileReaderData>& data, 0054 const int num) const override; 0055 0056 //! Defines Case Numbers corresponding to the recognized Types 0057 //! Called by CaseNum (data,num) above for a Simple Type Entity 0058 //! Warning : CaseStep must give the same Value as Protocol does for the 0059 //! Entity type which corresponds to this Type given as a String 0060 Standard_EXPORT virtual int CaseStep(const TCollection_AsciiString& atype) const = 0; 0061 0062 //! Same a above but for a Complex Type Entity ("Plex") 0063 //! The provided Default recognizes nothing 0064 Standard_EXPORT virtual int CaseStep( 0065 const NCollection_Sequence<TCollection_AsciiString>& types) const; 0066 0067 //! Returns True if the Case Number corresponds to a Complex Type 0068 //! ("Plex"). Remember that all possible combinations must be 0069 //! acknowledged to be processed 0070 //! Default is False for all cases. For a Protocol which defines 0071 //! possible Plexes, this method must be redefined. 0072 Standard_EXPORT virtual bool IsComplex(const int CN) const; 0073 0074 //! Function specific to STEP, which delivers the StepType as it 0075 //! is recorded in and read from a File compliant with STEP. 0076 //! This method is symmetric to the method CaseStep. 0077 //! StepType can be different from Dynamic Type's name, but 0078 //! belongs to the same class of Object. 0079 //! Returns an empty String if <CN> is zero. 0080 //! Warning : For a Complex Type Entity, returns an Empty String 0081 //! (Complex Type must be managed by users) 0082 Standard_EXPORT virtual const std::string_view& StepType(const int CN) const = 0; 0083 0084 //! Function specific to STEP. Some STEP Types have a short form 0085 //! This method can be redefined to fill it 0086 //! By default, returns an empty string, which is then interpreted 0087 //! to take normal form from StepType 0088 Standard_EXPORT virtual TCollection_AsciiString ShortType(const int CN) const; 0089 0090 //! Function specific to STEP, which delivers the list of types 0091 //! which corresponds to a complex type. If <CN> is not for a 0092 //! complex type, this method returns False. Else it returns True 0093 //! and fills the list in alphabetic order. 0094 //! The default returns False. To be redefined as required. 0095 Standard_EXPORT virtual bool ComplexType( 0096 const int CN, 0097 NCollection_Sequence<TCollection_AsciiString>& types) const; 0098 0099 //! General Read Function, calls ReadStep 0100 Standard_EXPORT void Read(const int CN, 0101 const occ::handle<Interface_FileReaderData>& data, 0102 const int num, 0103 occ::handle<Interface_Check>& ach, 0104 const occ::handle<Standard_Transient>& ent) const override; 0105 0106 //! Specific Read Function. Works with StepReaderData 0107 Standard_EXPORT virtual void ReadStep(const int CN, 0108 const occ::handle<StepData_StepReaderData>& data, 0109 const int num, 0110 occ::handle<Interface_Check>& ach, 0111 const occ::handle<Standard_Transient>& ent) const = 0; 0112 0113 //! Write Function, switched by CaseNum 0114 Standard_EXPORT virtual void WriteStep(const int CN, 0115 StepData_StepWriter& SW, 0116 const occ::handle<Standard_Transient>& ent) const = 0; 0117 0118 DEFINE_STANDARD_RTTIEXT(StepData_ReadWriteModule, Interface_ReaderModule) 0119 }; 0120 0121 #endif // _StepData_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 |
|