summaryrefslogtreecommitdiff
path: root/inc/StepData_StepReaderTool.hxx
blob: 0268db5cfc202ac8e433c801a921639383f75934 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _StepData_StepReaderTool_HeaderFile
#define _StepData_StepReaderTool_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Handle_StepData_FileRecognizer_HeaderFile
#include <Handle_StepData_FileRecognizer.hxx>
#endif
#ifndef _Interface_GeneralLib_HeaderFile
#include <Interface_GeneralLib.hxx>
#endif
#ifndef _Interface_ReaderLib_HeaderFile
#include <Interface_ReaderLib.hxx>
#endif
#ifndef _Interface_FileReaderTool_HeaderFile
#include <Interface_FileReaderTool.hxx>
#endif
#ifndef _Handle_StepData_StepReaderData_HeaderFile
#include <Handle_StepData_StepReaderData.hxx>
#endif
#ifndef _Handle_StepData_Protocol_HeaderFile
#include <Handle_StepData_Protocol.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_Interface_Check_HeaderFile
#include <Handle_Interface_Check.hxx>
#endif
#ifndef _Handle_Standard_Transient_HeaderFile
#include <Handle_Standard_Transient.hxx>
#endif
#ifndef _Handle_Interface_InterfaceModel_HeaderFile
#include <Handle_Interface_InterfaceModel.hxx>
#endif
class StepData_FileRecognizer;
class StepData_StepReaderData;
class StepData_Protocol;
class Interface_Check;
class Standard_Transient;
class Interface_InterfaceModel;


//! Specific FileReaderTool for Step; works with FileReaderData <br>
//!           provides references evaluation, plus access to litteral data <br>
//!           and specific methods defined by FileReaderTool <br>
//!           Remarks : works with a ReaderLib to load Entities <br>
class StepData_StepReaderTool  : public Interface_FileReaderTool {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! creates StepReaderTool to work with a StepReaderData according <br>
//!           to a Step Protocol. Defines the ReaderLib at this time <br>
  Standard_EXPORT   StepData_StepReaderTool(const Handle(StepData_StepReaderData)& reader,const Handle(StepData_Protocol)& protocol);
  //! Bounds empty entities to records, uses default Recognition <br>
//!           provided by ReaderLib and ReaderModule. Also calls computation <br>
//!           of references (SetEntityNumbers from StepReaderData) <br>
//!           Works only on data entities (skips header) <br>
//!           <optimize> given False allows to test some internal algorithms <br>
//!           which are normally avoided (see also StepReaderData) <br>
  Standard_EXPORT     void Prepare(const Standard_Boolean optimize = Standard_True) ;
  //! Bounds empty entities to records, works with a specific <br>
//!           FileRecognizer, stored and later used in Recognize <br>
//!           Works only on data entities (skips header) <br>
//!           <optimize : same as above <br>
  Standard_EXPORT     void Prepare(const Handle(StepData_FileRecognizer)& reco,const Standard_Boolean optimize = Standard_True) ;
  //! recognizes records, by asking either ReaderLib (default) or <br>
//!           FileRecognizer (if defined) to do so. <ach> is to call <br>
//!           RecognizeByLib <br>
  Standard_EXPORT     Standard_Boolean Recognize(const Standard_Integer num,Handle(Interface_Check)& ach,Handle(Standard_Transient)& ent) ;
  //! bounds empty entities and sub-lists to header records <br>
//!           works like Prepare + SetEntityNumbers, but for header <br>
//!           (N.B.: in Header, no Ident and no reference) <br>
//!           FileRecognizer is to specify Entities which are allowed to be <br>
//!           defined in the Header (not every type can be) <br>
  Standard_EXPORT     void PrepareHeader(const Handle(StepData_FileRecognizer)& reco) ;
  //! fills model's header; that is, gives to it Header entities <br>
//!           and commands their loading. Also fills StepModel's Global <br>
//!           Check from StepReaderData's GlobalCheck <br>
  Standard_EXPORT     void BeginRead(const Handle(Interface_InterfaceModel)& amodel) ;
  //! fills an entity, given record no; works by using a ReaderLib <br>
//!           to load each entity, which must be a Transient <br>
//!           Actually, returned value is True if no fail, False else <br>
  Standard_EXPORT     Standard_Boolean AnalyseRecord(const Standard_Integer num,const Handle(Standard_Transient)& anent,Handle(Interface_Check)& acheck) ;
  //! Ends file reading after reading all the entities <br>
//!           Here, it binds in the model, Idents to Entities (for checks) <br>
  Standard_EXPORT   virtual  void EndRead(const Handle(Interface_InterfaceModel)& amodel) ;





protected:





private:



Handle_StepData_FileRecognizer thereco;
Interface_GeneralLib theglib;
Interface_ReaderLib therlib;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif