Fields of this type contain symbols taken from an enumeration.
The type is described by writing the sequence of symbols comprising the enumeration. Enumeration symbols are strings described by the following regexp:
[a-zA-Z0-9][a-zA-Z0-9_-]*
The symbols are separated by blank characters (including newlines). For example:
%typedef: Status_t enum NEW STARTED DONE CLOSED %typedef: Day_t enum Monday Tuesday Wednesday Thursday Friday + Saturday Sunday
It is possible to insert comments when describing an enum type. The comments are delimited by parenthesis pairs. The contents of the comments can be any character but parentheses. For example:
%typedef: TaskStatus_t enum + NEW (The task was just created) + IN_PROGRESS (Task started) + CLOSED (Task closed)
Boolean fields, declared with the type specifier bool
,
can be seen as special enumerations holding the
binary values true and false.
%typedef: Yesno_t bool
The literals allowed in boolean fields are yes/no
, 0/1
and true/false
. Examples are:
SwitchedOn: 1 SwitchedOn: yes SwitchedOn: false