|
|
|||
File indexing completed on 2026-09-24 09:17:18
0001 // Created on: 1992-02-11 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-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_StepReaderTool_HeaderFile 0018 #define _StepData_StepReaderTool_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Interface_GeneralLib.hxx> 0025 #include <Interface_ReaderLib.hxx> 0026 #include <Interface_FileReaderTool.hxx> 0027 #include <Standard_Integer.hxx> 0028 class StepData_FileRecognizer; 0029 class StepData_StepReaderData; 0030 class StepData_Protocol; 0031 class Interface_Check; 0032 class Standard_Transient; 0033 class Interface_InterfaceModel; 0034 0035 //! Specific FileReaderTool for Step; works with FileReaderData 0036 //! provides references evaluation, plus access to literal data 0037 //! and specific methods defined by FileReaderTool 0038 //! Remarks : works with a ReaderLib to load Entities 0039 class StepData_StepReaderTool : public Interface_FileReaderTool 0040 { 0041 public: 0042 DEFINE_STANDARD_ALLOC 0043 0044 //! creates StepReaderTool to work with a StepReaderData according 0045 //! to a Step Protocol. Defines the ReaderLib at this time 0046 Standard_EXPORT StepData_StepReaderTool(const occ::handle<StepData_StepReaderData>& reader, 0047 const occ::handle<StepData_Protocol>& protocol); 0048 0049 //! Bounds empty entities to records, uses default Recognition 0050 //! provided by ReaderLib and ReaderModule. Also calls computation 0051 //! of references (SetEntityNumbers from StepReaderData) 0052 //! Works only on data entities (skips header) 0053 //! <optimize> given False allows to test some internal algorithms 0054 //! which are normally avoided (see also StepReaderData) 0055 Standard_EXPORT void Prepare(const bool optimize = true); 0056 0057 //! Bounds empty entities to records, works with a specific 0058 //! FileRecognizer, stored and later used in Recognize 0059 //! Works only on data entities (skips header) 0060 //! <optimize : same as above 0061 Standard_EXPORT void Prepare(const occ::handle<StepData_FileRecognizer>& reco, 0062 const bool optimize = true); 0063 0064 //! recognizes records, by asking either ReaderLib (default) or 0065 //! FileRecognizer (if defined) to do so. <ach> is to call 0066 //! RecognizeByLib 0067 Standard_EXPORT bool Recognize(const int num, 0068 occ::handle<Interface_Check>& ach, 0069 occ::handle<Standard_Transient>& ent) override; 0070 0071 //! bounds empty entities and sub-lists to header records 0072 //! works like Prepare + SetEntityNumbers, but for header 0073 //! (N.B.: in Header, no Ident and no reference) 0074 //! FileRecognizer is to specify Entities which are allowed to be 0075 //! defined in the Header (not every type can be) 0076 Standard_EXPORT void PrepareHeader(const occ::handle<StepData_FileRecognizer>& reco); 0077 0078 //! fills model's header; that is, gives to it Header entities 0079 //! and commands their loading. Also fills StepModel's Global 0080 //! Check from StepReaderData's GlobalCheck 0081 Standard_EXPORT void BeginRead(const occ::handle<Interface_InterfaceModel>& amodel) override; 0082 0083 //! fills an entity, given record no; works by using a ReaderLib 0084 //! to load each entity, which must be a Transient 0085 //! Actually, returned value is True if no fail, False else 0086 Standard_EXPORT bool AnalyseRecord(const int num, 0087 const occ::handle<Standard_Transient>& anent, 0088 occ::handle<Interface_Check>& acheck) override; 0089 0090 //! Ends file reading after reading all the entities 0091 //! Here, it binds in the model, Idents to Entities (for checks) 0092 Standard_EXPORT void EndRead(const occ::handle<Interface_InterfaceModel>& amodel) override; 0093 0094 private: 0095 occ::handle<StepData_FileRecognizer> thereco; 0096 Interface_GeneralLib theglib; 0097 Interface_ReaderLib therlib; 0098 }; 0099 0100 #endif // _StepData_StepReaderTool_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|