|
|
|||
File indexing completed on 2026-09-18 09:20:56
0001 // Created on: 1992-02-03 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 _Interface_ReaderLib_HeaderFile 0018 #define _Interface_ReaderLib_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Standard_Integer.hxx> 0025 class Interface_NodeOfReaderLib; 0026 class Standard_NoSuchObject; 0027 class Standard_Transient; 0028 class Interface_ReaderModule; 0029 class Interface_Protocol; 0030 class Interface_GlobalNodeOfReaderLib; 0031 0032 class Interface_ReaderLib 0033 { 0034 public: 0035 DEFINE_STANDARD_ALLOC 0036 0037 //! Adds a couple (Module-Protocol) into the global definition set 0038 //! for this class of Library. 0039 Standard_EXPORT static void SetGlobal(const occ::handle<Interface_ReaderModule>& amodule, 0040 const occ::handle<Interface_Protocol>& aprotocol); 0041 0042 //! Creates a Library which complies with a Protocol, that is : 0043 //! Same class (criterium IsInstance) 0044 //! This creation gets the Modules from the global set, those 0045 //! which are bound to the given Protocol and its Resources 0046 Standard_EXPORT Interface_ReaderLib(const occ::handle<Interface_Protocol>& aprotocol); 0047 0048 //! Creates an empty Library : it will later by filled by method 0049 //! AddProtocol 0050 Standard_EXPORT Interface_ReaderLib(); 0051 0052 //! Adds a couple (Module-Protocol) to the Library, given the 0053 //! class of a Protocol. Takes Resources into account. 0054 //! (if <aprotocol> is not of type TheProtocol, it is not added) 0055 Standard_EXPORT void AddProtocol(const occ::handle<Standard_Transient>& aprotocol); 0056 0057 //! Clears the list of Modules of a library (can be used to 0058 //! redefine the order of Modules before action : Clear then 0059 //! refill the Library by calls to AddProtocol) 0060 Standard_EXPORT void Clear(); 0061 0062 //! Sets a library to be defined with the complete Global list 0063 //! (all the couples Protocol/Modules recorded in it) 0064 Standard_EXPORT void SetComplete(); 0065 0066 //! Selects a Module from the Library, given an Object. 0067 //! Returns True if Select has succeeded, False else. 0068 //! Also Returns (as arguments) the selected Module and the Case 0069 //! Number determined by the associated Protocol. 0070 //! If Select has failed, <module> is Null Handle and CN is zero. 0071 //! (Select can work on any criterium, such as Object DynamicType) 0072 Standard_EXPORT bool Select(const occ::handle<Standard_Transient>& obj, 0073 occ::handle<Interface_ReaderModule>& module, 0074 int& CN) const; 0075 0076 //! Starts Iteration on the Modules (sets it on the first one) 0077 Standard_EXPORT void Start(); 0078 0079 //! Returns True if there are more Modules to iterate on 0080 Standard_EXPORT bool More() const; 0081 0082 //! Iterates by getting the next Module in the list 0083 //! If there is none, the exception will be raised by Value 0084 Standard_EXPORT void Next(); 0085 0086 //! Returns the current Module in the Iteration 0087 Standard_EXPORT const occ::handle<Interface_ReaderModule>& Module() const; 0088 0089 //! Returns the current Protocol in the Iteration 0090 Standard_EXPORT const occ::handle<Interface_Protocol>& Protocol() const; 0091 0092 private: 0093 occ::handle<Interface_NodeOfReaderLib> thelist; 0094 occ::handle<Interface_NodeOfReaderLib> thecurr; 0095 }; 0096 0097 #endif // _Interface_ReaderLib_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|