42cf5bc1 |
1 | // Created on: 1994-05-31 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1994-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 _IGESSelect_SelectName_HeaderFile |
18 | #define _IGESSelect_SelectName_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <IFSelect_SelectExtract.hxx> |
24 | #include <Standard_Boolean.hxx> |
25 | #include <Standard_Integer.hxx> |
26 | class TCollection_HAsciiString; |
27 | class Standard_Transient; |
28 | class Interface_InterfaceModel; |
29 | class TCollection_AsciiString; |
30 | |
31 | |
32 | class IGESSelect_SelectName; |
33 | DEFINE_STANDARD_HANDLE(IGESSelect_SelectName, IFSelect_SelectExtract) |
34 | |
35 | //! Selects Entities which have a given name. |
36 | //! Consider Property Name if present, else Short Label, but |
37 | //! not the Subscript Number |
38 | //! First version : keeps exact name |
39 | //! Later : regular expression |
40 | class IGESSelect_SelectName : public IFSelect_SelectExtract |
41 | { |
42 | |
43 | public: |
44 | |
45 | |
46 | //! Creates an empty SelectName : every entity is considered |
47 | //! good (no filter active) |
48 | Standard_EXPORT IGESSelect_SelectName(); |
49 | |
50 | //! Returns True if Name of Entity complies with Name Filter |
79104795 |
51 | Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; |
42cf5bc1 |
52 | |
53 | //! Sets a Name as a criterium : IGES Entities which have this name |
54 | //! are kept (without regular expression, there should be at most |
55 | //! one). <name> can be regarded as a Text Parameter |
56 | Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& name); |
57 | |
58 | //! Returns the Name used as Filter |
59 | Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; |
60 | |
61 | //! Returns the Selection criterium : "IGES Entity, Name : <name>" |
79104795 |
62 | Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE; |
42cf5bc1 |
63 | |
64 | |
65 | |
66 | |
92efcf78 |
67 | DEFINE_STANDARD_RTTIEXT(IGESSelect_SelectName,IFSelect_SelectExtract) |
42cf5bc1 |
68 | |
69 | protected: |
70 | |
71 | |
72 | |
73 | |
74 | private: |
75 | |
76 | |
77 | Handle(TCollection_HAsciiString) thename; |
78 | |
79 | |
80 | }; |
81 | |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | #endif // _IGESSelect_SelectName_HeaderFile |