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
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 _IGESSelect_ChangeLevelNumber_HeaderFile
18 #define _IGESSelect_ChangeLevelNumber_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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;
32 class IGESSelect_ChangeLevelNumber;
33 DEFINE_STANDARD_HANDLE(IGESSelect_ChangeLevelNumber, IGESSelect_ModelModifier)
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).
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
49 //! Creates a ChangeLevelNumber, not yet defined
50 //! (see SetOldNumber and SetNewNumber)
51 Standard_EXPORT IGESSelect_ChangeLevelNumber();
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;
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;
62 //! Sets a parameter for OldNumber
63 Standard_EXPORT void SetOldNumber (const Handle(IFSelect_IntParam)& param);
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;
69 //! Sets a parameter for NewNumber
70 Standard_EXPORT void SetNewNumber (const Handle(IFSelect_IntParam)& param);
72 //! Specific action : considers selected target entities :
73 //! If OldNumber is not defined, all entities but those attached
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
79 Standard_EXPORT void Performing (IFSelect_ContextModif& ctx, const Handle(IGESData_IGESModel)& target, Interface_CopyTool& TC) const Standard_OVERRIDE;
81 //! Returns a text which is
82 //! "Changes Level Number <old> to <new>" , or
83 //! "Changes all Levels Numbers positive and zero to <new>"
84 Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
89 DEFINE_STANDARD_RTTIEXT(IGESSelect_ChangeLevelNumber,IGESSelect_ModelModifier)
99 Handle(IFSelect_IntParam) theold;
100 Handle(IFSelect_IntParam) thenew;
111 #endif // _IGESSelect_ChangeLevelNumber_HeaderFile