|
|
|||
File indexing completed on 2026-09-26 09:03:33
0001 // Created on: 1998-10-19 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1998-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_SelectSuite_HeaderFile 0018 #define _IFSelect_SelectSuite_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <TCollection_AsciiString.hxx> 0024 #include <Standard_Transient.hxx> 0025 #include <NCollection_Sequence.hxx> 0026 #include <IFSelect_SelectDeduct.hxx> 0027 #include <Standard_Integer.hxx> 0028 #include <Standard_CString.hxx> 0029 class IFSelect_Selection; 0030 class Interface_EntityIterator; 0031 class Interface_Graph; 0032 0033 //! A SelectSuite can describe a suite of SelectDeduct as a unique 0034 //! one : in other words, it can be seen as a "macro selection" 0035 //! 0036 //! It works by applying each of its items (which is a 0037 //! SelectDeduct) on the result computed by the previous one 0038 //! (by using Alternate Input) 0039 //! 0040 //! But each of these Selections used as items may be used 0041 //! independently, it will then give its own result 0042 //! 0043 //! Hence, SelectSuite gives a way of defining a new Selection 0044 //! from existing ones, without having to do copies or saves 0045 class IFSelect_SelectSuite : public IFSelect_SelectDeduct 0046 { 0047 0048 public: 0049 //! Creates an empty SelectSuite 0050 Standard_EXPORT IFSelect_SelectSuite(); 0051 0052 //! Adds an input selection. I.E. : 0053 //! If <item> is a SelectDeduct, adds it as Previous, not as Input 0054 //! Else, sets it as Input 0055 //! Returns True when done 0056 //! Returns False and refuses to work if Input is already defined 0057 Standard_EXPORT bool AddInput(const occ::handle<IFSelect_Selection>& item); 0058 0059 //! Adds a new first item (prepends to the list). The Input is not 0060 //! touched 0061 //! If <item> is null, does nothing 0062 Standard_EXPORT void AddPrevious(const occ::handle<IFSelect_SelectDeduct>& item); 0063 0064 //! Adds a new last item (prepends to the list) 0065 //! If <item> is null, does nothing 0066 Standard_EXPORT void AddNext(const occ::handle<IFSelect_SelectDeduct>& item); 0067 0068 //! Returns the count of Items 0069 Standard_EXPORT int NbItems() const; 0070 0071 //! Returns an item from its rank in the list 0072 //! (the Input is always apart) 0073 Standard_EXPORT occ::handle<IFSelect_SelectDeduct> Item(const int num) const; 0074 0075 //! Sets a value for the Label 0076 Standard_EXPORT void SetLabel(const char* const lab); 0077 0078 //! Returns the list of selected entities 0079 //! To do this, once InputResult has been taken (if Input or 0080 //! Alternate has been defined, else the first Item gives it) : 0081 //! this result is set as alternate input for the first item, 0082 //! which computes its result : this result is set as alternate 0083 //! input for the second item, etc... 0084 Standard_EXPORT Interface_EntityIterator RootResult(const Interface_Graph& G) const override; 0085 0086 //! Returns the Label 0087 //! Either it has been defined by SetLabel, or it will give 0088 //! "Suite of nn Selections" 0089 Standard_EXPORT TCollection_AsciiString Label() const override; 0090 0091 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectSuite, IFSelect_SelectDeduct) 0092 0093 private: 0094 TCollection_AsciiString thelab; 0095 NCollection_Sequence<occ::handle<Standard_Transient>> thesel; 0096 }; 0097 0098 #endif // _IFSelect_SelectSuite_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|