|
|
|||
File indexing completed on 2026-09-25 09:21:46
0001 // Created on: 1995-11-16 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1995-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_ResultFromTransient_HeaderFile 0018 #define _Transfer_ResultFromTransient_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 #include <NCollection_Sequence.hxx> 0025 #include <NCollection_HSequence.hxx> 0026 #include <Interface_CheckStatus.hxx> 0027 #include <Standard_Integer.hxx> 0028 #include <NCollection_IndexedMap.hxx> 0029 class Transfer_Binder; 0030 class Interface_Check; 0031 class Transfer_TransientProcess; 0032 0033 //! This class, in conjunction with ResultFromModel, allows to 0034 //! record the result of a transfer initially stored in a 0035 //! TransientProcess. 0036 //! 0037 //! A ResultFromTransient records a couple (Transient,Binder for 0038 //! the result and checks) plus a list of "sub-results", which 0039 //! have been recorded in the TrabsientProcess, under scope 0040 //! attached to the starting transient. 0041 class Transfer_ResultFromTransient : public Standard_Transient 0042 { 0043 0044 public: 0045 //! Creates a ResultFromTransient, empty 0046 Standard_EXPORT Transfer_ResultFromTransient(); 0047 0048 //! Sets starting entity 0049 Standard_EXPORT void SetStart(const occ::handle<Standard_Transient>& start); 0050 0051 //! Sets Binder (for result plus individual check) 0052 Standard_EXPORT void SetBinder(const occ::handle<Transfer_Binder>& binder); 0053 0054 //! Returns the starting entity 0055 Standard_EXPORT occ::handle<Standard_Transient> Start() const; 0056 0057 //! Returns the binder 0058 Standard_EXPORT occ::handle<Transfer_Binder> Binder() const; 0059 0060 //! Returns True if a result is recorded 0061 Standard_EXPORT bool HasResult() const; 0062 0063 //! Returns the check (or an empty one if no binder) 0064 Standard_EXPORT const occ::handle<Interface_Check> Check() const; 0065 0066 //! Returns the check status 0067 Standard_EXPORT Interface_CheckStatus CheckStatus() const; 0068 0069 //! Clears the list of (immediate) sub-results 0070 Standard_EXPORT void ClearSubs(); 0071 0072 //! Adds a sub-result 0073 Standard_EXPORT void AddSubResult(const occ::handle<Transfer_ResultFromTransient>& sub); 0074 0075 //! Returns the count of recorded sub-results 0076 Standard_EXPORT int NbSubResults() const; 0077 0078 //! Returns a sub-result, given its rank 0079 Standard_EXPORT occ::handle<Transfer_ResultFromTransient> SubResult(const int num) const; 0080 0081 //! Returns the ResultFromTransient attached to a given starting 0082 //! entity (the key). Returns a null handle if not found 0083 Standard_EXPORT occ::handle<Transfer_ResultFromTransient> ResultFromKey( 0084 const occ::handle<Standard_Transient>& key) const; 0085 0086 //! This method is used by ResultFromModel to collate the list of 0087 //! ResultFromTransient, avoiding duplications with a map 0088 //! Remark : <me> is already in the map and has not to be bound 0089 Standard_EXPORT void FillMap(NCollection_IndexedMap<occ::handle<Standard_Transient>>& map) const; 0090 0091 //! Fills from a TransientProcess, with the starting entity which 0092 //! must have been set before. It works with scopes, calls Fill 0093 //! on each of its sub-results 0094 Standard_EXPORT void Fill(const occ::handle<Transfer_TransientProcess>& TP); 0095 0096 //! Clears some data attached to binders used by TransientProcess, 0097 //! which become useless once the transfer has been done : 0098 //! the list of sub-scoped binders, which is now recorded as 0099 //! sub-results 0100 Standard_EXPORT void Strip(); 0101 0102 //! Fills back a TransientProcess with definition of a 0103 //! ResultFromTransient, respectfully to its structuration in 0104 //! scopes 0105 Standard_EXPORT void FillBack(const occ::handle<Transfer_TransientProcess>& TP) const; 0106 0107 DEFINE_STANDARD_RTTIEXT(Transfer_ResultFromTransient, Standard_Transient) 0108 0109 private: 0110 occ::handle<Standard_Transient> thestart; 0111 occ::handle<Transfer_Binder> thebinder; 0112 occ::handle<NCollection_HSequence<occ::handle<Standard_Transient>>> thesubs; 0113 }; 0114 0115 #endif // _Transfer_ResultFromTransient_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|