Back to home page

EIC code displayed by LXR

 
 

    


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_SelectCombine_HeaderFile
0018 #define _IFSelect_SelectCombine_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IFSelect_TSeqOfSelection.hxx>
0024 #include <IFSelect_Selection.hxx>
0025 #include <Standard_Integer.hxx>
0026 class IFSelect_SelectionIterator;
0027 
0028 
0029 class IFSelect_SelectCombine;
0030 DEFINE_STANDARD_HANDLE(IFSelect_SelectCombine, IFSelect_Selection)
0031 
0032 //! A SelectCombine type Selection defines algebraic operations
0033 //! between results of several Selections
0034 //! It is a deferred class : sub-classes will have to define
0035 //! precise what operator is to be applied
0036 class IFSelect_SelectCombine : public IFSelect_Selection
0037 {
0038 
0039 public:
0040 
0041   
0042   //! Returns the count of Input Selections
0043   Standard_EXPORT Standard_Integer NbInputs() const;
0044   
0045   //! Returns an Input Selection, given its rank in the list
0046   Standard_EXPORT Handle(IFSelect_Selection) Input (const Standard_Integer num) const;
0047   
0048   //! Returns the rank of an input Selection, 0 if not in the list.
0049   //! Most generally, its value is meaningless, except for testing
0050   //! the presence of an input Selection :
0051   //! - == 0  if <sel> is not an input for <me>
0052   //! - >  0  if <sel> is an input for <me>
0053   Standard_EXPORT Standard_Integer InputRank (const Handle(IFSelect_Selection)& sel) const;
0054   
0055   //! Adds a Selection to the filling list
0056   //! By default, adds it to the end of the list
0057   //! A Positive rank less then NbInputs gives an insertion rank
0058   //! (InsertBefore : the new <atnum>th item of the list is <sel>)
0059   Standard_EXPORT void Add (const Handle(IFSelect_Selection)& sel, const Standard_Integer atnum = 0);
0060   
0061   //! Removes an input Selection.
0062   //! Returns True if Done, False, if <sel> is not an input for <me>
0063   Standard_EXPORT Standard_Boolean Remove (const Handle(IFSelect_Selection)& sel);
0064   
0065   //! Removes an input Selection, given its rank in the list
0066   //! Returns True if Done, False if <num> is out of range
0067   Standard_EXPORT Standard_Boolean Remove (const Standard_Integer num);
0068   
0069   //! Puts in an Iterator the Selections from which "me" depends
0070   //! That is to say, the list of Input Selections
0071   Standard_EXPORT void FillIterator (IFSelect_SelectionIterator& iter) const Standard_OVERRIDE;
0072 
0073 
0074 
0075 
0076   DEFINE_STANDARD_RTTIEXT(IFSelect_SelectCombine,IFSelect_Selection)
0077 
0078 protected:
0079 
0080   
0081   //! Defines an empty SelectCombine
0082   Standard_EXPORT IFSelect_SelectCombine();
0083   
0084   //! Returns always True, because RootResult gives a Unique list
0085   Standard_EXPORT virtual Standard_Boolean HasUniqueResult() const Standard_OVERRIDE;
0086 
0087 
0088 
0089 private:
0090 
0091 
0092   IFSelect_TSeqOfSelection thelist;
0093 
0094 
0095 };
0096 
0097 
0098 
0099 
0100 
0101 
0102 
0103 #endif // _IFSelect_SelectCombine_HeaderFile