0030480: Visualization - Clear of Select3D_SensitiveGroup does not update internal...
[occt.git] / src / IFSelect / IFSelect_SelectSent.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-10-25
2// Created by: Christian CAILLET
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IFSelect_SelectSent_HeaderFile
18#define _IFSelect_SelectSent_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <Standard_Boolean.hxx>
25#include <IFSelect_SelectExtract.hxx>
26class Interface_EntityIterator;
27class Interface_Graph;
28class Standard_Transient;
29class Interface_InterfaceModel;
30class TCollection_AsciiString;
31
32
33class IFSelect_SelectSent;
34DEFINE_STANDARD_HANDLE(IFSelect_SelectSent, IFSelect_SelectExtract)
35
36//! This class returns entities according sending to a file
37//! Once a model has been loaded, further sendings are recorded
38//! as status in the graph (for each value, a count of sendings)
39//!
40//! Hence, it is possible to query entities : sent ones (at least
41//! once), non-sent (i.e. remaining) ones, duplicated ones, etc...
42//!
43//! This selection performs this query
44class IFSelect_SelectSent : public IFSelect_SelectExtract
45{
46
47public:
48
49
50 //! Creates a SelectSent :
51 //! sentcount = 0 -> remaining (non-sent) entities
52 //! sentcount = 1, atleast = True (D) -> sent (at least once)
53 //! sentcount = 2, atleast = True -> duplicated (sent least twice)
54 //! etc...
55 //! sentcount = 1, atleast = False -> sent just once (non-dupl.d)
56 //! sentcount = 2, atleast = False -> sent just twice
57 //! etc...
58 Standard_EXPORT IFSelect_SelectSent(const Standard_Integer sentcount = 1, const Standard_Boolean atleast = Standard_True);
59
60 //! Returns the queried count of sending
61 Standard_EXPORT Standard_Integer SentCount() const;
62
63 //! Returns the <atleast> status, True for sending at least the
64 //! sending count, False for sending exactly the sending count
65 //! Remark : if SentCount is 0, AtLeast is ignored
66 Standard_EXPORT Standard_Boolean AtLeast() const;
67
68 //! Returns the list of selected entities. It is redefined to
69 //! work on the graph itself (not queried by sort)
70 //!
71 //! An entity is selected if its count complies to the query in
72 //! Direct Mode, rejected in Reversed Mode
73 //!
74 //! Query works on the sending count recorded as status in Graph
75 Standard_EXPORT virtual Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE;
76
77 //! Returns always False because RootResult has done the work
79104795 78 Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
42cf5bc1 79
80 //! Returns a text defining the criterium : query :
81 //! SentCount = 0 -> "Remaining (non-sent) entities"
82 //! SentCount = 1, AtLeast = True -> "Sent entities"
83 //! SentCount = 1, AtLeast = False -> "Sent once (no duplicated)"
84 //! SentCount = 2, AtLeast = True -> "Sent several times entities"
85 //! SentCount = 2, AtLeast = False -> "Sent twice entities"
86 //! SentCount > 2, AtLeast = True -> "Sent at least <count> times entities"
87 //! SentCount > 2, AtLeast = False -> "Sent <count> times entities"
79104795 88 Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
42cf5bc1 89
90
91
92
92efcf78 93 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectSent,IFSelect_SelectExtract)
42cf5bc1 94
95protected:
96
97
98
99
100private:
101
102
103 Standard_Integer thecnt;
104 Standard_Boolean thelst;
105
106
107};
108
109
110
111
112
113
114
115#endif // _IFSelect_SelectSent_HeaderFile