Public Member Functions | List of all members
JDXnumber< T > Class Template Reference

#include <jdxnumbers.h>

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

Public Member Functions

 JDXnumber ()
 JDXnumber (T v, const STD_string &name="", bool userParameter=true, compatMode mode=notBroken, parameterMode parameter_mode=edit, const STD_string &parx_equivalent="", float parx_assign_factor=1.0, float parx_assign_offset=0.0)
 JDXnumber (const JDXnumber< T > &bi)
JDXnumber< T > & operator= (T v)
JDXnumber< T > & operator= (const JDXnumber< T > &bi)
JDXnumber< T > & set_minmaxval (double min, double max)
STD_string printvalstring () const
bool parsevalstring (const STD_string &parstring)
STD_string get_parx_code (parxCodeType type, const ParxEquiv &equiv) const
ParxEquiv get_parx_equiv () const
double get_minval () const
double get_maxval () const
const char * get_typeInfo () const
JcampDxClasscreate_copy () const
- Public Member Functions inherited from JcampDxClass
virtual STD_string print () const
virtual STD_ostream & print2stream (STD_ostream &os) const
virtual bool parse (STD_string &parstring)
virtual int load (const STD_string &filename)
virtual int write (const STD_string &filename) const
virtual JcampDxClassset_compatmode (compatMode compat_mode)
virtual compatMode get_compatmode () const
bool has_minmax () const
JcampDxClassset_userDefParameter (bool userDef)
bool isUserDefParameter () const
const STD_string & get_description () const
JcampDxClassset_description (const STD_string &descr)
virtual svector get_alternatives () const
const STD_string & get_unit () const
JcampDxClassset_unit (const STD_string &un)
virtual parameterMode get_parmode () const
virtual JcampDxClassset_parmode (parameterMode parameter_mode)
virtual fileMode get_filemode () const
virtual JcampDxClassset_filemode (fileMode file_mode)
virtual GuiProps get_gui_props () const
virtual JcampDxClassset_gui_props (const GuiProps &)
- 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 JDXnumber< T >

JCAMP-DX template class for representing built-in numbers

Definition at line 37 of file jdxnumbers.h.

Constructor & Destructor Documentation

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

Default constructor

Definition at line 44 of file jdxnumbers.h.

template<class T>
JDXnumber< T >::JDXnumber ( v,
const STD_string &  name = "",
bool  userParameter = true,
compatMode  mode = notBroken,
parameterMode  parameter_mode = edit,
const STD_string &  parx_equivalent = "",
float  parx_assign_factor = 1.0,
float  parx_assign_offset = 0.0 
)

Constructor with the following arguments:

  • v: Initial value for the number
  • name: The label of the JCAMP-DX parameter
  • userParameter: Whether this is a user defined JCAMP-DX parameter
  • mode: Mode for ASCII representation of strings or arrays of strings
  • parameter_mode: Mode for GUI accesibility of the parameter
  • parx_equivalent: Equivalent parameter in PARX to which this parameter will be assigned
  • parx_assign_factor: Scaling factor when assigning to the equivalent parameter in PARX
  • parx_assign_offset: Offset when assigning to the equivalent parameter in PARX
template<class T>
JDXnumber< T >::JDXnumber ( const JDXnumber< T > &  bi)
inline

Copy constructor

Definition at line 66 of file jdxnumbers.h.

Member Function Documentation

template<class T>
JcampDxClass* JDXnumber< T >::create_copy ( ) const
inlinevirtual

Returns a deep copy of the parameter

Implements JcampDxClass.

Definition at line 103 of file jdxnumbers.h.

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

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

Reimplemented from JcampDxClass.

Definition at line 101 of file jdxnumbers.h.

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

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

Reimplemented from JcampDxClass.

Definition at line 100 of file jdxnumbers.h.

template<class T>
STD_string JDXnumber< T >::get_parx_code ( parxCodeType  type,
const ParxEquiv equiv 
) const
virtual

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

Reimplemented from JcampDxClass.

template<class T>
ParxEquiv JDXnumber< T >::get_parx_equiv ( ) const
inlinevirtual

Returns the name and scaling of an equivalent parameter in PARX. Code for automatic mapping to the PARX parameter space can be generated using the function get_parx_code().

Reimplemented from JcampDxClass.

Definition at line 99 of file jdxnumbers.h.

template<class T>
const char* JDXnumber< T >::get_typeInfo ( ) const
inlinevirtual

Returns a string describing the type of the parameter

Implements JcampDxClass.

Definition at line 102 of file jdxnumbers.h.

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

Assignment operator from a built-in number

Definition at line 71 of file jdxnumbers.h.

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

Copy assignment

template<class T>
bool JDXnumber< T >::parsevalstring ( const STD_string &  )
virtual

Parses and assigns the value in the given string

Implements JcampDxClass.

template<class T>
STD_string JDXnumber< T >::printvalstring ( ) const
virtual

Returns the value of the parameter as a string

Implements JcampDxClass.

template<class T>
JDXnumber<T>& JDXnumber< 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 93 of file jdxnumbers.h.


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