42cf5bc1 |
1 | // Created on: 1994-08-25 |
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_ChangeLevelNumber_HeaderFile |
18 | #define _IGESSelect_ChangeLevelNumber_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <IGESSelect_ModelModifier.hxx> |
24 | #include <Standard_Boolean.hxx> |
25 | class IFSelect_IntParam; |
26 | class IFSelect_ContextModif; |
27 | class IGESData_IGESModel; |
28 | class Interface_CopyTool; |
29 | class TCollection_AsciiString; |
30 | |
31 | |
32 | class IGESSelect_ChangeLevelNumber; |
33 | DEFINE_STANDARD_HANDLE(IGESSelect_ChangeLevelNumber, IGESSelect_ModelModifier) |
34 | |
35 | //! Changes Level Number (as null or single) to a new single value |
36 | //! Entities attached to a LevelListEntity are ignored |
37 | //! Entities considered can be, either all Entities but those |
38 | //! attached to a LevelListEntity, or Entities attached to a |
39 | //! specific Level Number (0 for not defined). |
40 | //! |
41 | //! Remark : this concerns the Directory Part only. The Level List |
42 | //! Entities themselves (their content) are not affected. |
43 | class IGESSelect_ChangeLevelNumber : public IGESSelect_ModelModifier |
44 | { |
45 | |
46 | public: |
47 | |
48 | |
49 | //! Creates a ChangeLevelNumber, not yet defined |
50 | //! (see SetOldNumber and SetNewNumber) |
51 | Standard_EXPORT IGESSelect_ChangeLevelNumber(); |
52 | |
53 | //! Returns True if OldNumber is defined : then, only entities |
54 | //! attached to the value of OldNumber will be considered. Else, |
55 | //! all entities but those attached to a Level List will be. |
56 | Standard_EXPORT Standard_Boolean HasOldNumber() const; |
57 | |
58 | //! Returns the parameter for OldNumber. If not defined (Null |
59 | //! Handle), it will be interpreted as "all level numbers" |
60 | Standard_EXPORT Handle(IFSelect_IntParam) OldNumber() const; |
61 | |
62 | //! Sets a parameter for OldNumber |
63 | Standard_EXPORT void SetOldNumber (const Handle(IFSelect_IntParam)& param); |
64 | |
65 | //! Returns the parameter for NewNumber. If not defined (Null |
66 | //! Handle), it will be interpreted as "new value 0" |
67 | Standard_EXPORT Handle(IFSelect_IntParam) NewNumber() const; |
68 | |
69 | //! Sets a parameter for NewNumber |
70 | Standard_EXPORT void SetNewNumber (const Handle(IFSelect_IntParam)& param); |
71 | |
72 | //! Specific action : considers selected target entities : |
73 | //! If OldNumber is not defined, all entities but those attached |
74 | //! to a Level List |
75 | //! If OldNumber is defined (value not negative), entities with a |
76 | //! defined Level Number (can be zero) |
77 | //! Attaches all these entities to value given by NewNumber, or |
78 | //! zero if not defined |
79104795 |
79 | Standard_EXPORT void Performing (IFSelect_ContextModif& ctx, const Handle(IGESData_IGESModel)& target, Interface_CopyTool& TC) const Standard_OVERRIDE; |
42cf5bc1 |
80 | |
81 | //! Returns a text which is |
82 | //! "Changes Level Number <old> to <new>" , or |
83 | //! "Changes all Levels Numbers positive and zero to <new>" |
79104795 |
84 | Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; |
42cf5bc1 |
85 | |
86 | |
87 | |
88 | |
92efcf78 |
89 | DEFINE_STANDARD_RTTIEXT(IGESSelect_ChangeLevelNumber,IGESSelect_ModelModifier) |
42cf5bc1 |
90 | |
91 | protected: |
92 | |
93 | |
94 | |
95 | |
96 | private: |
97 | |
98 | |
99 | Handle(IFSelect_IntParam) theold; |
100 | Handle(IFSelect_IntParam) thenew; |
101 | |
102 | |
103 | }; |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | #endif // _IGESSelect_ChangeLevelNumber_HeaderFile |