Don't do C++ so this might be a silly question. I'm examining a header file .h where parameter IDs are supposedly defined, according to the documentation. I've come across the lines where the parameters are and they are as follows:
#define SPCDLL_ERROR_KEYWORDS \
{ \
keyword (NONE), \
keyword (OPEN_FILE), \
keyword (FILE_NVALID), \
keyword (MEM_ALLOC), \
};
#define PARAMETERS_KEYWORDS \
{ \
keyword (LIMIT_LOW), \
keyword (LIMIT_HIGH), \
keyword (LEVEL), \
keyword (HOLDOFF), \
};
#ifdef keyword
#undef keyword /* prevents redefinition warning */
#endif
#define keyword(key) key
However I have searched and can't find out exactly what the keyword(key) line is doing? Is it assigning each parameter and ID based on it's order in the list? Would that make LIMIT_LOW, ID=1? Why is it not explicitly defined. Also as there are two lists of definitions of keyword how does it work?
I come from Python land where I would have defined these as two dictionaries with IDs and values for both Error_names and Parameter_vals.
If someone could explain this I would be grateful.