|
||||
File indexing completed on 2025-01-18 10:03:54
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 <TColStd_SequenceOfTransient.hxx> 0025 #include <IFSelect_SelectDeduct.hxx> 0026 #include <Standard_Integer.hxx> 0027 #include <Standard_CString.hxx> 0028 class IFSelect_Selection; 0029 class Interface_EntityIterator; 0030 class Interface_Graph; 0031 0032 0033 class IFSelect_SelectSuite; 0034 DEFINE_STANDARD_HANDLE(IFSelect_SelectSuite, IFSelect_SelectDeduct) 0035 0036 //! A SelectSuite can describe a suite of SelectDeduct as a unique 0037 //! one : in other words, it can be seen as a "macro selection" 0038 //! 0039 //! It works by applying each of its items (which is a 0040 //! SelectDeduct) on the result computed by the previous one 0041 //! (by using Alternate Input) 0042 //! 0043 //! But each of these Selections used as items may be used 0044 //! independently, it will then give its own result 0045 //! 0046 //! Hence, SelectSuite gives a way of defining a new Selection 0047 //! from existing ones, without having to do copies or saves 0048 class IFSelect_SelectSuite : public IFSelect_SelectDeduct 0049 { 0050 0051 public: 0052 0053 0054 //! Creates an empty SelectSuite 0055 Standard_EXPORT IFSelect_SelectSuite(); 0056 0057 //! Adds an input selection. I.E. : 0058 //! If <item> is a SelectDeduct, adds it as Previous, not as Input 0059 //! Else, sets it as Input 0060 //! Returns True when done 0061 //! Returns False and refuses to work if Input is already defined 0062 Standard_EXPORT Standard_Boolean AddInput (const Handle(IFSelect_Selection)& item); 0063 0064 //! Adds a new first item (prepends to the list). The Input is not 0065 //! touched 0066 //! If <item> is null, does nothing 0067 Standard_EXPORT void AddPrevious (const Handle(IFSelect_SelectDeduct)& item); 0068 0069 //! Adds a new last item (prepends to the list) 0070 //! If <item> is null, does nothing 0071 Standard_EXPORT void AddNext (const Handle(IFSelect_SelectDeduct)& item); 0072 0073 //! Returns the count of Items 0074 Standard_EXPORT Standard_Integer NbItems() const; 0075 0076 //! Returns an item from its rank in the list 0077 //! (the Input is always apart) 0078 Standard_EXPORT Handle(IFSelect_SelectDeduct) Item (const Standard_Integer num) const; 0079 0080 //! Sets a value for the Label 0081 Standard_EXPORT void SetLabel (const Standard_CString lab); 0082 0083 //! Returns the list of selected entities 0084 //! To do this, once InputResult has been taken (if Input or 0085 //! Alternate has been defined, else the first Item gives it) : 0086 //! this result is set as alternate input for the first item, 0087 //! which computes its result : this result is set as alternate 0088 //! input for the second item, etc... 0089 Standard_EXPORT Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE; 0090 0091 //! Returns the Label 0092 //! Either it has been defined by SetLabel, or it will give 0093 //! "Suite of nn Selections" 0094 Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; 0095 0096 0097 0098 0099 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectSuite,IFSelect_SelectDeduct) 0100 0101 protected: 0102 0103 0104 0105 0106 private: 0107 0108 0109 TCollection_AsciiString thelab; 0110 TColStd_SequenceOfTransient thesel; 0111 0112 0113 }; 0114 0115 0116 0117 0118 0119 0120 0121 #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 |