Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-31 08:31:38

0001 // Created on: 1996-03-26
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1996-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 _XSControl_SelectForTransfer_HeaderFile
0018 #define _XSControl_SelectForTransfer_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IFSelect_SelectExtract.hxx>
0024 #include <Standard_Integer.hxx>
0025 class XSControl_TransferReader;
0026 class Transfer_ActorOfTransientProcess;
0027 class Standard_Transient;
0028 class Interface_InterfaceModel;
0029 class TCollection_AsciiString;
0030 
0031 class XSControl_SelectForTransfer;
0032 DEFINE_STANDARD_HANDLE(XSControl_SelectForTransfer, IFSelect_SelectExtract)
0033 
0034 //! This selection selects the entities which are recognised for
0035 //! transfer by an Actor for Read : current one or another one.
0036 //!
0037 //! An Actor is an operator which runs transfers from interface
0038 //! entities to objects for Imagine. It has a method to recognize
0039 //! the entities it can process (by default, it recognises all,
0040 //! this method can be redefined).
0041 //!
0042 //! A TransferReader brings an Actor, according to the currently
0043 //! selected norm and transfer conditions.
0044 //!
0045 //! This selection considers, either the current Actor (brought by
0046 //! the TransferReader, updated as required), or a precise one.
0047 class XSControl_SelectForTransfer : public IFSelect_SelectExtract
0048 {
0049 
0050 public:
0051   //! Creates a SelectForTransfer, non initialised
0052   //! it sorts nothing, unless an Actor has been defined
0053   Standard_EXPORT XSControl_SelectForTransfer();
0054 
0055   //! Creates a SelectForTransfer, which will work with the
0056   //! currently defined Actor brought by the TransferReader
0057   Standard_EXPORT XSControl_SelectForTransfer(const Handle(XSControl_TransferReader)& TR);
0058 
0059   //! Sets a TransferReader to sort entities : it brings the Actor,
0060   //! which may change, while the TransferReader does not
0061   Standard_EXPORT void SetReader(const Handle(XSControl_TransferReader)& TR);
0062 
0063   //! Sets a precise actor to sort entities
0064   //! This definition oversedes the creation with a TransferReader
0065   Standard_EXPORT void SetActor(const Handle(Transfer_ActorOfTransientProcess)& act);
0066 
0067   //! Returns the Actor used as precised one.
0068   //! Returns a Null Handle for a creation from a TransferReader
0069   //! without any further setting
0070   Standard_EXPORT Handle(Transfer_ActorOfTransientProcess) Actor() const;
0071 
0072   //! Returns the Reader (if created with a Reader)
0073   //! Returns a Null Handle if not created with a Reader
0074   Standard_EXPORT Handle(XSControl_TransferReader) Reader() const;
0075 
0076   //! Returns True for an Entity which is recognized by the Actor,
0077   //! either the precised one, or the one defined by TransferReader
0078   Standard_EXPORT Standard_Boolean
0079     Sort(const Standard_Integer                  rank,
0080          const Handle(Standard_Transient)&       ent,
0081          const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
0082 
0083   //! Returns a text defining the criterium : "Recognized for Transfer [(current actor)]"
0084   Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
0085 
0086   DEFINE_STANDARD_RTTIEXT(XSControl_SelectForTransfer, IFSelect_SelectExtract)
0087 
0088 protected:
0089 private:
0090   Handle(XSControl_TransferReader)         theTR;
0091   Handle(Transfer_ActorOfTransientProcess) theAC;
0092 };
0093 
0094 #endif // _XSControl_SelectForTransfer_HeaderFile