Xonotic
misc.qh File Reference
#include "p99.qh"
+ Include dependency graph for misc.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EVAL(...)   EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
 
#define EVAL1(...)   EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
 
#define EVAL2(...)   EVAL3(EVAL3(EVAL3(__VA_ARGS__)))
 
#define EVAL3(...)   EVAL4(EVAL4(EVAL4(__VA_ARGS__)))
 
#define EVAL4(...)   EVAL5(EVAL5(EVAL5(__VA_ARGS__)))
 
#define EVAL5(...)   __VA_ARGS__
 
#define GET(name)   name##get
 
#define GETTER(type, name)   type GET(name)() { return name; }
 
#define LAMBDA(...)   { __VA_ARGS__; }
 
#define OVERLOAD(F, ...)   P99_IF_EMPTY(__VA_ARGS__)(P99_PASTE2(F, _00)())(P99_PASTE3(F, _, P00_NARG(__VA_ARGS__))(__VA_ARGS__))
 
#define OVERLOAD_(F, ...)   P99_IF_EMPTY(__VA_ARGS__)(P99_PASTE2(F, _00)())(P99_PASTE3(F, _, P00_NARG(__VA_ARGS__))(__VA_ARGS__))
 for use within macros More...
 
#define OVERLOAD__(F, ...)   P99_IF_EMPTY(__VA_ARGS__)(P99_PASTE2(F, _00)())(P99_PASTE3(F, _, P00_NARG(__VA_ARGS__))(__VA_ARGS__))
 
#define PROPERTY(type, name)   type name; GETTER(type, name)
 
#define WITH(type, name, value, block)
 

Macro Definition Documentation

◆ EVAL

#define EVAL (   ...)    EVAL1(EVAL1(EVAL1(__VA_ARGS__)))

Definition at line 4 of file misc.qh.

◆ EVAL1

#define EVAL1 (   ...)    EVAL2(EVAL2(EVAL2(__VA_ARGS__)))

Definition at line 5 of file misc.qh.

◆ EVAL2

#define EVAL2 (   ...)    EVAL3(EVAL3(EVAL3(__VA_ARGS__)))

Definition at line 6 of file misc.qh.

◆ EVAL3

#define EVAL3 (   ...)    EVAL4(EVAL4(EVAL4(__VA_ARGS__)))

Definition at line 7 of file misc.qh.

◆ EVAL4

#define EVAL4 (   ...)    EVAL5(EVAL5(EVAL5(__VA_ARGS__)))

Definition at line 8 of file misc.qh.

◆ EVAL5

#define EVAL5 (   ...)    __VA_ARGS__

Definition at line 9 of file misc.qh.

◆ GET

#define GET (   name)    name##get

Definition at line 34 of file misc.qh.

◆ GETTER

#define GETTER (   type,
  name 
)    type GET(name)() { return name; }

Definition at line 35 of file misc.qh.

◆ LAMBDA

#define LAMBDA (   ...)    { __VA_ARGS__; }

Definition at line 37 of file misc.qh.

Referenced by sandbox_ObjectPort_Save().

◆ OVERLOAD

#define OVERLOAD (   F,
  ... 
)    P99_IF_EMPTY(__VA_ARGS__)(P99_PASTE2(F, _00)())(P99_PASTE3(F, _, P00_NARG(__VA_ARGS__))(__VA_ARGS__))

Definition at line 12 of file misc.qh.

◆ OVERLOAD_

#define OVERLOAD_ (   F,
  ... 
)    P99_IF_EMPTY(__VA_ARGS__)(P99_PASTE2(F, _00)())(P99_PASTE3(F, _, P00_NARG(__VA_ARGS__))(__VA_ARGS__))

for use within macros

Definition at line 14 of file misc.qh.

◆ OVERLOAD__

#define OVERLOAD__ (   F,
  ... 
)    P99_IF_EMPTY(__VA_ARGS__)(P99_PASTE2(F, _00)())(P99_PASTE3(F, _, P00_NARG(__VA_ARGS__))(__VA_ARGS__))

Definition at line 15 of file misc.qh.

◆ PROPERTY

#define PROPERTY (   type,
  name 
)    type name; GETTER(type, name)

Definition at line 36 of file misc.qh.

◆ WITH

#define WITH (   type,
  name,
  value,
  block 
)
Value:
MACRO_BEGIN \
type __with_save = (name); \
name = (value); \
LAMBDA(block) \
name = __with_save; \
MACRO_END

Definition at line 40 of file misc.qh.

Referenced by _json_parse_array(), _json_parse_object(), _json_parse_pair(), and TEST().