2003-12-22 14:02:15 +00:00
|
|
|
// constants.h by Ramon 18 Nov 2003
|
|
|
|
|
|
|
|
#ifndef ___CONSTANTS___H_____
|
|
|
|
#define ___CONSTANTS___H_____
|
|
|
|
|
2004-10-12 21:05:59 +00:00
|
|
|
#include "strlist.h"
|
2003-12-22 14:02:15 +00:00
|
|
|
|
|
|
|
struct constantstring {
|
|
|
|
int name;
|
|
|
|
int index;
|
|
|
|
int pos;
|
|
|
|
int value1;
|
|
|
|
int value2;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ConstantsStringList : public SortedStringListND<struct constantstring>
|
|
|
|
{
|
|
|
|
public:
|
2004-10-12 21:05:59 +00:00
|
|
|
ConstantsStringList();
|
2003-12-22 14:02:15 +00:00
|
|
|
|
2004-10-12 21:05:59 +00:00
|
|
|
int add(const char *name, int value1, int value2);
|
|
|
|
int get(char *name, int n_chars = -1);
|
|
|
|
int getnum();
|
|
|
|
int get_value1(int idx);
|
|
|
|
int get_value2(int idx);
|
|
|
|
char *idx2name(int idx);
|
2003-12-22 14:02:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
int index;
|
2004-10-12 21:05:59 +00:00
|
|
|
int get_internal_idx(int idx);
|
2003-12-22 14:02:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|