Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1999-06-22
0002 // Created by: data exchange team
0003 // Copyright (c) 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 _ShapeProcessAPI_ApplySequence_HeaderFile
0018 #define _ShapeProcessAPI_ApplySequence_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopTools_DataMapOfShapeShape.hxx>
0025 #include <TCollection_AsciiString.hxx>
0026 #include <Standard_CString.hxx>
0027 #include <TopAbs_ShapeEnum.hxx>
0028 #include <Message_ProgressRange.hxx>
0029 
0030 class ShapeProcess_ShapeContext;
0031 class TopoDS_Shape;
0032 
0033 //! Applies one of the sequence read from resource file.
0034 class ShapeProcessAPI_ApplySequence 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   //! Creates an object and loads resource file and sequence of
0042   //! operators given by their names.
0043   Standard_EXPORT ShapeProcessAPI_ApplySequence(const Standard_CString rscName, const Standard_CString seqName = "");
0044   
0045   //! Returns object for managing resource file and sequence of
0046   //! operators.
0047   Standard_EXPORT Handle(ShapeProcess_ShapeContext)& Context();
0048   
0049   //! Performs sequence of operators stored in myRsc.
0050   //! If <fillmap> is True adds history "shape-shape" into myMap
0051   //! for shape and its subshapes until level <until> (included).
0052   //! If <until> is TopAbs_SHAPE,  all the subshapes are considered.
0053   Standard_EXPORT TopoDS_Shape PrepareShape (const TopoDS_Shape& shape,
0054                                              const Standard_Boolean fillmap = Standard_False,
0055                                              const TopAbs_ShapeEnum until = TopAbs_SHAPE, 
0056                                              const Message_ProgressRange& theProgress = Message_ProgressRange());
0057   
0058   //! Clears myMap with accumulated history.
0059   Standard_EXPORT void ClearMap();
0060   
0061   //! Returns myMap with accumulated history.
0062   Standard_EXPORT const TopTools_DataMapOfShapeShape& Map() const;
0063   
0064   //! Prints result of preparation onto the messenger of the context.
0065   //! Note that results can be accumulated from previous preparations
0066   //! it method ClearMap was not called before PrepareShape.
0067   Standard_EXPORT void PrintPreparationResult() const;
0068 
0069 
0070 
0071 
0072 protected:
0073 
0074 
0075 
0076 
0077 
0078 private:
0079 
0080 
0081 
0082   Handle(ShapeProcess_ShapeContext) myContext;
0083   TopTools_DataMapOfShapeShape myMap;
0084   TCollection_AsciiString mySeq;
0085 
0086 
0087 };
0088 
0089 
0090 
0091 
0092 
0093 
0094 
0095 #endif // _ShapeProcessAPI_ApplySequence_HeaderFile