BornAgain  1.18.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
 
void setValue (double value)
 Sets value of wrapped parameter and emit signal.
 
double value () const
 Returns value of wrapped parameter.
 
RealParametersetLimits (const RealLimits &limits)
 
RealLimits limits () const
 
RealParametersetLimited (double lower, double upper)
 
RealParametersetPositive ()
 
RealParametersetNonnegative ()
 
RealParametersetUnit (const std::string &name)
 
std::string unit () const
 
- Public Member Functions inherited from IParameter< double >
 IParameter (const std::string &name, double *data, const std::string &parent_name, const std::function< void()> &onChange)
 
virtual bool isNull () const
 Returns true if wrapped parameter was not initialized with proper real value.
 
double & getData () const
 
void setData (double &data)
 
bool hasSameData (const IParameter &other)
 Returns true if two parameters are pointing to the same raw data.
 
const std::string & getName () const
 

Protected Attributes

RealLimits m_limits
 
Attributes m_attr
 
Unit m_unit
 
- Protected Attributes inherited from IParameter< double >
const std::string m_name
 
double * m_data
 
const std::string m_parent_name
 
const std::function< void()> m_onChange
 

Additional Inherited Members

- Protected Member Functions inherited from IParameter< double >
std::string fullName () const
 For use in error messages.
 

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.

Definition at line 31 of file RealParameter.h.


The documentation for this class was generated from the following files: