|
||||
File indexing completed on 2025-01-18 10:05:29
0001 // Created on: 1993-06-10 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Transfer_SimpleBinderOfTransient_HeaderFile 0018 #define _Transfer_SimpleBinderOfTransient_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Transfer_Binder.hxx> 0024 0025 0026 class Transfer_SimpleBinderOfTransient; 0027 DEFINE_STANDARD_HANDLE(Transfer_SimpleBinderOfTransient, Transfer_Binder) 0028 0029 //! An adapted instantiation of SimpleBinder for Transient Result, 0030 //! i.e. ResultType can be computed from the Result itself, 0031 //! instead of being static 0032 class Transfer_SimpleBinderOfTransient : public Transfer_Binder 0033 { 0034 0035 public: 0036 0037 0038 //! Creates an empty SimpleBinderOfTransient 0039 //! Returns True if a starting object is bound with SEVERAL 0040 //! results : Here, returns always False 0041 //! See Binder itself 0042 Standard_EXPORT Transfer_SimpleBinderOfTransient(); 0043 0044 //! Returns the Effective (Dynamic) Type of the Result 0045 //! (Standard_Transient if no Result is defined) 0046 Standard_EXPORT Handle(Standard_Type) ResultType() const Standard_OVERRIDE; 0047 0048 //! Returns the Effective Name of (Dynamic) Type of the Result 0049 //! (void) if no result is defined 0050 Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE; 0051 0052 //! Defines the Result 0053 Standard_EXPORT void SetResult (const Handle(Standard_Transient)& res); 0054 0055 //! Returns the defined Result, if there is one 0056 Standard_EXPORT const Handle(Standard_Transient)& Result() const; 0057 0058 //! Returns a transient result according to its type (IsKind) 0059 //! i.e. the result itself if IsKind(atype), else searches in 0060 //! NextResult, until first found, then returns True 0061 //! If not found, returns False (res is NOT touched) 0062 //! 0063 //! This syntactic form avoids to do DownCast : if a result is 0064 //! found with the good type, it is loaded in <res> and can be 0065 //! immediately used, well initialised 0066 Standard_EXPORT static Standard_Boolean GetTypedResult (const Handle(Transfer_Binder)& bnd, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& res); 0067 0068 0069 0070 0071 DEFINE_STANDARD_RTTIEXT(Transfer_SimpleBinderOfTransient,Transfer_Binder) 0072 0073 protected: 0074 0075 0076 0077 0078 private: 0079 0080 0081 Handle(Standard_Transient) theres; 0082 0083 0084 }; 0085 0086 0087 0088 0089 0090 0091 0092 #endif // _Transfer_SimpleBinderOfTransient_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |