Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:16:59

0001 // Created on: 2000-08-22
0002 // Created by: Andrey BETENEV
0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _ShapeProcess_UOperator_HeaderFile
0017 #define _ShapeProcess_UOperator_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <ShapeProcess_OperFunc.hxx>
0022 #include <ShapeProcess_Operator.hxx>
0023 class ShapeProcess_Context;
0024 
0025 //! Defines operator as container for static function
0026 //! OperFunc. This allows user to create new operators
0027 //! without creation of new classes
0028 class ShapeProcess_UOperator : public ShapeProcess_Operator
0029 {
0030 
0031 public:
0032   //! Creates operator with implementation defined as
0033   //! OperFunc (static function)
0034   Standard_EXPORT ShapeProcess_UOperator(const ShapeProcess_OperFunc func);
0035 
0036   //! Performs operation and records changes in the context
0037   Standard_EXPORT bool Perform(
0038     const occ::handle<ShapeProcess_Context>& context,
0039     const Message_ProgressRange&             theProgress = Message_ProgressRange()) override;
0040 
0041   DEFINE_STANDARD_RTTIEXT(ShapeProcess_UOperator, ShapeProcess_Operator)
0042 
0043 private:
0044   ShapeProcess_OperFunc myFunc;
0045 };
0046 
0047 #endif // _ShapeProcess_UOperator_HeaderFile