libwallaby  v24
The wallaby standard library
vtable.h File Reference
#include "export.h"

Go to the source code of this file.

Macros

#define VF
 
#define VFL
 
#define VI
 
#define VIL
 
#define VH
 
#define POSSIBLY_UNUSED
 
#define VTABLE_FUNC_VOID(name, signature, args)
 
#define VTABLE_FUNC(name, returnType, signature, args)
 
#define VTABLE_SET_DEFAULT(name, impl)
 

Macro Definition Documentation

◆ POSSIBLY_UNUSED

#define POSSIBLY_UNUSED

◆ VF

#define VF

◆ VFL

#define VFL

◆ VH

#define VH

◆ VI

#define VI

◆ VIL

#define VIL

◆ VTABLE_FUNC

#define VTABLE_FUNC (   name,
  returnType,
  signature,
  args 
)
Value:
typedef returnType (*name##_func) signature; \
EXPORT_SYM extern name##_func g_##name##_func; \
EXPORT_SYM extern const name##_func g_##name##_func_default; \
static const char *const name##_signature = #returnType #signature; \
POSSIBLY_UNUSED static returnType name signature { return (*g_##name##_func) args; }

◆ VTABLE_FUNC_VOID

#define VTABLE_FUNC_VOID (   name,
  signature,
  args 
)
Value:
typedef void (*name##_func) signature; \
EXPORT_SYM extern name##_func g_##name##_func; \
EXPORT_SYM extern const name##_func g_##name##_func_default; \
static const char *const name##_signature = "void" #signature; \
POSSIBLY_UNUSED static void name signature { (*g_##name##_func) args; }

◆ VTABLE_SET_DEFAULT

#define VTABLE_SET_DEFAULT (   name,
  impl 
)
Value:
const name##_func g_##name##_func_default = &impl; \
name##_func g_##name##_func = g_##name##_func_default