0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / IGESData / IGESData_IGESReaderData.hxx
1 // Created on: 1992-04-06
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-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 _IGESData_IGESReaderData_HeaderFile
18 #define _IGESData_IGESReaderData_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <IGESData_IGESType.hxx>
24 #include <TColStd_HSequenceOfHAsciiString.hxx>
25 #include <IGESData_GlobalSection.hxx>
26 #include <IGESData_Array1OfDirPart.hxx>
27 #include <IGESData_ReadStage.hxx>
28 #include <Standard_Real.hxx>
29 #include <Interface_FileReaderData.hxx>
30 #include <Standard_Integer.hxx>
31 #include <Standard_CString.hxx>
32 #include <Interface_ParamType.hxx>
33 class Interface_ParamSet;
34 class Interface_Check;
35 class IGESData_GlobalSection;
36 class IGESData_DirPart;
37 class IGESData_IGESType;
38
39
40 class IGESData_IGESReaderData;
41 DEFINE_STANDARD_HANDLE(IGESData_IGESReaderData, Interface_FileReaderData)
42
43 //! specific FileReaderData for IGES
44 //! contains header as GlobalSection, and for each Entity, its
45 //! directory part as DirPart, list of Parameters as ParamSet
46 //! Each Item has a DirPart, plus classically a ParamSet and the
47 //! correspondant recognized Entity (inherited from FileReaderData)
48 //! Parameters are accessed through specific objects, ParamReaders
49 class IGESData_IGESReaderData : public Interface_FileReaderData
50 {
51
52 public:
53
54   
55   //! creates IGESReaderData correctly dimensionned (for arrays)
56   //! <nbe> count of entities, that is, half nb of directory lines
57   //! <nbp> : count of parameters
58   Standard_EXPORT IGESData_IGESReaderData(const Standard_Integer nbe, const Standard_Integer nbp);
59   
60   //! adds a start line to start section
61   Standard_EXPORT void AddStartLine (const Standard_CString aval);
62   
63   //! Returns the Start Section in once
64   Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) StartSection() const;
65   
66   //! adds a parameter to global section's parameter list
67   Standard_EXPORT void AddGlobal (const Interface_ParamType atype, const Standard_CString aval);
68   
69   //! reads header (as GlobalSection) content from the ParamSet
70   //! after it has been filled by successive calls to AddGlobal
71   Standard_EXPORT void SetGlobalSection();
72   
73   //! returns header as GlobalSection
74   Standard_EXPORT const IGESData_GlobalSection& GlobalSection() const;
75   
76   //! fills a DirPart, designated by its rank (that is, (N+1)/2 if N
77   //! is its first number in section D)
78   Standard_EXPORT void SetDirPart (const Standard_Integer num, const Standard_Integer i1, const Standard_Integer i2, const Standard_Integer i3, const Standard_Integer i4, const Standard_Integer i5, const Standard_Integer i6, const Standard_Integer i7, const Standard_Integer i8, const Standard_Integer i9, const Standard_Integer i10, const Standard_Integer i11, const Standard_Integer i12, const Standard_Integer i13, const Standard_Integer i14, const Standard_Integer i15, const Standard_Integer i16, const Standard_Integer i17, const Standard_CString res1, const Standard_CString res2, const Standard_CString label, const Standard_CString subs);
79   
80   //! returns DirPart identified by record no (half Dsect number)
81   Standard_EXPORT const IGESData_DirPart& DirPart (const Standard_Integer num) const;
82   
83   //! returns values recorded in directory part n0 <num>
84   Standard_EXPORT void DirValues (const Standard_Integer num, Standard_Integer& i1, Standard_Integer& i2, Standard_Integer& i3, Standard_Integer& i4, Standard_Integer& i5, Standard_Integer& i6, Standard_Integer& i7, Standard_Integer& i8, Standard_Integer& i9, Standard_Integer& i10, Standard_Integer& i11, Standard_Integer& i12, Standard_Integer& i13, Standard_Integer& i14, Standard_Integer& i15, Standard_Integer& i16, Standard_Integer& i17, Standard_CString& res1, Standard_CString& res2, Standard_CString& label, Standard_CString& subs) const;
85   
86   //! returns "type" and "form" info from a directory part
87   Standard_EXPORT IGESData_IGESType DirType (const Standard_Integer num) const;
88   
89   //! Returns count of recorded Entities (i.e. size of Directory)
90   Standard_EXPORT virtual Standard_Integer NbEntities() const Standard_OVERRIDE;
91   
92   //! determines next suitable record from num; that is num+1 except
93   //! for last one which gives 0
94   Standard_EXPORT Standard_Integer FindNextRecord (const Standard_Integer num) const Standard_OVERRIDE;
95   
96   //! determines reference numbers in EntityNumber fields (called by
97   //! SetEntities from IGESReaderTool)
98   //! works on "Integer" type Parameters, because IGES does not
99   //! distinguish Integer and Entity Refs : every Integer which is
100   //! odd and less than twice NbRecords can be an Entity Ref ...
101   //! (Ref Number is then (N+1)/2 if N is the Integer Value)
102   Standard_EXPORT void SetEntityNumbers();
103   
104   //! Returns the recorded Global Check
105   Standard_EXPORT Handle(Interface_Check) GlobalCheck() const;
106   
107   //! allows to set a default line weight, will be later applied at
108   //! load time, on Entities which have no specified line weight
109   Standard_EXPORT void SetDefaultLineWeight (const Standard_Real defw);
110   
111   //! Returns the recorded Default Line Weight, if there is
112   //! (else, returns 0)
113   Standard_EXPORT Standard_Real DefaultLineWeight() const;
114
115
116
117
118   DEFINE_STANDARD_RTTIEXT(IGESData_IGESReaderData,Interface_FileReaderData)
119
120 protected:
121
122
123
124
125 private:
126
127
128   IGESData_IGESType thectyp;
129   Handle(TColStd_HSequenceOfHAsciiString) thestar;
130   Handle(Interface_ParamSet) theparh;
131   IGESData_GlobalSection thehead;
132   IGESData_Array1OfDirPart thedirs;
133   IGESData_ReadStage thestep;
134   Standard_Real thedefw;
135   Handle(Interface_Check) thechk;
136
137
138 };
139
140
141
142
143
144
145
146 #endif // _IGESData_IGESReaderData_HeaderFile