8#ifndef __CHOICE_LIST_H_
9#define __CHOICE_LIST_H_
26 char *choiceString[64];
33 choiceString[0] =
new char[strlen(choice0) + 1];
34 strcpy(choiceString[0], choice0);
35 choiceNo[0] = choiceNo0;
39 int add(
const char *choice,
int number)
46 choiceString[numChoices] =
new char[strlen(choice) + 1];
47 strcpy(choiceString[numChoices], choice);
48 choiceNo[numChoices] = number;
55 int change(
const char *newchoice,
int number)
57 delete[] choiceString[number];
58 choiceString[number] =
new char[strlen(newchoice) + 1];
59 strcpy(choiceString[number], newchoice);
64 return choiceNo[choice];
69 return choiceString[choice];
85std::ostream &
operator<<(std::ostream &,
const ChoiceList &);
#define UTILEXPORT
Definition: coExport.h:206
list of all chemical elements
Definition: coConfig.h:27
QTextStream & operator<<(QTextStream &out, const coConfigEntryStringList list)
Definition: coConfigEntryString.cpp:159
Definition: ChoiceList.h:19
ChoiceList(const ChoiceList &)
int numChoices
Definition: ChoiceList.h:28
ChoiceList & operator=(const ChoiceList &)
ChoiceList(const char *choice0, int choiceNo0)
Definition: ChoiceList.h:31
int get_orig_num(int choice) const
Definition: ChoiceList.h:62
int change(const char *newchoice, int number)
Definition: ChoiceList.h:55
const char *const * get_strings() const
Definition: ChoiceList.h:72
int add(const char *choice, int number)
Definition: ChoiceList.h:39
int get_num() const
Definition: ChoiceList.h:77
const char * getString(int choice)
Definition: ChoiceList.h:67