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

#include <jdxtypes.h>

Inheritance diagram for JDXenum:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 JDXenum ()
 JDXenum (const STD_string &first_entry, const STD_string &name="", bool userParameter=true, compatMode mode=notBroken, parameterMode parameter_mode=edit, const STD_string &parx_equivalent="")
 JDXenum (const JDXenum &je)
JDXenumoperator= (const char *item)
JDXenumoperator= (const STD_string &item)
JDXenumoperator= (int item)
JDXenumoperator= (const JDXenum &je)
JDXenumadd_item (const STD_string &item, int index=-1)
JDXenumset_actual (const STD_string &item)
JDXenumset_actual (int index)
JDXenumclear ()
 operator int () const
 operator STD_string () const
bool operator== (const STD_string &s) const
bool operator== (const char *s) const
bool operator== (int i) const
bool operator!= (const STD_string &s) const
bool operator!= (const char *s) const
bool operator!= (int i) const
unsigned int n_items () const
const STD_string & get_item (unsigned int index) const
unsigned int get_item_index () const
JDXenumset_item_index (unsigned int index)
bool parsevalstring (const STD_string &parstring)
STD_string printvalstring () const
svector get_alternatives () const
STD_string get_parx_code (parxCodeType type, const ParxEquiv &equiv) const
ParxEquiv get_parx_equiv () const
const char * get_typeInfo () const
JcampDxClasscreate_copy () const


Detailed Description

JCAMP-DX class to represent enumerations

Definition at line 187 of file jdxtypes.h.


Constructor & Destructor Documentation

JDXenum::JDXenum (  )  [inline]

Default constructor

Definition at line 194 of file jdxtypes.h.

JDXenum::JDXenum ( const STD_string &  first_entry,
const STD_string &  name = "",
bool  userParameter = true,
compatMode  mode = notBroken,
parameterMode  parameter_mode = edit,
const STD_string &  parx_equivalent = "" 
)

Constructor with the following arguments:

  • first_entry: Initial value for the first entry of the enumeration
  • 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

JDXenum::JDXenum ( const JDXenum je  )  [inline]

Copy constructor

Definition at line 212 of file jdxtypes.h.


Member Function Documentation

JDXenum& JDXenum::operator= ( const char *  item  )  [inline]

Sets the current value of the enumeration to the given item

Definition at line 218 of file jdxtypes.h.

JDXenum& JDXenum::operator= ( const STD_string &  item  )  [inline]

Sets the current value of the enumeration to the given item

Definition at line 223 of file jdxtypes.h.

JDXenum& JDXenum::operator= ( int  item  )  [inline]

Sets the current value of the enumeration to the given item

Definition at line 228 of file jdxtypes.h.

JDXenum& JDXenum::operator= ( const JDXenum je  ) 

Assignment operator

JDXenum& JDXenum::add_item ( const STD_string &  item,
int  index = -1 
)

Appends an item to the the list of items in the enumeration. If index is non-negative, the item will be inserted at the position indicated by index.

JDXenum& JDXenum::set_actual ( const STD_string &  item  ) 

Sets the current value of the enumeration to the given item

JDXenum& JDXenum::set_actual ( int  index  ) 

Sets the current value of the enumeration to the given item

JDXenum& JDXenum::clear (  ) 

Clears the list of items in the enumeration

JDXenum::operator int (  )  const

type conversion operator of the current value of the enumeration

JDXenum::operator STD_string (  )  const

type conversion operator of the current value of the enumeration

bool JDXenum::operator== ( const STD_string &  s  )  const [inline]

Compares the current value with s for equality

Definition at line 270 of file jdxtypes.h.

bool JDXenum::operator== ( const char *  s  )  const [inline]

Compares the current value with s for equality

Definition at line 275 of file jdxtypes.h.

bool JDXenum::operator== ( int  i  )  const [inline]

Compares the current index with i for equality

Definition at line 280 of file jdxtypes.h.

bool JDXenum::operator!= ( const STD_string &  s  )  const [inline]

Compares the current value with s for inequality

Definition at line 285 of file jdxtypes.h.

bool JDXenum::operator!= ( const char *  s  )  const [inline]

Compares the current value with s for inequality

Definition at line 290 of file jdxtypes.h.

bool JDXenum::operator!= ( int  i  )  const [inline]

Compares the current index with i for inequality

Definition at line 295 of file jdxtypes.h.

unsigned int JDXenum::n_items (  )  const [inline]

Returns the number of items in the enumeration

Definition at line 301 of file jdxtypes.h.

const STD_string& JDXenum::get_item ( unsigned int  index  )  const

Returns the item at the position 'index' in the label-index map

unsigned int JDXenum::get_item_index (  )  const

Returns the current position in the label-index map

JDXenum& JDXenum::set_item_index ( unsigned int  index  ) 

Sets the current position 'index' in the label-index map

bool JDXenum::parsevalstring ( const STD_string &   )  [virtual]

Parses and assigns the value in the given string

Implements JcampDxClass.

STD_string JDXenum::printvalstring (  )  const [virtual]

Returns the value of the parameter as a string

Implements JcampDxClass.

svector JDXenum::get_alternatives (  )  const [virtual]

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

Reimplemented from JcampDxClass.

STD_string JDXenum::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.

ParxEquiv JDXenum::get_parx_equiv (  )  const [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 from JcampDxClass.

const char* JDXenum::get_typeInfo (  )  const [inline, virtual]

Returns a string describing the type of the parameter

Implements JcampDxClass.

Definition at line 325 of file jdxtypes.h.

JcampDxClass* JDXenum::create_copy (  )  const [inline, virtual]

Returns a deep copy of the parameter

Implements JcampDxClass.

Definition at line 326 of file jdxtypes.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