42cf5bc1 |
1 | // Created on: 1994-06-03 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1994-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _IGESSelect_WorkLibrary_HeaderFile |
18 | #define _IGESSelect_WorkLibrary_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Boolean.hxx> |
24 | #include <IFSelect_WorkLibrary.hxx> |
25 | #include <Standard_Integer.hxx> |
26 | #include <Standard_CString.hxx> |
27 | class Interface_InterfaceModel; |
28 | class Interface_Protocol; |
29 | class IFSelect_ContextWrite; |
30 | class IGESData_Protocol; |
31 | class Standard_Transient; |
32 | class Message_Messenger; |
33 | |
34 | |
35 | class IGESSelect_WorkLibrary; |
36 | DEFINE_STANDARD_HANDLE(IGESSelect_WorkLibrary, IFSelect_WorkLibrary) |
37 | |
38 | //! Performs Read and Write an IGES File with an IGES Model |
39 | class IGESSelect_WorkLibrary : public IFSelect_WorkLibrary |
40 | { |
41 | |
42 | public: |
43 | |
44 | |
45 | //! Creates a IGES WorkLibrary |
46 | //! If <modefnes> is given as True, it will work for FNES |
47 | Standard_EXPORT IGESSelect_WorkLibrary(const Standard_Boolean modefnes = Standard_False); |
48 | |
49 | //! Reads a IGES File and returns a IGES Model (into <mod>), |
50 | //! or lets <mod> "Null" in case of Error |
51 | //! Returns 0 if OK, 1 if Read Error, -1 if File not opened |
79104795 |
52 | Standard_EXPORT Standard_Integer ReadFile (const Standard_CString name, Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol) const Standard_OVERRIDE; |
42cf5bc1 |
53 | |
54 | //! Writes a File from a IGES Model (brought by <ctx>) |
55 | //! Returns False (and writes no file) if <ctx> is not for IGES |
79104795 |
56 | Standard_EXPORT Standard_Boolean WriteFile (IFSelect_ContextWrite& ctx) const Standard_OVERRIDE; |
42cf5bc1 |
57 | |
58 | //! Defines a protocol to be adequate for IGES |
59 | //! (encompasses ALL the IGES norm including IGESSolid, IGESAppli) |
60 | Standard_EXPORT static Handle(IGESData_Protocol) DefineProtocol(); |
61 | |
62 | //! Dumps an IGES Entity with an IGES Dumper. <level> is the one |
63 | //! used by IGESDumper. |
79104795 |
64 | Standard_EXPORT void DumpEntity (const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol, const Handle(Standard_Transient)& entity, const Handle(Message_Messenger)& S, const Standard_Integer level) const Standard_OVERRIDE; |
42cf5bc1 |
65 | |
66 | |
67 | |
68 | |
92efcf78 |
69 | DEFINE_STANDARD_RTTIEXT(IGESSelect_WorkLibrary,IFSelect_WorkLibrary) |
42cf5bc1 |
70 | |
71 | protected: |
72 | |
73 | |
74 | |
75 | |
76 | private: |
77 | |
78 | |
79 | Standard_Boolean themodefnes; |
80 | |
81 | |
82 | }; |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | |
90 | #endif // _IGESSelect_WorkLibrary_HeaderFile |