Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "Enum.h"
#include "MutableString.h"
Go to the source code of this file.
Functions | |
String * | nameof (const EnumName *names, int value) |
Marshal value , returning a String of OR 'ed EnumNames for the given enum value. More... | |
int | valueof (const EnumName *names, const char *chars) |
Parse string , returning the corresponding enum value. More... | |
Marshal value
, returning a String of OR
'ed EnumNames for the given enum value.
names | A null-terminated array of EnumNames. |
value | The enum value, which may be a bitwise OR of multiple enum values. |
NULL
. Definition at line 31 of file Enum.c.
int valueof | ( | const EnumName * | names, |
const char * | chars | ||
) |
Parse string
, returning the corresponding enum value.
names | A null-terminated array of EnumNames. |
chars | A null-terminated C string. |
value
of the EnumName matching string
, or -1
. Definition at line 57 of file Enum.c.