ODIN
Public Member Functions | List of all members

#include <ldrnumbers.h>

Inheritance diagram for LDRnumber< T >:
Inheritance graph
[legend]

Public Member Functions

 LDRnumber ()
 
 LDRnumber (T v, const STD_string &name="")
 
 LDRnumber (const LDRnumber< T > &bi)
 
LDRnumber< T > & operator= (T v)
 
LDRnumber< T > & operator= (const LDRnumber< T > &bi)
 
LDRnumber< T > & set_minmaxval (double min, double max)
 
STD_string printvalstring (const LDRserBase *ser=0) const
 
bool parsevalstring (const STD_string &parstring, const LDRserBase *ser=0)
 
STD_string get_parx_code (parxCodeType type) const
 
double get_minval () const
 
double get_maxval () const
 
STD_string get_typeInfo (bool parx_equivtype=false) const
 
LDRbasecreate_copy () const
 
- Public Member Functions inherited from LDRbase
virtual STD_string print (const LDRserBase &serializer=LDRserJDX()) const
 
virtual STD_ostream & print2stream (STD_ostream &os, const LDRserBase &serializer) const
 
virtual int write (const STD_string &filename, const LDRserBase &serializer=LDRserJDX()) const
 
virtual bool parse (STD_string &parstring, const LDRserBase &serializer=LDRserJDX())
 
virtual int load (const STD_string &filename, const LDRserBase &serializer=LDRserJDX())
 
bool has_minmax () const
 
const STD_string & get_description () const
 
LDRbaseset_description (const STD_string &descr)
 
virtual svector get_alternatives () const
 
const STD_string & get_unit () const
 
LDRbaseset_unit (const STD_string &un)
 
virtual parameterMode get_parmode () const
 
virtual LDRbaseset_parmode (parameterMode parameter_mode)
 
virtual fileMode get_filemode () const
 
virtual LDRbaseset_filemode (fileMode file_mode)
 
virtual GuiProps get_gui_props () const
 
virtual LDRbaseset_gui_props (const GuiProps &)
 
JcampDxProps get_jdx_props () const
 
LDRbaseset_jdx_props (const JcampDxProps &jp)
 
- Public Member Functions inherited from Labeled
 Labeled (const STD_string &label="unnamed")
 
Labeledset_label (const STD_string &label)
 
const STD_string & get_label () const
 
Labeledoperator= (const Labeled &l)
 

Detailed Description

template<class T>
class LDRnumber< T >

Labeled Data Record (LDR) template class for representing built-in numbers

Definition at line 37 of file ldrnumbers.h.

Constructor & Destructor Documentation

◆ LDRnumber() [1/3]

template<class T >
LDRnumber< T >::LDRnumber ( )
inline

Default constructor

Definition at line 44 of file ldrnumbers.h.

◆ LDRnumber() [2/3]

template<class T >
LDRnumber< T >::LDRnumber ( v,
const STD_string &  name = "" 
)

Constructor with the following arguments:

  • v: Initial value for the number
  • name: The label of the parameter

◆ LDRnumber() [3/3]

template<class T >
LDRnumber< T >::LDRnumber ( const LDRnumber< T > &  bi)
inline

Copy constructor

Definition at line 57 of file ldrnumbers.h.

Member Function Documentation

◆ create_copy()

template<class T >
LDRbase* LDRnumber< T >::create_copy ( ) const
inlinevirtual

Returns a deep copy of the parameter

Implements LDRbase.

Definition at line 93 of file ldrnumbers.h.

◆ get_maxval()

template<class T >
double LDRnumber< T >::get_maxval ( ) const
inlinevirtual

Returns the maximum allowed value of the parameter Only used when editing the parameter in a GUI

Reimplemented from LDRbase.

Definition at line 91 of file ldrnumbers.h.

◆ get_minval()

template<class T >
double LDRnumber< T >::get_minval ( ) const
inlinevirtual

Returns the minimum allowed value of the parameter. Only used when editing the parameter in a GUI

Reimplemented from LDRbase.

Definition at line 90 of file ldrnumbers.h.

◆ get_parx_code()

template<class T >
STD_string LDRnumber< T >::get_parx_code ( parxCodeType  type) const
virtual

Returns C code that can be used together with the PARX(Bruker) compiler

Reimplemented from LDRbase.

◆ get_typeInfo()

template<class T >
STD_string LDRnumber< T >::get_typeInfo ( bool  parx_equivtype = false) const
inlinevirtual

Returns a string describing the type of the parameter. If 'parx_equivtype' is 'true', returns the equivalent PARX parameter type

Implements LDRbase.

Definition at line 92 of file ldrnumbers.h.

◆ operator=() [1/2]

template<class T >
LDRnumber<T>& LDRnumber< T >::operator= ( const LDRnumber< T > &  bi)

Copy assignment

◆ operator=() [2/2]

template<class T >
LDRnumber<T>& LDRnumber< T >::operator= ( v)
inline

Assignment operator from a built-in number

Definition at line 62 of file ldrnumbers.h.

◆ parsevalstring()

template<class T >
bool LDRnumber< T >::parsevalstring ( const STD_string &  ,
const LDRserBase ser = 0 
)
virtual

Parses and assigns the value in the given string, optionally using format 'ser'

Implements LDRbase.

◆ printvalstring()

template<class T >
STD_string LDRnumber< T >::printvalstring ( const LDRserBase ser = 0) const
virtual

Returns the value of the parameter as a string, optionally using format 'ser'

Implements LDRbase.

◆ set_minmaxval()

template<class T >
LDRnumber<T>& LDRnumber< T >::set_minmaxval ( double  min,
double  max 
)
inline

Specifies the minimum and maximum allowed value for this number. Only useful when editing the parameter in a GUI

Definition at line 84 of file ldrnumbers.h.


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