Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-11 09:18:10

0001 // Created on: 1994-06-01
0002 // Created by: Modelistation
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESSelect_SetGlobalParameter_HeaderFile
0018 #define _IGESSelect_SetGlobalParameter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <IGESSelect_ModelModifier.hxx>
0025 class TCollection_HAsciiString;
0026 class IFSelect_ContextModif;
0027 class IGESData_IGESModel;
0028 class Interface_CopyTool;
0029 class TCollection_AsciiString;
0030 
0031 //! Sets a Global (Header) Parameter to a new value, directly given
0032 //! Controls the form of the parameter (Integer, Real, String
0033 //! with such or such form), but not the consistence of the new
0034 //! value regarding the rest of the file.
0035 //!
0036 //! The new value is given under the form of a HAsciiString, even
0037 //! for Integer or Real values. For String values, Hollerith forms
0038 //! are accepted but not mandatory
0039 //! Warning : a Null (not set) value is not accepted. For an empty string,
0040 //! give a Text Parameter which is empty
0041 class IGESSelect_SetGlobalParameter : public IGESSelect_ModelModifier
0042 {
0043 
0044 public:
0045   //! Creates an SetGlobalParameter, to be applied on Global
0046   //! Parameter <numpar>
0047   Standard_EXPORT IGESSelect_SetGlobalParameter(const int numpar);
0048 
0049   //! Returns the global parameter number to which this modifiers
0050   //! applies
0051   Standard_EXPORT int GlobalNumber() const;
0052 
0053   //! Sets a Text Parameter for the new value
0054   Standard_EXPORT void SetValue(const occ::handle<TCollection_HAsciiString>& text);
0055 
0056   //! Returns the value to set to the global parameter (Text Param)
0057   Standard_EXPORT occ::handle<TCollection_HAsciiString> Value() const;
0058 
0059   //! Specific action : only <target> is used : the form of the new
0060   //! value is checked regarding the parameter number (given at
0061   //! creation time).
0062   Standard_EXPORT void Performing(IFSelect_ContextModif&                 ctx,
0063                                   const occ::handle<IGESData_IGESModel>& target,
0064                                   Interface_CopyTool&                    TC) const override;
0065 
0066   //! Returns a text which is
0067   //! "Sets Global Parameter <numpar> to <new value>"
0068   Standard_EXPORT TCollection_AsciiString Label() const override;
0069 
0070   DEFINE_STANDARD_RTTIEXT(IGESSelect_SetGlobalParameter, IGESSelect_ModelModifier)
0071 
0072 private:
0073   int                                   thenum;
0074   occ::handle<TCollection_HAsciiString> theval;
0075 };
0076 
0077 #endif // _IGESSelect_SetGlobalParameter_HeaderFile