Public Member Functions | Friends | List of all members
JcampDxClass Class Reference

#include <jdxbase.h>

Inheritance diagram for JcampDxClass:
Inheritance graph
[legend]

Public Member Functions

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 bool parsevalstring (const STD_string &)=0
virtual STD_string printvalstring () const =0
virtual JcampDxClassset_compatmode (compatMode compat_mode)
virtual compatMode get_compatmode () const
virtual const char * get_typeInfo () const =0
virtual double get_minval () const
virtual double get_maxval () const
bool has_minmax () const
virtual JcampDxClasscreate_copy () const =0
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 &)
virtual STD_string get_parx_code (parxCodeType type, const ParxEquiv &equiv=ParxEquiv()) const
virtual ParxEquiv get_parx_equiv () const
- 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)

Friends

class JDXwidget
class JcampDxBlock
STD_ostream & operator<< (STD_ostream &s, const JcampDxClass &value)

Detailed Description

This is the (virtual) base class that carries the JcampDx specific interface, i.e. all common functions that are specific to JcampDx. Most of the elements show a simple default behaviour that will be overwritten by a reasonable behaviour in the derived classes.

Definition at line 268 of file jdxbase.h.

Member Function Documentation

virtual JcampDxClass* JcampDxClass::create_copy ( ) const
pure virtual
virtual svector JcampDxClass::get_alternatives ( ) const
inlinevirtual

Returns possible alternative values of the parameter, i.e. the item strings of an enum

Reimplemented in JDXenum.

Definition at line 410 of file jdxbase.h.

virtual compatMode JcampDxClass::get_compatmode ( ) const
inlinevirtual

Returns the compatability mode. See the documentation to 'compatMode'

Definition at line 344 of file jdxbase.h.

const STD_string& JcampDxClass::get_description ( ) const
inline

Returns the description of the parameter, used in the text of tooltips in a GUI

Definition at line 398 of file jdxbase.h.

virtual fileMode JcampDxClass::get_filemode ( ) const
inlinevirtual

Returns the fileMode

Definition at line 442 of file jdxbase.h.

virtual GuiProps JcampDxClass::get_gui_props ( ) const
inlinevirtual

Returns the properties of axis display in the GUI, only useful for JDXarrays

Reimplemented in JDXarray< A, J >, JDXarray< farray, JDXfloat >, JDXarray< sarray, JDXstring >, JDXarray< darray, JDXdouble >, JDXarray< iarray, JDXint >, and JDXarray< carray, JDXcomplex >.

Definition at line 456 of file jdxbase.h.

virtual double JcampDxClass::get_maxval ( ) const
inlinevirtual

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

Reimplemented in JDXnumber< T >, JDXnumber< double >, JDXnumber< float >, and JDXnumber< int >.

Definition at line 364 of file jdxbase.h.

virtual double JcampDxClass::get_minval ( ) const
inlinevirtual

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

Reimplemented in JDXnumber< T >, JDXnumber< double >, JDXnumber< float >, and JDXnumber< int >.

Definition at line 357 of file jdxbase.h.

virtual parameterMode JcampDxClass::get_parmode ( ) const
inlinevirtual

Returns the parameterMode

Definition at line 430 of file jdxbase.h.

virtual STD_string JcampDxClass::get_parx_code ( parxCodeType  type,
const ParxEquiv equiv = ParxEquiv() 
) const
virtual
virtual ParxEquiv JcampDxClass::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 in JDXenum, JDXbool, JDXnumber< T >, JDXstring, JDXnumber< double >, JDXnumber< float >, JDXnumber< int >, JDXarray< A, J >, JDXarray< farray, JDXfloat >, JDXarray< sarray, JDXstring >, JDXarray< darray, JDXdouble >, JDXarray< iarray, JDXint >, and JDXarray< carray, JDXcomplex >.

Definition at line 478 of file jdxbase.h.

virtual const char* JcampDxClass::get_typeInfo ( ) const
pure virtual
const STD_string& JcampDxClass::get_unit ( ) const
inline

Returns the physical unit of the parameter

Definition at line 417 of file jdxbase.h.

bool JcampDxClass::has_minmax ( ) const
inline

Returns whether the paramerer has a valid interval of allowed values. Only used when editing the parameter in a GUI

Definition at line 370 of file jdxbase.h.

bool JcampDxClass::isUserDefParameter ( ) const
inline

Returns whether the parameter is user defined, see [1,2] for details.

Definition at line 391 of file jdxbase.h.

virtual int JcampDxClass::load ( const STD_string &  filename)
virtual

Loads the parameter(s) from a JCAMP-DX file. In case of calling this function of a single paramter, the file is searched for this parameter and the value is assigned. In case of a parameter block, all parameter values are taken from the file. The return value is the number of parameters which are successfully parsed. If an error occurs, -1 is returned.

Reimplemented in OdinPulse, JcampDxBlock, Sample, ImageSet, JDXarray< A, J >, JDXarray< farray, JDXfloat >, JDXarray< sarray, JDXstring >, JDXarray< darray, JDXdouble >, JDXarray< iarray, JDXint >, and JDXarray< carray, JDXcomplex >.

virtual bool JcampDxClass::parse ( STD_string &  parstring)
virtual

Parses the JCAMP-DX parameter. Except for blocks, this is done by stripping the label (e.g. "##$MyParameter=" ) from the string and passing the result to the function 'parsevalstring' of the underlying data type. For blocks, a re-implemented 'parse' function is called. Returns 'true' if the parameter was parsed successfully.

Reimplemented in JcampDxBlock.

virtual bool JcampDxClass::parsevalstring ( const STD_string &  )
pure virtual
virtual STD_string JcampDxClass::print ( ) const
virtual

This function returns the parameter in JcampDx-ASCII-format

Reimplemented in JcampDxBlock.

virtual STD_ostream& JcampDxClass::print2stream ( STD_ostream &  os) const
inlinevirtual
virtual STD_string JcampDxClass::printvalstring ( ) const
pure virtual
virtual JcampDxClass& JcampDxClass::set_compatmode ( compatMode  compat_mode)
inlinevirtual

Sets the compatability mode. See the documentation to 'compatMode'

Reimplemented in JcampDxBlock.

Definition at line 338 of file jdxbase.h.

JcampDxClass& JcampDxClass::set_description ( const STD_string &  descr)
inline

Sets the description of the parameter, used in the text of tooltips in a GUI

Definition at line 404 of file jdxbase.h.

virtual JcampDxClass& JcampDxClass::set_filemode ( fileMode  file_mode)
inlinevirtual

Sets the fileMode

Reimplemented in JcampDxBlock.

Definition at line 448 of file jdxbase.h.

virtual JcampDxClass& JcampDxClass::set_gui_props ( const GuiProps )
inlinevirtual

Sets the properties of axis display in the GUI, only useful for JDXarrays

Reimplemented in JDXarray< A, J >, JDXarray< farray, JDXfloat >, JDXarray< sarray, JDXstring >, JDXarray< darray, JDXdouble >, JDXarray< iarray, JDXint >, and JDXarray< carray, JDXcomplex >.

Definition at line 462 of file jdxbase.h.

virtual JcampDxClass& JcampDxClass::set_parmode ( parameterMode  parameter_mode)
inlinevirtual

Sets the parameterMode

Reimplemented in JcampDxBlock.

Definition at line 436 of file jdxbase.h.

JcampDxClass& JcampDxClass::set_unit ( const STD_string &  un)
inline

Sets the physical unit of the parameter

Definition at line 423 of file jdxbase.h.

JcampDxClass& JcampDxClass::set_userDefParameter ( bool  userDef)
inline

Determines whether the parameter is user defined, see [1,2] for details.

Definition at line 384 of file jdxbase.h.

virtual int JcampDxClass::write ( const STD_string &  filename) const
virtual

Writes the parameter(s) to a JCAMP-DX file. In case of calling this function of a single paramter, the file will consist of only this parameter. In case of a parameter block, all parameter values are written to the file. If an error occurs, -1 is returned.

Reimplemented in OdinPulse, JcampDxBlock, JDXarray< A, J >, JDXarray< farray, JDXfloat >, JDXarray< sarray, JDXstring >, JDXarray< darray, JDXdouble >, JDXarray< iarray, JDXint >, and JDXarray< carray, JDXcomplex >.

Friends And Related Function Documentation

STD_ostream& operator<< ( STD_ostream &  s,
const JcampDxClass value 
)
friend

Stream operator

Definition at line 288 of file jdxbase.h.


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