SHAPER 9.16.0
SolveSpaceSolver_ParameterWrapper.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef SolveSpaceSolver_ParameterWrapper_H_
21#define SolveSpaceSolver_ParameterWrapper_H_
22
23#include <SketchSolver_IParameterWrapper.h>
24#include <SolveSpaceSolver_Solver.h>
25
30{
31public:
32 SolveSpaceSolver_ParameterWrapper(const Slvs_Param& theParam);
33
35 const Slvs_Param& parameter() const
36 { return myParameter; }
38 Slvs_Param& changeParameter()
39 { return myParameter; }
40
42 virtual ParameterID id() const;
43
45 virtual void setGroup(const GroupID& theGroup)
46 { myParameter.group = (Slvs_hGroup)theGroup; }
47
49 virtual GroupID group() const
50 { return (GroupID)myParameter.group; }
51
53 virtual void setValue(double theValue);
55 virtual double value() const;
56
58 virtual bool isEqual(const ParameterWrapperPtr& theOther);
59
62 virtual bool update(const std::shared_ptr<SketchSolver_IParameterWrapper>& theOther);
63
64private:
65 Slvs_Param myParameter;
66};
67
68#endif
Wrapper providing operations with parameters in SolveSpace.
Definition: SolveSpaceSolver_ParameterWrapper.h:30
virtual GroupID group() const
Return identifier of the group the parameter belongs to.
Definition: SolveSpaceSolver_ParameterWrapper.h:49
virtual bool update(const std::shared_ptr< SketchSolver_IParameterWrapper > &theOther)
Update value of parameter by the given one.
Definition: SolveSpaceSolver_ParameterWrapper.cpp:51
virtual bool isEqual(const ParameterWrapperPtr &theOther)
Compare current parameter with other.
Definition: SolveSpaceSolver_ParameterWrapper.cpp:44
Slvs_Param & changeParameter()
Return SolveSpace parameter to change.
Definition: SolveSpaceSolver_ParameterWrapper.h:38
virtual ParameterID id() const
Return ID of current parameter.
Definition: SolveSpaceSolver_ParameterWrapper.cpp:29
virtual double value() const
Return value of parameter.
Definition: SolveSpaceSolver_ParameterWrapper.cpp:39
virtual void setGroup(const GroupID &theGroup)
Change group for the parameter.
Definition: SolveSpaceSolver_ParameterWrapper.h:45
virtual void setValue(double theValue)
Change value of parameter.
Definition: SolveSpaceSolver_ParameterWrapper.cpp:34
const Slvs_Param & parameter() const
Return SolveSpace parameter.
Definition: SolveSpaceSolver_ParameterWrapper.h:35