hexo/enum.h header reference
[Hardware abstraction layer module]

The source code of this header can be browsed online.

Description [link] 

This header provides functions which can be used to convert between an enum value and an enum entry name at run time.

C enumerations are be parsed by the scripts/enum.pl script at compile time in order to produce enum descriptors usable at run time. A descriptor is more compact than an array of strings.

The script is invoked automatically by the MutekH build system. It contains syntax and usage details.

Any source file which contains enums which needs to be processed in this way must be specified in the enum_headers variable of a Makefile. All enums with a ENUM_DESCRIPTOR declaration will then produce a string descriptor macro available when this header is included.

Members [link] 

Functions [link] 

  • const char * enums_get_name(const char desc[], intptr_t value)
  • bool_t enums_get_value(const char desc[], const char *name, intptr_t *value)
  • bool_t enums_get_value2(const char desc[], const char *name, size_t name_len, intptr_t *value)

Macro [link] 

Members detail [link] 

#define ENUM_DESCRIPTOR [link] 

This macro is declared in hexo/enum.h source file, line 68.

Documentation from alternate declaration:

This mark an enum for processing by the scripts/enum.pl script. It also produce an extern declaration of the enum descriptor.

#define ENUM_DESCRIPTOR(name, ...) [link] 

This macro is declared in hexo/enum.h source file, line 72.

This mark an enum for processing by the scripts/enum.pl script. It also produce an extern declaration of the enum descriptor.

#define __HEXO_ENUMS_H__ [link] 

This macro is declared in hexo/enum.h source file, line 49.

const char * enums_get_name(const char desc[], intptr_t value) [link] 

This function is declared in hexo/enum.h source file, line 54.

This function returns the name associated to an enum value according to the passed descriptor string.

bool_t enums_get_value(const char desc[], const char *name, intptr_t *value) [link] 

This function is declared in hexo/enum.h source file, line 65.

This function is a wrapper of the enums_get_value2 function for NUL terminated strings.

bool_t enums_get_value2(const char desc[], const char *name, size_t name_len, intptr_t *value) [link] 

This function is declared in hexo/enum.h source file, line 59.

This function gets the value of an enum entry from the name. This function returns false if no entry is found.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc