30 # define ED_MAX_DEFS 64
35 # define ED_OPTIONAL (1<<0)
36 # define ED_MANDATORY (1<<1)
37 # define ED_ABSTRACT (1<<2)
38 # define ED_TYPE_FLOAT (1<<3)
39 # define ED_TYPE_INT (1<<4)
40 # define ED_TYPE_STRING (1<<5)
41 # define ED_DEFAULT (1<<6)
42 # define ED_MODE_TYPE (1<<7)
43 # define ED_RANGE (1<<8)
44 # define ED_INSIST_POSITIVE (1<<9)
45 # define ED_TYPE_BOOL (1<<10)
47 # define ED_CONCRETE (ED_OPTIONAL | ED_MANDATORY)
48 # define ED_KEY_TYPE (ED_TYPE_FLOAT | ED_TYPE_INT | ED_TYPE_STRING | ED_TYPE_BOOL)
80 int ED_Check(
const char* classname,
const char*
key,
const char* value);
union int_float_u int_float_tu
int ED_GetIntVector(const entityKeyDef_t *kd, int v[], const int n)
parses a value from the definition
int ED_Parse(const char *data_p)
int ED_Check(const char *classname, const char *key, const char *value)
tests if a value string matches the type for this key. Also checks the value against the range...
const entityKeyDef_t * ED_GetKeyDef(const char *classname, const char *keyname, const int abstract)
searches for the parsed key def
struct entityDef_s entityDef_t
const entityKeyDef_t * ED_GetKeyDefEntity(const entityDef_t *ed, const char *keyname, const int abstract)
searches for the parsed key def, when the entity def is known
entityDef_t entityDefs[ED_MAX_DEFS+1]
const char * ED_GetLastError(void)
struct entityKeyRange_s entityKeyRange_t
int ED_CheckKey(const entityKeyDef_t *kd, const char *value)
as ED_Check, but where the entity and key are known, so takes different arguments.
struct entityKeyDef_s entityKeyDef_t
const entityDef_t * ED_GetEntityDef(const char *classname)
searches for the parsed entity def by classname
QGL_EXTERN int GLboolean GLfloat * v
entityKeyRange_t ** ranges