Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:58

0001 // Created on: 1992-04-06
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 _IGESData_WriterLib_HeaderFile
0018 #define _IGESData_WriterLib_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 class IGESData_NodeOfWriterLib;
0026 class Standard_NoSuchObject;
0027 class IGESData_IGESEntity;
0028 class IGESData_ReadWriteModule;
0029 class IGESData_Protocol;
0030 class IGESData_GlobalNodeOfWriterLib;
0031 class Standard_Transient;
0032 
0033 
0034 
0035 class IGESData_WriterLib 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   //! Adds a couple (Module-Protocol) into the global definition set
0043   //! for this class of Library.
0044   Standard_EXPORT static void SetGlobal (const Handle(IGESData_ReadWriteModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
0045   
0046   //! Creates a Library which complies with a Protocol, that is :
0047   //! Same class (criterium IsInstance)
0048   //! This creation gets the Modules from the global set, those
0049   //! which are bound to the given Protocol and its Resources
0050   Standard_EXPORT IGESData_WriterLib(const Handle(IGESData_Protocol)& aprotocol);
0051   
0052   //! Creates an empty Library : it will later by filled by method
0053   //! AddProtocol
0054   Standard_EXPORT IGESData_WriterLib();
0055   
0056   //! Adds a couple (Module-Protocol) to the Library, given the
0057   //! class of a Protocol. Takes Resources into account.
0058   //! (if <aprotocol> is not of type TheProtocol, it is not added)
0059   Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
0060   
0061   //! Clears the list of Modules of a library (can be used to
0062   //! redefine the order of Modules before action : Clear then
0063   //! refill the Library by calls to AddProtocol)
0064   Standard_EXPORT void Clear();
0065   
0066   //! Sets a library to be defined with the complete Global list
0067   //! (all the couples Protocol/Modules recorded in it)
0068   Standard_EXPORT void SetComplete();
0069   
0070   //! Selects a Module from the Library, given an Object.
0071   //! Returns True if Select has succeeded, False else.
0072   //! Also Returns (as arguments) the selected Module and the Case
0073   //! Number determined by the associated Protocol.
0074   //! If Select has failed, <module> is Null Handle and CN is zero.
0075   //! (Select can work on any criterium, such as Object DynamicType)
0076   Standard_EXPORT Standard_Boolean Select (const Handle(IGESData_IGESEntity)& obj, Handle(IGESData_ReadWriteModule)& module, Standard_Integer& CN) const;
0077   
0078   //! Starts Iteration on the Modules (sets it on the first one)
0079   Standard_EXPORT void Start();
0080   
0081   //! Returns True if there are more Modules to iterate on
0082   Standard_EXPORT Standard_Boolean More() const;
0083   
0084   //! Iterates by getting the next Module in the list
0085   //! If there is none, the exception will be raised by Value
0086   Standard_EXPORT void Next();
0087   
0088   //! Returns the current Module in the Iteration
0089   Standard_EXPORT const Handle(IGESData_ReadWriteModule)& Module() const;
0090   
0091   //! Returns the current Protocol in the Iteration
0092   Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
0093 
0094 
0095 
0096 
0097 protected:
0098 
0099 
0100 
0101 
0102 
0103 private:
0104 
0105 
0106 
0107   Handle(IGESData_NodeOfWriterLib) thelist;
0108   Handle(IGESData_NodeOfWriterLib) thecurr;
0109 
0110 
0111 };
0112 
0113 
0114 
0115 
0116 
0117 
0118 
0119 #endif // _IGESData_WriterLib_HeaderFile