0032696: Coding - get rid of unused forward declarations [StepSelect to Xw]
[occt.git] / src / TransferBRep / TransferBRep_BinderOfShape.hxx
1 // Created on: 1992-02-17
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 _TransferBRep_BinderOfShape_HeaderFile
18 #define _TransferBRep_BinderOfShape_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TopoDS_Shape.hxx>
24 #include <Transfer_Binder.hxx>
25 #include <Standard_Type.hxx>
26 #include <Standard_CString.hxx>
27
28
29 class TransferBRep_BinderOfShape;
30 DEFINE_STANDARD_HANDLE(TransferBRep_BinderOfShape, Transfer_Binder)
31
32 //! Allows direct binding between a starting Object and the Result
33 //! of its transfer when it is Unique.
34 //! The Result itself is defined as a formal parameter <Shape from TopoDS>
35 //! Warning : While it is possible to instantiate BinderOfShape with any Type
36 //! for the Result, it is not advisable to instantiate it with
37 //! Transient Classes, because such Results are directly known and
38 //! managed by TransferProcess & Co, through
39 //! SimpleBinderOfTransient : this class looks like instantiation
40 //! of BinderOfShape, but its method ResultType
41 //! is adapted (reads DynamicType of the Result)
42 class TransferBRep_BinderOfShape : public Transfer_Binder
43 {
44
45 public:
46
47   
48   //! normal standard constructor, creates an empty BinderOfShape
49   Standard_EXPORT TransferBRep_BinderOfShape();
50   
51   //! constructor which in the same time defines the result
52   //! Returns True if a starting object is bound with SEVERAL
53   //! results : Here, returns always False
54   //! But it can have next results
55   Standard_EXPORT TransferBRep_BinderOfShape(const TopoDS_Shape& res);
56   
57   //! Returns the Type permitted for the Result, i.e. the Type
58   //! of the Parameter Class <Shape from TopoDS> (statically defined)
59   Standard_EXPORT Handle(Standard_Type) ResultType() const Standard_OVERRIDE;
60   
61   //! Returns the Type Name computed for the Result (dynamic)
62   Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE;
63   
64   //! Defines the Result
65   Standard_EXPORT void SetResult (const TopoDS_Shape& res);
66   
67   //! Returns the defined Result, if there is one
68   Standard_EXPORT const TopoDS_Shape& Result() const;
69   
70   //! Returns the defined Result, if there is one, and allows to
71   //! change it (avoids Result + SetResult).
72   //! Admits that Result can be not yet defined
73   //! Warning : a call to CResult causes Result to be known as defined
74   Standard_EXPORT TopoDS_Shape& CResult();
75
76
77
78
79   DEFINE_STANDARD_RTTIEXT(TransferBRep_BinderOfShape,Transfer_Binder)
80
81 protected:
82
83
84
85
86 private:
87
88
89   TopoDS_Shape theres;
90
91
92 };
93
94
95
96
97
98
99
100 #endif // _TransferBRep_BinderOfShape_HeaderFile