|
||||
File indexing completed on 2025-01-18 10:03:54
0001 // Created on: 1992-11-17 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-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 _IFSelect_SelectExtract_HeaderFile 0018 #define _IFSelect_SelectExtract_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <IFSelect_SelectDeduct.hxx> 0024 #include <Standard_Integer.hxx> 0025 class Interface_EntityIterator; 0026 class Interface_Graph; 0027 class Standard_Transient; 0028 class Interface_InterfaceModel; 0029 class TCollection_AsciiString; 0030 0031 0032 class IFSelect_SelectExtract; 0033 DEFINE_STANDARD_HANDLE(IFSelect_SelectExtract, IFSelect_SelectDeduct) 0034 0035 //! A SelectExtract determines a list of Entities from an Input 0036 //! Selection, as a sub-list of the Input Result 0037 //! It works by applying a sort criterium on each Entity of the 0038 //! Input. This criterium can be applied Direct to Pick Items 0039 //! (default case) or Reverse to Remove Item 0040 //! 0041 //! Basic features (the unique Input) are inherited from SelectDeduct 0042 class IFSelect_SelectExtract : public IFSelect_SelectDeduct 0043 { 0044 0045 public: 0046 0047 0048 //! Returns True if Sort criterium is Direct, False if Reverse 0049 Standard_EXPORT Standard_Boolean IsDirect() const; 0050 0051 //! Sets Sort criterium sense to a new value 0052 //! (True : Direct , False : Reverse) 0053 Standard_EXPORT void SetDirect (const Standard_Boolean direct); 0054 0055 //! Returns the list of selected entities. Works by calling the 0056 //! method Sort on each input Entity : the Entity is kept as 0057 //! output if Sort returns the same value as Direct status 0058 Standard_EXPORT virtual Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE; 0059 0060 //! Returns True for an Entity if it satisfies the Sort criterium 0061 //! It receives : 0062 //! - <rank>, the rank of the Entity in the Iteration, 0063 //! - <ent> , the Entity itself, and 0064 //! - <model>, the Starting Model 0065 //! Hence, the Entity to check is "model->Value(num)" (but an 0066 //! InterfaceModel allows other checks) 0067 //! This method is specific to each class of SelectExtract 0068 Standard_EXPORT virtual Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const = 0; 0069 0070 //! Works as Sort but works on the Graph 0071 //! Default directly calls Sort, but it can be redefined 0072 //! If SortInGraph is redefined, Sort should be defined even if 0073 //! not called (to avoid deferred methods in a final class) 0074 Standard_EXPORT virtual Standard_Boolean SortInGraph (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Interface_Graph& G) const; 0075 0076 //! Returns a text saying "Picked" or "Removed", plus the 0077 //! specific criterium returned by ExtractLabel (see below) 0078 Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; 0079 0080 //! Returns a text defining the criterium for extraction 0081 Standard_EXPORT virtual TCollection_AsciiString ExtractLabel() const = 0; 0082 0083 0084 0085 0086 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectExtract,IFSelect_SelectDeduct) 0087 0088 protected: 0089 0090 0091 //! Initializes a SelectExtract : enforces the sort to be Direct 0092 Standard_EXPORT IFSelect_SelectExtract(); 0093 0094 0095 0096 private: 0097 0098 0099 Standard_Boolean thesort; 0100 0101 0102 }; 0103 0104 0105 0106 0107 0108 0109 0110 #endif // _IFSelect_SelectExtract_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |