|
||||
File indexing completed on 2025-01-18 10:05:29
0001 // Created on: 1992-10-28 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-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_TransferIterator_HeaderFile 0018 #define _Transfer_TransferIterator_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Transfer_HSequenceOfBinder.hxx> 0025 #include <TColStd_HSequenceOfInteger.hxx> 0026 #include <Standard_Integer.hxx> 0027 #include <Standard_Type.hxx> 0028 #include <Transfer_StatusExec.hxx> 0029 class Transfer_Binder; 0030 class Standard_Transient; 0031 class Interface_Check; 0032 0033 // resolve name collisions with X11 headers 0034 #ifdef Status 0035 #undef Status 0036 #endif 0037 0038 //! Defines an Iterator on the result of a Transfer 0039 //! Available for Normal Results or not (Erroneous Transfer) 0040 //! It gives several kinds of Information, and allows to consider 0041 //! various criteria (criteria are cumulative) 0042 class Transfer_TransferIterator 0043 { 0044 public: 0045 0046 DEFINE_STANDARD_ALLOC 0047 0048 0049 //! Creates an empty Iterator 0050 Standard_EXPORT Transfer_TransferIterator(); 0051 0052 //! Adds a Binder to the iteration list (construction) 0053 Standard_EXPORT void AddItem (const Handle(Transfer_Binder)& atr); 0054 0055 //! Selects Items on the Type of Binder : keep only 0056 //! Binders which are of a given Type (if keep is True) or 0057 //! reject only them (if keep is False) 0058 Standard_EXPORT void SelectBinder (const Handle(Standard_Type)& atype, const Standard_Boolean keep); 0059 0060 //! Selects Items on the Type of Result. Considers only Unique 0061 //! Results. Considers Dynamic Type for Transient Result, 0062 //! Static Type (the one given to define the Binder) else. 0063 //! 0064 //! Results which are of a given Type (if keep is True) or reject 0065 //! only them (if keep is False) 0066 Standard_EXPORT void SelectResult (const Handle(Standard_Type)& atype, const Standard_Boolean keep); 0067 0068 //! Select Items according Unicity : keep only Unique Results (if 0069 //! keep is True) or keep only Multiple Results (if keep is False) 0070 Standard_EXPORT void SelectUnique (const Standard_Boolean keep); 0071 0072 //! Selects/Unselect (according to <keep> an item designated by 0073 //! its rank <num> in the list 0074 //! Used by sub-classes which have specific criteria 0075 Standard_EXPORT void SelectItem (const Standard_Integer num, const Standard_Boolean keep); 0076 0077 //! Returns count of Binders to be iterated 0078 Standard_EXPORT Standard_Integer Number() const; 0079 0080 //! Clears Iteration in progress, to allow it to be restarted 0081 Standard_EXPORT void Start(); 0082 0083 //! Returns True if there are other Items to iterate 0084 Standard_EXPORT Standard_Boolean More(); 0085 0086 //! Sets Iteration to the next Item 0087 Standard_EXPORT void Next(); 0088 0089 //! Returns the current Binder 0090 Standard_EXPORT const Handle(Transfer_Binder)& Value() const; 0091 0092 //! Returns True if current Item brings a Result, Transient 0093 //! (Handle) or not or Multiple. That is to say, if it corresponds 0094 //! to a normally achieved Transfer, Transient Result is read by 0095 //! specific TransientResult below. 0096 //! Other kind of Result must be read specifically from its Binder 0097 Standard_EXPORT Standard_Boolean HasResult() const; 0098 0099 //! Returns True if Current Item has a Unique Result 0100 Standard_EXPORT Standard_Boolean HasUniqueResult() const; 0101 0102 //! Returns the Type of the Result of the current Item, if Unique. 0103 //! If No Unique Result (Error Transfer or Multiple Result), 0104 //! returns a Null Handle 0105 //! The Type is : the Dynamic Type for a Transient Result, 0106 //! the Type defined by the Binder Class else 0107 Standard_EXPORT Handle(Standard_Type) ResultType() const; 0108 0109 //! Returns True if the current Item has a Transient Unique 0110 //! Result (if yes, use TransientResult to get it) 0111 Standard_EXPORT Standard_Boolean HasTransientResult() const; 0112 0113 //! Returns the Transient Result of the current Item if there is 0114 //! (else, returns a null Handle) 0115 //! Supposes that Binding is done by a SimpleBinderOfTransient 0116 Standard_EXPORT const Handle(Standard_Transient)& TransientResult() const; 0117 0118 //! Returns Execution Status of current Binder 0119 //! Normal transfer corresponds to StatusDone 0120 Standard_EXPORT Transfer_StatusExec Status() const; 0121 0122 //! Returns True if Fail Messages are recorded with the current 0123 //! Binder. They can then be read through Check (see below) 0124 Standard_EXPORT Standard_Boolean HasFails() const; 0125 0126 //! Returns True if Warning Messages are recorded with the current 0127 //! Binder. They can then be read through Check (see below) 0128 Standard_EXPORT Standard_Boolean HasWarnings() const; 0129 0130 //! Returns Check associated to current Binder 0131 //! (in case of error, it brings Fail messages) 0132 //! (in case of warnings, it brings Warning messages) 0133 Standard_EXPORT const Handle(Interface_Check) Check() const; 0134 0135 0136 0137 0138 protected: 0139 0140 0141 0142 Standard_Integer thecurr; 0143 0144 0145 private: 0146 0147 0148 0149 Handle(Transfer_HSequenceOfBinder) theitems; 0150 Handle(TColStd_HSequenceOfInteger) theselect; 0151 Standard_Integer themaxi; 0152 0153 0154 }; 0155 0156 0157 0158 0159 0160 0161 0162 #endif // _Transfer_TransferIterator_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |