BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RealParameter Class Reference

Wraps a parameter of type double. More...

+ Inheritance diagram for RealParameter:

Public Member Functions

 RealParameter (const std::string &name, double *par, const std::string &parent_name="", const std::function< void()> &onChange=std::function< void()>(), const RealLimits &limits=RealLimits::limitless(), const Attributes &attr=Attributes::free())
 
RealParameterclone (const std::string &new_name="") const
 
RealLimits limits () const
 
RealParametersetLimited (double lower, double upper)
 
RealParametersetLimits (const RealLimits &limits)
 
RealParametersetNonnegative ()
 
RealParametersetPositive ()
 
RealParametersetUnit (const std::string &name)
 
void setValue (double value)
 Sets value of wrapped parameter and emit signal.
 
std::string unit () const
 
double value () const
 Returns value of wrapped parameter.
 

Protected Attributes

Attributes m_attr
 
RealLimits m_limits
 
Unit m_unit
 

Detailed Description

Wraps a parameter of type double.

In addition to name and on-change callback held by the parent class IParameter, this class holds Limits, Attributes (currently only fixed or not), and a Unit.