Public Member Functions | List of all members

#include <jdxtypes.h>

Inheritance diagram for JDXenum:
Inheritance graph
[legend]

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
- 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
virtual double get_minval () const
virtual double get_maxval () const
bool has_minmax () const
JcampDxClassset_userDefParameter (bool userDef)
bool isUserDefParameter () const
const STD_string & get_description () const
JcampDxClassset_description (const STD_string &descr)
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

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::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::clear ( )

Clears the list of items in the enumeration

JcampDxClass* JDXenum::create_copy ( ) const
inlinevirtual

Returns a deep copy of the parameter

Implements JcampDxClass.

Definition at line 326 of file jdxtypes.h.

svector JDXenum::get_alternatives ( ) const
virtual

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

Reimplemented from JcampDxClass.

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

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
inlinevirtual

Returns a string describing the type of the parameter

Implements JcampDxClass.

Definition at line 325 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.

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 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.

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

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

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::set_item_index ( unsigned int  index)

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


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