|
|
|||
File indexing completed on 2026-09-13 09:16:42
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 //! A SelectExtract determines a list of Entities from an Input 0032 //! Selection, as a sub-list of the Input Result 0033 //! It works by applying a sort criterium on each Entity of the 0034 //! Input. This criterium can be applied Direct to Pick Items 0035 //! (default case) or Reverse to Remove Item 0036 //! 0037 //! Basic features (the unique Input) are inherited from SelectDeduct 0038 class IFSelect_SelectExtract : public IFSelect_SelectDeduct 0039 { 0040 0041 public: 0042 //! Returns True if Sort criterium is Direct, False if Reverse 0043 Standard_EXPORT bool IsDirect() const; 0044 0045 //! Sets Sort criterium sense to a new value 0046 //! (True : Direct , False : Reverse) 0047 Standard_EXPORT void SetDirect(const bool direct); 0048 0049 //! Returns the list of selected entities. Works by calling the 0050 //! method Sort on each input Entity : the Entity is kept as 0051 //! output if Sort returns the same value as Direct status 0052 Standard_EXPORT Interface_EntityIterator RootResult(const Interface_Graph& G) const override; 0053 0054 //! Returns True for an Entity if it satisfies the Sort criterium 0055 //! It receives : 0056 //! - <rank>, the rank of the Entity in the Iteration, 0057 //! - <ent> , the Entity itself, and 0058 //! - <model>, the Starting Model 0059 //! Hence, the Entity to check is "model->Value(num)" (but an 0060 //! InterfaceModel allows other checks) 0061 //! This method is specific to each class of SelectExtract 0062 Standard_EXPORT virtual bool Sort(const int rank, 0063 const occ::handle<Standard_Transient>& ent, 0064 const occ::handle<Interface_InterfaceModel>& model) const = 0; 0065 0066 //! Works as Sort but works on the Graph 0067 //! Default directly calls Sort, but it can be redefined 0068 //! If SortInGraph is redefined, Sort should be defined even if 0069 //! not called (to avoid deferred methods in a final class) 0070 Standard_EXPORT virtual bool SortInGraph(const int rank, 0071 const occ::handle<Standard_Transient>& ent, 0072 const Interface_Graph& G) const; 0073 0074 //! Returns a text saying "Picked" or "Removed", plus the 0075 //! specific criterium returned by ExtractLabel (see below) 0076 Standard_EXPORT TCollection_AsciiString Label() const override; 0077 0078 //! Returns a text defining the criterium for extraction 0079 Standard_EXPORT virtual TCollection_AsciiString ExtractLabel() const = 0; 0080 0081 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectExtract, IFSelect_SelectDeduct) 0082 0083 protected: 0084 //! Initializes a SelectExtract : enforces the sort to be Direct 0085 Standard_EXPORT IFSelect_SelectExtract(); 0086 0087 private: 0088 bool thesort; 0089 }; 0090 0091 #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 |
|