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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TransferBRep_BinderOfShape_HeaderFile
18 #define _TransferBRep_BinderOfShape_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TopoDS_Shape.hxx>
24 #include <Transfer_Binder.hxx>
25 #include <Standard_Type.hxx>
26 #include <Standard_CString.hxx>
29 class TransferBRep_BinderOfShape;
30 DEFINE_STANDARD_HANDLE(TransferBRep_BinderOfShape, Transfer_Binder)
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
48 //! normal standard constructor, creates an empty BinderOfShape
49 Standard_EXPORT TransferBRep_BinderOfShape();
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);
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;
61 //! Returns the Type Name computed for the Result (dynamic)
62 Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE;
64 //! Defines the Result
65 Standard_EXPORT void SetResult (const TopoDS_Shape& res);
67 //! Returns the defined Result, if there is one
68 Standard_EXPORT const TopoDS_Shape& Result() const;
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();
79 DEFINE_STANDARD_RTTIEXT(TransferBRep_BinderOfShape,Transfer_Binder)
100 #endif // _TransferBRep_BinderOfShape_HeaderFile