42cf5bc1 |
1 | // Created on: 1995-09-05 |
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_SelectFlag_HeaderFile |
18 | #define _IFSelect_SelectFlag_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <TCollection_AsciiString.hxx> |
24 | #include <IFSelect_SelectExtract.hxx> |
25 | #include <Standard_CString.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <Standard_Integer.hxx> |
28 | class Interface_EntityIterator; |
29 | class Interface_Graph; |
30 | class Standard_Transient; |
31 | class Interface_InterfaceModel; |
32 | class TCollection_AsciiString; |
33 | |
34 | |
35 | class IFSelect_SelectFlag; |
36 | DEFINE_STANDARD_HANDLE(IFSelect_SelectFlag, IFSelect_SelectExtract) |
37 | |
38 | //! A SelectFlag queries a flag noted in the bitmap of the Graph. |
39 | //! The Flag is designated by its Name. Flag Names are defined |
40 | //! by Work Session and, as necessary, other functional objects |
41 | //! |
42 | //! WorkSession from IFSelect defines flag "Incorrect" |
43 | //! Objects which control application running define some others |
44 | class IFSelect_SelectFlag : public IFSelect_SelectExtract |
45 | { |
46 | |
47 | public: |
48 | |
49 | |
50 | //! Creates a Select Flag, to query a flag designated by its name |
51 | Standard_EXPORT IFSelect_SelectFlag(const Standard_CString flagname); |
52 | |
53 | //! Returns the name of the flag |
54 | Standard_EXPORT Standard_CString FlagName() const; |
55 | |
56 | //! Returns the list of selected entities. It is redefined to |
57 | //! work on the graph itself (not queried by sort) |
58 | //! |
59 | //! An entity is selected if its flag is True on Direct mode, |
60 | //! False on Reversed mode |
61 | //! |
62 | //! If flag does not exist for the given name, returns an empty |
63 | //! result, whatever the Direct/Reversed sense |
64 | Standard_EXPORT virtual Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE; |
65 | |
66 | //! Returns always False because RootResult has done the work |
79104795 |
67 | Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; |
42cf5bc1 |
68 | |
69 | //! Returns a text defining the criterium, includes the flag name |
79104795 |
70 | Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE; |
42cf5bc1 |
71 | |
72 | |
73 | |
74 | |
92efcf78 |
75 | DEFINE_STANDARD_RTTIEXT(IFSelect_SelectFlag,IFSelect_SelectExtract) |
42cf5bc1 |
76 | |
77 | protected: |
78 | |
79 | |
80 | |
81 | |
82 | private: |
83 | |
84 | |
85 | TCollection_AsciiString thename; |
86 | |
87 | |
88 | }; |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | #endif // _IFSelect_SelectFlag_HeaderFile |