0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when...
[occt.git] / src / STEPConstruct / STEPConstruct.hxx
1 // Created on: 1999-11-17
2 // Created by: Andrey BETENEV
3 // Copyright (c) 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 _STEPConstruct_HeaderFile
18 #define _STEPConstruct_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 class StepRepr_RepresentationItem;
26 class Transfer_FinderProcess;
27 class TopoDS_Shape;
28 class TopLoc_Location;
29 class Transfer_TransientProcess;
30 class Transfer_Binder;
31 class StepShape_ShapeDefinitionRepresentation;
32 class StepShape_ContextDependentShapeRepresentation;
33 class STEPConstruct_Tool;
34 class STEPConstruct_UnitContext;
35 class STEPConstruct_Part;
36 class STEPConstruct_Assembly;
37 class STEPConstruct_Styles;
38 class STEPConstruct_ValidationProps;
39 class STEPConstruct_ExternRefs;
40 class STEPConstruct_AP203Context;
41 class STEPConstruct_ContextTool;
42 class STEPConstruct_PointHasher;
43
44
45 //! Defines tools for creation and investigation STEP constructs
46 //! used for representing various kinds of data, such as product and
47 //! assembly structure, unit contexts, associated information
48 //! The creation of these structures is made according to currently
49 //! active schema (AP203 or AP214 CD2 or DIS)
50 //! This is taken from parameter write.step.schema
51 class STEPConstruct 
52 {
53 public:
54
55   DEFINE_STANDARD_ALLOC
56
57   
58   //! Returns STEP entity of the (sub)type of RepresentationItem
59   //! which is a result of the tranalation of the Shape, or Null if
60   //! no result is recorded
61   Standard_EXPORT static Handle(StepRepr_RepresentationItem) FindEntity (const Handle(Transfer_FinderProcess)& FinderProcess, const TopoDS_Shape& Shape);
62   
63   //! The same as above, but in the case if item not found, repeats
64   //! search on the same shape without location. The Loc corresponds to the
65   //! location with which result is found (either location of the Shape,
66   //! or Null)
67   Standard_EXPORT static Handle(StepRepr_RepresentationItem) FindEntity (const Handle(Transfer_FinderProcess)& FinderProcess, const TopoDS_Shape& Shape, TopLoc_Location& Loc);
68   
69   //! Returns Shape resulting from given STEP entity (Null if not mapped)
70   Standard_EXPORT static TopoDS_Shape FindShape (const Handle(Transfer_TransientProcess)& TransientProcess, const Handle(StepRepr_RepresentationItem)& item);
71   
72   //! Find CDSR correcponding to the component in the specified assembly
73   Standard_EXPORT static Standard_Boolean FindCDSR (const Handle(Transfer_Binder)& ComponentBinder, const Handle(StepShape_ShapeDefinitionRepresentation)& AssemblySDR, Handle(StepShape_ContextDependentShapeRepresentation)& ComponentCDSR);
74
75
76
77
78 protected:
79
80
81
82
83
84 private:
85
86
87
88
89 friend class STEPConstruct_Tool;
90 friend class STEPConstruct_UnitContext;
91 friend class STEPConstruct_Part;
92 friend class STEPConstruct_Assembly;
93 friend class STEPConstruct_Styles;
94 friend class STEPConstruct_ValidationProps;
95 friend class STEPConstruct_ExternRefs;
96 friend class STEPConstruct_AP203Context;
97 friend class STEPConstruct_ContextTool;
98 friend class STEPConstruct_PointHasher;
99
100 };
101
102
103
104
105
106
107
108 #endif // _STEPConstruct_HeaderFile