1 // Created on: 1994-06-01
2 // Created by: Modelistation
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_SetGlobalParameter_HeaderFile
18 #define _IGESSelect_SetGlobalParameter_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <IGESSelect_ModelModifier.hxx>
25 class TCollection_HAsciiString;
26 class IFSelect_ContextModif;
27 class IGESData_IGESModel;
28 class Interface_CopyTool;
29 class TCollection_AsciiString;
32 class IGESSelect_SetGlobalParameter;
33 DEFINE_STANDARD_HANDLE(IGESSelect_SetGlobalParameter, IGESSelect_ModelModifier)
35 //! Sets a Global (Header) Parameter to a new value, directly given
36 //! Controls the form of the parameter (Integer, Real, String
37 //! with such or such form), but not the consistence of the new
38 //! value regarding the rest of the file.
40 //! The new value is given under the form of a HAsciiString, even
41 //! for Integer or Real values. For String values, Hollerith forms
42 //! are accepted but not mandatory
43 //! Warning : a Null (not set) value is not accepted. For an empty string,
44 //! give a Text Parameter which is empty
45 class IGESSelect_SetGlobalParameter : public IGESSelect_ModelModifier
51 //! Creates an SetGlobalParameter, to be applied on Global
52 //! Parameter <numpar>
53 Standard_EXPORT IGESSelect_SetGlobalParameter(const Standard_Integer numpar);
55 //! Returns the global parameter number to which this modifiers
57 Standard_EXPORT Standard_Integer GlobalNumber() const;
59 //! Sets a Text Parameter for the new value
60 Standard_EXPORT void SetValue (const Handle(TCollection_HAsciiString)& text);
62 //! Returns the value to set to the global parameter (Text Param)
63 Standard_EXPORT Handle(TCollection_HAsciiString) Value() const;
65 //! Specific action : only <target> is used : the form of the new
66 //! value is checked regarding the parameter number (given at
68 Standard_EXPORT void Performing (IFSelect_ContextModif& ctx, const Handle(IGESData_IGESModel)& target, Interface_CopyTool& TC) const Standard_OVERRIDE;
70 //! Returns a text which is
71 //! "Sets Global Parameter <numpar> to <new value>"
72 Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
77 DEFINE_STANDARD_RTTIEXT(IGESSelect_SetGlobalParameter,IGESSelect_ModelModifier)
87 Standard_Integer thenum;
88 Handle(TCollection_HAsciiString) theval;
99 #endif // _IGESSelect_SetGlobalParameter_HeaderFile