Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:54

0001 // Created on: 1995-10-25
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1995-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_SelectSent_HeaderFile
0018 #define _IFSelect_SelectSent_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <IFSelect_SelectExtract.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_SelectSent;
0033 DEFINE_STANDARD_HANDLE(IFSelect_SelectSent, IFSelect_SelectExtract)
0034 
0035 //! This class returns entities according sending to a file
0036 //! Once a model has been loaded, further sendings are recorded
0037 //! as status in the graph (for each value, a count of sendings)
0038 //!
0039 //! Hence, it is possible to query entities : sent ones (at least
0040 //! once), non-sent (i.e. remaining) ones, duplicated ones, etc...
0041 //!
0042 //! This selection performs this query
0043 class IFSelect_SelectSent : public IFSelect_SelectExtract
0044 {
0045 
0046 public:
0047 
0048   
0049   //! Creates a SelectSent :
0050   //! sentcount = 0 -> remaining (non-sent) entities
0051   //! sentcount = 1, atleast = True (D) -> sent (at least once)
0052   //! sentcount = 2, atleast = True -> duplicated (sent least twice)
0053   //! etc...
0054   //! sentcount = 1, atleast = False -> sent just once (non-dupl.d)
0055   //! sentcount = 2, atleast = False -> sent just twice
0056   //! etc...
0057   Standard_EXPORT IFSelect_SelectSent(const Standard_Integer sentcount = 1, const Standard_Boolean atleast = Standard_True);
0058   
0059   //! Returns the queried count of sending
0060   Standard_EXPORT Standard_Integer SentCount() const;
0061   
0062   //! Returns the <atleast> status, True for sending at least the
0063   //! sending count, False for sending exactly the sending count
0064   //! Remark : if SentCount is 0, AtLeast is ignored
0065   Standard_EXPORT Standard_Boolean AtLeast() const;
0066   
0067   //! Returns the list of selected entities. It is redefined to
0068   //! work on the graph itself (not queried by sort)
0069   //!
0070   //! An entity is selected if its count complies to the query in
0071   //! Direct Mode, rejected in Reversed Mode
0072   //!
0073   //! Query works on the sending count recorded as status in Graph
0074   Standard_EXPORT virtual Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE;
0075   
0076   //! Returns always False because RootResult has done the work
0077   Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
0078   
0079   //! Returns a text defining the criterium : query :
0080   //! SentCount = 0 -> "Remaining (non-sent) entities"
0081   //! SentCount = 1, AtLeast = True  -> "Sent entities"
0082   //! SentCount = 1, AtLeast = False -> "Sent once (no duplicated)"
0083   //! SentCount = 2, AtLeast = True  -> "Sent several times entities"
0084   //! SentCount = 2, AtLeast = False -> "Sent twice entities"
0085   //! SentCount > 2, AtLeast = True  -> "Sent at least <count> times entities"
0086   //! SentCount > 2, AtLeast = False -> "Sent <count> times entities"
0087   Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
0088 
0089 
0090 
0091 
0092   DEFINE_STANDARD_RTTIEXT(IFSelect_SelectSent,IFSelect_SelectExtract)
0093 
0094 protected:
0095 
0096 
0097 
0098 
0099 private:
0100 
0101 
0102   Standard_Integer thecnt;
0103   Standard_Boolean thelst;
0104 
0105 
0106 };
0107 
0108 
0109 
0110 
0111 
0112 
0113 
0114 #endif // _IFSelect_SelectSent_HeaderFile