ManaPlus
Macros
checkutils.h File Reference

(986a3bf)

#include "logger.h"

Go to the source code of this file.

Macros

#define reportFalseReal(val)   (val)
 
#define reportTrueReal(val)   (val)
 
#define reportAlwaysReal(...)
 
#define returnFalseVReal(val)
 
#define returnTrueVReal(val)
 
#define returnFalseReal(ret, val)
 
#define returnTrueReal(ret, val)
 
#define returnNullptrVReal(val)
 
#define returnNullptrReal(ret, val)
 
#define failFalse(val)   (val)
 
#define failTrue(val)   (val)
 
#define returnFailFalseV(val)
 
#define returnFailTrueV(val)
 
#define returnFailFalse(ret, val)
 
#define returnFailTrue(ret, val)
 
#define returnFailNullptrV(val)
 
#define returnFailNullptr(ret, val)
 
#define failAlways(...)   ;
 
#define reportFalse(val)   reportFalseReal(val)
 
#define reportTrue(val)   reportTrueReal(val)
 
#define reportAlways(...)   reportAlwaysReal(__VA_ARGS__)
 
#define returnFalseV(val)   returnFalseVReal(val)
 
#define returnTrueV(val)   returnTrueVReal(val)
 
#define returnFalse(ret, val)   returnFalseReal(ret, val)
 
#define returnTrue(ret, val)   returnTrueReal(ret, val)
 
#define returnNullptrV(val)   returnNullptrVReal(val)
 
#define returnNullptr(ret, val)   returnNullptrReal(ret, val)
 

Macro Definition Documentation

◆ failAlways

#define failAlways (   ...)    ;

Definition at line 236 of file checkutils.h.

◆ failFalse

#define failFalse (   val)    (val)

Definition at line 209 of file checkutils.h.

◆ failTrue

#define failTrue (   val)    (val)

Definition at line 210 of file checkutils.h.

◆ reportAlways

#define reportAlways (   ...)    reportAlwaysReal(__VA_ARGS__)

Definition at line 253 of file checkutils.h.

◆ reportAlwaysReal

#define reportAlwaysReal (   ...)
Value:
{ \
logger->log("Error:"); \
logger->log( \
__VA_ARGS__); \
}

Definition at line 178 of file checkutils.h.

◆ reportFalse

#define reportFalse (   val)    reportFalseReal(val)

Definition at line 251 of file checkutils.h.

◆ reportFalseReal

#define reportFalseReal (   val)    (val)

Definition at line 175 of file checkutils.h.

◆ reportTrue

#define reportTrue (   val)    reportTrueReal(val)

Definition at line 252 of file checkutils.h.

◆ reportTrueReal

#define reportTrueReal (   val)    (val)

Definition at line 176 of file checkutils.h.

◆ returnFailFalse

#define returnFailFalse (   ret,
  val 
)
Value:
if (!(val)) \
return ret;

Definition at line 220 of file checkutils.h.

◆ returnFailFalseV

#define returnFailFalseV (   val)
Value:
if (!(val)) \
return;

Definition at line 212 of file checkutils.h.

◆ returnFailNullptr

#define returnFailNullptr (   ret,
  val 
)
Value:
if ((val) == nullptr) \
return ret;

Definition at line 232 of file checkutils.h.

◆ returnFailNullptrV

#define returnFailNullptrV (   val)
Value:
if ((val) == nullptr) \
return;

Definition at line 228 of file checkutils.h.

◆ returnFailTrue

#define returnFailTrue (   ret,
  val 
)
Value:
if (val) \
return ret;

Definition at line 224 of file checkutils.h.

◆ returnFailTrueV

#define returnFailTrueV (   val)
Value:
if (val) \
return;

Definition at line 216 of file checkutils.h.

◆ returnFalse

#define returnFalse (   ret,
  val 
)    returnFalseReal(ret, val)

Definition at line 256 of file checkutils.h.

◆ returnFalseReal

#define returnFalseReal (   ret,
  val 
)
Value:
if (!(val)) \
return ret;

Definition at line 193 of file checkutils.h.

◆ returnFalseV

#define returnFalseV (   val)    returnFalseVReal(val)

Definition at line 254 of file checkutils.h.

◆ returnFalseVReal

#define returnFalseVReal (   val)
Value:
if (!(val)) \
return;

Definition at line 185 of file checkutils.h.

◆ returnNullptr

#define returnNullptr (   ret,
  val 
)    returnNullptrReal(ret, val)

Definition at line 259 of file checkutils.h.

◆ returnNullptrReal

#define returnNullptrReal (   ret,
  val 
)
Value:
if ((val) == nullptr) \
return ret;

Definition at line 205 of file checkutils.h.

◆ returnNullptrV

#define returnNullptrV (   val)    returnNullptrVReal(val)

Definition at line 258 of file checkutils.h.

◆ returnNullptrVReal

#define returnNullptrVReal (   val)
Value:
if ((val) == nullptr) \
return;

Definition at line 201 of file checkutils.h.

◆ returnTrue

#define returnTrue (   ret,
  val 
)    returnTrueReal(ret, val)

Definition at line 257 of file checkutils.h.

◆ returnTrueReal

#define returnTrueReal (   ret,
  val 
)
Value:
if (val) \
return ret;

Definition at line 197 of file checkutils.h.

◆ returnTrueV

#define returnTrueV (   val)    returnTrueVReal(val)

Definition at line 255 of file checkutils.h.

◆ returnTrueVReal

#define returnTrueVReal (   val)
Value:
if (val) \
return;

Definition at line 189 of file checkutils.h.