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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IFSelect_SelectFlag_HeaderFile
18 #define _IFSelect_SelectFlag_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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;
35 class IFSelect_SelectFlag;
36 DEFINE_STANDARD_HANDLE(IFSelect_SelectFlag, IFSelect_SelectExtract)
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
42 //! WorkSession from IFSelect defines flag "Incorrect"
43 //! Objects which control application running define some others
44 class IFSelect_SelectFlag : public IFSelect_SelectExtract
50 //! Creates a Select Flag, to query a flag designated by its name
51 Standard_EXPORT IFSelect_SelectFlag(const Standard_CString flagname);
53 //! Returns the name of the flag
54 Standard_EXPORT Standard_CString FlagName() const;
56 //! Returns the list of selected entities. It is redefined to
57 //! work on the graph itself (not queried by sort)
59 //! An entity is selected if its flag is True on Direct mode,
60 //! False on Reversed mode
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;
66 //! Returns always False because RootResult has done the work
67 Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
69 //! Returns a text defining the criterium, includes the flag name
70 Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
75 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectFlag,IFSelect_SelectExtract)
85 TCollection_AsciiString thename;
96 #endif // _IFSelect_SelectFlag_HeaderFile