|
|
|||
File indexing completed on 2026-09-10 09:17:18
0001 // Created on: 1993-02-04 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 _Interface_ReaderModule_HeaderFile 0018 #define _Interface_ReaderModule_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 #include <Standard_Integer.hxx> 0025 class Interface_FileReaderData; 0026 class Interface_Check; 0027 0028 class Interface_ReaderModule; 0029 DEFINE_STANDARD_HANDLE(Interface_ReaderModule, Standard_Transient) 0030 0031 //! Defines unitary operations required to read an Entity from a 0032 //! File (see FileReaderData, FileReaderTool), under control of 0033 //! a FileReaderTool. The initial creation is performed by a 0034 //! GeneralModule (set in GeneralLib). Then, which remains is 0035 //! Loading data from the FileReaderData to the Entity 0036 //! 0037 //! To work, a GeneralModule has formerly recognized the Type read 0038 //! from FileReaderData as a positive Case Number, then the 0039 //! ReaderModule reads it according to this Case Number 0040 class Interface_ReaderModule : public Standard_Transient 0041 { 0042 0043 public: 0044 //! Translates the type of record <num> in <data> to a positive 0045 //! Case Number. If Recognition fails, must return 0 0046 Standard_EXPORT virtual Standard_Integer CaseNum(const Handle(Interface_FileReaderData)& data, 0047 const Standard_Integer num) const = 0; 0048 0049 //! Performs the effective loading from <data>, record <num>, 0050 //! to the Entity <ent> formerly created 0051 //! In case of Error or Warning, fills <ach> with messages 0052 //! Remark that the Case Number comes from translating a record 0053 Standard_EXPORT virtual void Read(const Standard_Integer casenum, 0054 const Handle(Interface_FileReaderData)& data, 0055 const Standard_Integer num, 0056 Handle(Interface_Check)& ach, 0057 const Handle(Standard_Transient)& ent) const = 0; 0058 0059 //! Specific operator (create+read) defaulted to do nothing. 0060 //! It can be redefined when it is not possible to work in two 0061 //! steps (NewVoid then Read). This occurs when no default 0062 //! constructor is defined : hence the result <ent> must be 0063 //! created with an effective definition from the reader. 0064 //! Remark : if NewRead is defined, Copy has nothing to do. 0065 //! 0066 //! Returns True if it has produced something, false else. 0067 //! If nothing was produced, <ach> should be filled : it will be 0068 //! treated as "Unrecognized case" by reader tool. 0069 Standard_EXPORT virtual Standard_Boolean NewRead(const Standard_Integer casenum, 0070 const Handle(Interface_FileReaderData)& data, 0071 const Standard_Integer num, 0072 Handle(Interface_Check)& ach, 0073 Handle(Standard_Transient)& ent) const; 0074 0075 DEFINE_STANDARD_RTTIEXT(Interface_ReaderModule, Standard_Transient) 0076 0077 protected: 0078 private: 0079 }; 0080 0081 #endif // _Interface_ReaderModule_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|