Freeciv-3.2: /fast/freeciv/nightly/S3_2/utility/specenum_gen.h File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Macros | Enumerations | Functions
specenum_gen.h File Reference
`#include "fcintl.h"`
`#include "log.h"`
`#include "support.h"`

Go to the source code of this file.

## Macros

#define | SPECENUM_PASTE_(x, y) x ## y
#define | SPECENUM_PASTE(x, y) SPECENUM_PASTE_(x, y)
#define | SPECENUM_STRING_(x) #x
#define | SPECENUM_STRING(x) SPECENUM_STRING_(x)
#define | SPECENUM_FOO(suffix) SPECENUM_PASTE(SPECENUM_NAME, suffix)
#define | SPECENUM_INVALID ((enum SPECENUM_NAME) -1)
#define | SPECENUM_VALUE(value) (value)

## Enumerations

enum | SPECENUM_NAME

## Functions

| fc__attribute ((const)) static inline bool SPECENUM_FOO(_is_bitwise)(void)
static enum SPECENUM_NAME SPECENUM_FOO() | _by_name (const char *name, int(*strcmp_func)(const char *, const char *))

## Macro Definition Documentation

## ◆ SPECENUM_FOO

#define SPECENUM_FOO | ( |  | suffix | ) | SPECENUM_PASTE(SPECENUM_NAME, suffix)

Definition at line 140 of file specenum_gen.h.

## ◆ SPECENUM_INVALID

#define SPECENUM_INVALID ((enum SPECENUM_NAME) -1)

Definition at line 143 of file specenum_gen.h.

## ◆ SPECENUM_PASTE

#define SPECENUM_PASTE | ( |  | x,
|  |  | y
| ) |  | SPECENUM_PASTE_(x, y)

Definition at line 135 of file specenum_gen.h.

## ◆ SPECENUM_PASTE_

#define SPECENUM_PASTE_ | ( |  | x,
|  |  | y
| ) |  | x ## y

Definition at line 134 of file specenum_gen.h.

## ◆ SPECENUM_STRING

#define SPECENUM_STRING | ( |  | x | ) | SPECENUM_STRING_(x)

Definition at line 138 of file specenum_gen.h.

## ◆ SPECENUM_STRING_

#define SPECENUM_STRING_ | ( |  | x | ) | #x

Definition at line 137 of file specenum_gen.h.

## ◆ SPECENUM_VALUE

#define SPECENUM_VALUE | ( |  | value | ) | (value)

Definition at line 155 of file specenum_gen.h.

## Enumeration Type Documentation

## ◆ SPECENUM_NAME

enum SPECENUM_NAME

Definition at line 169 of file specenum_gen.h.

## Function Documentation

## ◆ _by_name()

static enum SPECENUM_NAME SPECENUM_FOO() _by_name | ( | const char * | name,
|  | int(*)(const char *, const char *) | strcmp_func
| ) |  |

inlinestatic

Returns the enumerator for the name or *_invalid() if not found.

Definition at line 7162 of file specenum_gen.h.

## ◆ fc__attribute()

fc__attribute | ( | (const) |  | ) |

Returns TRUE if this enumeration is in bitwise mode.

Returns the value of the minimal enumerator.

Returns the value of the maximal enumerator.

Returns TRUE if this enumerator was defined.

Returns an invalid enumerator value.

Beginning of the iteration of the enumerators.

End of the iteration of the enumerators.

Find the next valid enumerator value.

Returns the name of the enumerator.

Returns the translated name of the enumerator.

Definition at line 3182 of file specenum_gen.h.