JcampDxClass Class Reference
[JCAMP-DX implementation (odinpara library)]

#include <jdxbase.h>

Inheritance diagram for JcampDxClass:

Inheritance graph
[legend]

List of all members.

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

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 264 of file jdxbase.h.


Member Function Documentation

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 [inline, virtual]

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 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 ImageSet, JDXarray< A, J >, JcampDxBlock, Sample, OdinPulse, JDXarray< tjarray, JDXnumber< double > >, JDXarray< tjarray, JDXnumber< int > >, JDXarray< tjarray, JDXnumber >, and JDXarray< tjarray, JDXstring >.

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 JDXarray< A, J >, JcampDxBlock, OdinPulse, JDXarray< tjarray, JDXnumber< double > >, JDXarray< tjarray, JDXnumber< int > >, JDXarray< tjarray, JDXnumber >, and JDXarray< tjarray, JDXstring >.

virtual bool JcampDxClass::parsevalstring ( const STD_string &   )  [pure virtual]

virtual STD_string JcampDxClass::printvalstring (  )  const [pure virtual]

virtual JcampDxClass& JcampDxClass::set_compatmode ( compatMode  compat_mode  )  [inline, virtual]

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

Reimplemented in JcampDxBlock.

Definition at line 334 of file jdxbase.h.

virtual compatMode JcampDxClass::get_compatmode (  )  const [inline, virtual]

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

Definition at line 340 of file jdxbase.h.

virtual const char* JcampDxClass::get_typeInfo (  )  const [pure virtual]

virtual double JcampDxClass::get_minval (  )  const [inline, virtual]

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 353 of file jdxbase.h.

virtual double JcampDxClass::get_maxval (  )  const [inline, virtual]

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 360 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 366 of file jdxbase.h.

virtual JcampDxClass* JcampDxClass::create_copy (  )  const [pure virtual]

JcampDxClass& JcampDxClass::set_userDefParameter ( bool  userDef  )  [inline]

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

Definition at line 380 of file jdxbase.h.

bool JcampDxClass::isUserDefParameter (  )  const [inline]

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

Definition at line 387 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 394 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 400 of file jdxbase.h.

virtual svector JcampDxClass::get_alternatives (  )  const [inline, virtual]

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

Reimplemented in JDXenum.

Definition at line 406 of file jdxbase.h.

const STD_string& JcampDxClass::get_unit (  )  const [inline]

Returns the physical unit of the parameter

Definition at line 413 of file jdxbase.h.

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

Sets the physical unit of the parameter

Definition at line 419 of file jdxbase.h.

virtual parameterMode JcampDxClass::get_parmode (  )  const [inline, virtual]

Returns the parameterMode

Definition at line 426 of file jdxbase.h.

virtual JcampDxClass& JcampDxClass::set_parmode ( parameterMode  parameter_mode  )  [inline, virtual]

Sets the parameterMode

Reimplemented in JcampDxBlock.

Definition at line 432 of file jdxbase.h.

virtual fileMode JcampDxClass::get_filemode (  )  const [inline, virtual]

Returns the fileMode

Definition at line 438 of file jdxbase.h.

virtual JcampDxClass& JcampDxClass::set_filemode ( fileMode  file_mode  )  [inline, virtual]

Sets the fileMode

Reimplemented in JcampDxBlock.

Definition at line 444 of file jdxbase.h.

virtual GuiProps JcampDxClass::get_gui_props (  )  const [inline, virtual]

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

Reimplemented in JDXarray< A, J >, JDXarray< tjarray, JDXnumber< double > >, JDXarray< tjarray, JDXnumber< int > >, JDXarray< tjarray, JDXnumber >, and JDXarray< tjarray, JDXstring >.

Definition at line 452 of file jdxbase.h.

virtual JcampDxClass& JcampDxClass::set_gui_props ( const GuiProps  )  [inline, virtual]

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

Reimplemented in JDXarray< A, J >, JDXarray< tjarray, JDXnumber< double > >, JDXarray< tjarray, JDXnumber< int > >, JDXarray< tjarray, JDXnumber >, and JDXarray< tjarray, JDXstring >.

Definition at line 458 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 [inline, virtual]

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 JDXarray< A, J >, JDXnumber< T >, JDXstring, JDXbool, JDXenum, JDXarray< tjarray, JDXnumber< double > >, JDXarray< tjarray, JDXnumber< int > >, JDXarray< tjarray, JDXnumber >, JDXarray< tjarray, JDXstring >, JDXnumber< double >, JDXnumber< float >, and JDXnumber< int >.

Definition at line 474 of file jdxbase.h.


Friends And Related Function Documentation

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

Stream operator

Definition at line 284 of file jdxbase.h.


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

Generated on Wed Sep 30 15:33:06 2009 by  doxygen 1.5.6