Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:07

0001 // Created on: 1993-03-16
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 _Interface_CopyMap_HeaderFile
0018 #define _Interface_CopyMap_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TColStd_Array1OfTransient.hxx>
0024 #include <Interface_CopyControl.hxx>
0025 class Interface_InterfaceModel;
0026 class Standard_Transient;
0027 
0028 
0029 class Interface_CopyMap;
0030 DEFINE_STANDARD_HANDLE(Interface_CopyMap, Interface_CopyControl)
0031 
0032 //! Manages a Map for the need of single Transfers, such as Copies
0033 //! In such transfer, Starting Entities are read from a unique
0034 //! Starting Model, and each transferred Entity is bound to one
0035 //! and only one Result, which cannot be changed later.
0036 class Interface_CopyMap : public Interface_CopyControl
0037 {
0038 
0039 public:
0040 
0041   
0042   //! Creates a CopyMap adapted to work from a Model
0043   Standard_EXPORT Interface_CopyMap(const Handle(Interface_InterfaceModel)& amodel);
0044   
0045   //! Clears Transfer List. Gets Ready to begin another Transfer
0046   Standard_EXPORT void Clear() Standard_OVERRIDE;
0047   
0048   //! Returns the InterfaceModel used at Creation time
0049   Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
0050   
0051   //! Binds a Starting Entity identified by its Number <num> in the
0052   //! Starting Model, to a Result of Transfer <res>
0053   Standard_EXPORT void Bind (const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& res) Standard_OVERRIDE;
0054   
0055   //! Search for the result of a Starting Object (i.e. an Entity,
0056   //! identified by its Number <num> in the Starting Model)
0057   //! Returns True  if a  Result is Bound (and fills <res>)
0058   //! Returns False if no result is Bound (and nullifies <res>)
0059   Standard_EXPORT Standard_Boolean Search (const Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const Standard_OVERRIDE;
0060 
0061 
0062 
0063 
0064   DEFINE_STANDARD_RTTIEXT(Interface_CopyMap,Interface_CopyControl)
0065 
0066 protected:
0067 
0068 
0069 
0070 
0071 private:
0072 
0073 
0074   Handle(Interface_InterfaceModel) themod;
0075   TColStd_Array1OfTransient theres;
0076 
0077 
0078 };
0079 
0080 
0081 
0082 
0083 
0084 
0085 
0086 #endif // _Interface_CopyMap_HeaderFile