|
||||
File indexing completed on 2025-01-18 10:05:29
0001 // Created on: 1993-04-07 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_MultipleBinder_HeaderFile 0018 #define _Transfer_MultipleBinder_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <TColStd_HSequenceOfTransient.hxx> 0024 #include <Transfer_Binder.hxx> 0025 #include <Standard_Integer.hxx> 0026 class Standard_Transient; 0027 0028 0029 class Transfer_MultipleBinder; 0030 DEFINE_STANDARD_HANDLE(Transfer_MultipleBinder, Transfer_Binder) 0031 0032 //! Allows direct binding between a starting Object and the Result 0033 //! of its transfer, when it can be made of several Transient 0034 //! Objects. Compared to a Transcriptor, it has no Transfer Action 0035 //! 0036 //! Result is a list of Transient Results. Unique Result is not 0037 //! available : SetResult is redefined to start the list on the 0038 //! first call, and refuse the other times. 0039 //! 0040 //! rr 0041 //! 0042 //! Remark : MultipleBinder itself is intended to be created and 0043 //! filled by TransferProcess itself (method Bind). In particular, 0044 //! conflicts between Unique (Standard) result and Multiple result 0045 //! are avoided through management made by TransferProcess. 0046 //! 0047 //! Also, a Transcriptor (with an effective Transfer Method) which 0048 //! can produce a Multiple Result, may be defined as a sub-class 0049 //! of MultipleBinder by redefining method Transfer. 0050 class Transfer_MultipleBinder : public Transfer_Binder 0051 { 0052 0053 public: 0054 0055 0056 //! normal standard constructor, creates an empty MultipleBinder 0057 Standard_EXPORT Transfer_MultipleBinder(); 0058 0059 //! Returns True if a starting object is bound with SEVERAL 0060 //! results : Here, returns always True 0061 Standard_EXPORT virtual Standard_Boolean IsMultiple() const Standard_OVERRIDE; 0062 0063 //! Returns the Type permitted for Results, i.e. here Transient 0064 Standard_EXPORT Handle(Standard_Type) ResultType() const Standard_OVERRIDE; 0065 0066 //! Returns the Name of the Type which characterizes the Result 0067 //! Here, returns "(list)" 0068 Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE; 0069 0070 //! Adds a new Item to the Multiple Result 0071 Standard_EXPORT void AddResult (const Handle(Standard_Transient)& res); 0072 0073 //! Returns the actual count of recorded (Transient) results 0074 Standard_EXPORT Standard_Integer NbResults() const; 0075 0076 //! Returns the value of the recorded result n0 <num> 0077 Standard_EXPORT Handle(Standard_Transient) ResultValue (const Standard_Integer num) const; 0078 0079 //! Returns the Multiple Result, if it is defined (at least one 0080 //! Item). Else, returns a Null Handle 0081 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MultipleResult() const; 0082 0083 //! Defines a Binding with a Multiple Result, given as a Sequence 0084 //! Error if a Unique Result has yet been defined 0085 Standard_EXPORT void SetMultipleResult (const Handle(TColStd_HSequenceOfTransient)& mulres); 0086 0087 0088 0089 0090 DEFINE_STANDARD_RTTIEXT(Transfer_MultipleBinder,Transfer_Binder) 0091 0092 protected: 0093 0094 0095 0096 0097 private: 0098 0099 0100 Handle(TColStd_HSequenceOfTransient) themulres; 0101 0102 0103 }; 0104 0105 0106 0107 0108 0109 0110 0111 #endif // _Transfer_MultipleBinder_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |