Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:29

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 <TColStd_HSequenceOfTransient.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <Interface_CheckStatus.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TColStd_IndexedMapOfTransient.hxx>
0028 class Transfer_Binder;
0029 class Interface_Check;
0030 class Transfer_TransientProcess;
0031 
0032 
0033 class Transfer_ResultFromTransient;
0034 DEFINE_STANDARD_HANDLE(Transfer_ResultFromTransient, Standard_Transient)
0035 
0036 //! This class, in conjunction with ResultFromModel, allows to
0037 //! record the result of a transfer initially stored in a
0038 //! TransientProcess.
0039 //!
0040 //! A ResultFromTransient records a couple (Transient,Binder for
0041 //! the result and checks) plus a list of "sub-results", which
0042 //! have been recorded in the TrabsientProcess, under scope
0043 //! attached to the starting transient.
0044 class Transfer_ResultFromTransient : public Standard_Transient
0045 {
0046 
0047 public:
0048 
0049   
0050   //! Creates a ResultFromTransient, empty
0051   Standard_EXPORT Transfer_ResultFromTransient();
0052   
0053   //! Sets starting entity
0054   Standard_EXPORT void SetStart (const Handle(Standard_Transient)& start);
0055   
0056   //! Sets Binder (for result plus individual check)
0057   Standard_EXPORT void SetBinder (const Handle(Transfer_Binder)& binder);
0058   
0059   //! Returns the starting entity
0060   Standard_EXPORT Handle(Standard_Transient) Start() const;
0061   
0062   //! Returns the binder
0063   Standard_EXPORT Handle(Transfer_Binder) Binder() const;
0064   
0065   //! Returns True if a result is recorded
0066   Standard_EXPORT Standard_Boolean HasResult() const;
0067   
0068   //! Returns the check (or an empty one if no binder)
0069   Standard_EXPORT const Handle(Interface_Check) Check() const;
0070   
0071   //! Returns the check status
0072   Standard_EXPORT Interface_CheckStatus CheckStatus() const;
0073   
0074   //! Clears the list of (immediate) sub-results
0075   Standard_EXPORT void ClearSubs();
0076   
0077   //! Adds a sub-result
0078   Standard_EXPORT void AddSubResult (const Handle(Transfer_ResultFromTransient)& sub);
0079   
0080   //! Returns the count of recorded sub-results
0081   Standard_EXPORT Standard_Integer NbSubResults() const;
0082   
0083   //! Returns a sub-result, given its rank
0084   Standard_EXPORT Handle(Transfer_ResultFromTransient) SubResult (const Standard_Integer num) const;
0085   
0086   //! Returns the ResultFromTransient attached to a given starting
0087   //! entity (the key). Returns a null handle if not found
0088   Standard_EXPORT Handle(Transfer_ResultFromTransient) ResultFromKey (const Handle(Standard_Transient)& key) const;
0089   
0090   //! This method is used by ResultFromModel to collate the list of
0091   //! ResultFromTransient, avoiding duplications with a map
0092   //! Remark : <me> is already in the map and has not to be bound
0093   Standard_EXPORT void FillMap (TColStd_IndexedMapOfTransient& map) const;
0094   
0095   //! Fills from a TransientProcess, with the starting entity which
0096   //! must have been set before. It works with scopes, calls Fill
0097   //! on each of its sub-results
0098   Standard_EXPORT void Fill (const Handle(Transfer_TransientProcess)& TP);
0099   
0100   //! Clears some data attached to binders used by TransientProcess,
0101   //! which become useless once the transfer has been done :
0102   //! the list of sub-scoped binders, which is now recorded as
0103   //! sub-results
0104   Standard_EXPORT void Strip();
0105   
0106   //! Fills back a TransientProcess with definition of a
0107   //! ResultFromTransient, respectfully to its structuration in
0108   //! scopes
0109   Standard_EXPORT void FillBack (const Handle(Transfer_TransientProcess)& TP) const;
0110 
0111 
0112 
0113 
0114   DEFINE_STANDARD_RTTIEXT(Transfer_ResultFromTransient,Standard_Transient)
0115 
0116 protected:
0117 
0118 
0119 
0120 
0121 private:
0122 
0123 
0124   Handle(Standard_Transient) thestart;
0125   Handle(Transfer_Binder) thebinder;
0126   Handle(TColStd_HSequenceOfTransient) thesubs;
0127 
0128 
0129 };
0130 
0131 
0132 
0133 
0134 
0135 
0136 
0137 #endif // _Transfer_ResultFromTransient_HeaderFile