ManaPlus
Macros
checkutils.h File Reference

(642df39)

#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 235 of file checkutils.h.

◆ failFalse

#define failFalse (   val)    (val)

Definition at line 208 of file checkutils.h.

◆ failTrue

#define failTrue (   val)    (val)

Definition at line 209 of file checkutils.h.

◆ reportAlways

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

Definition at line 252 of file checkutils.h.

◆ reportAlwaysReal

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

Definition at line 177 of file checkutils.h.

◆ reportFalse

#define reportFalse (   val)    reportFalseReal(val)

Definition at line 250 of file checkutils.h.

◆ reportFalseReal

#define reportFalseReal (   val)    (val)

Definition at line 174 of file checkutils.h.

◆ reportTrue

#define reportTrue (   val)    reportTrueReal(val)

Definition at line 251 of file checkutils.h.

◆ reportTrueReal

#define reportTrueReal (   val)    (val)

Definition at line 175 of file checkutils.h.

◆ returnFailFalse

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

Definition at line 219 of file checkutils.h.

◆ returnFailFalseV

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

Definition at line 211 of file checkutils.h.

◆ returnFailNullptr

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

Definition at line 231 of file checkutils.h.

◆ returnFailNullptrV

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

Definition at line 227 of file checkutils.h.

◆ returnFailTrue

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

Definition at line 223 of file checkutils.h.

◆ returnFailTrueV

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

Definition at line 215 of file checkutils.h.

◆ returnFalse

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

Definition at line 255 of file checkutils.h.

◆ returnFalseReal

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

Definition at line 192 of file checkutils.h.

◆ returnFalseV

#define returnFalseV (   val)    returnFalseVReal(val)

Definition at line 253 of file checkutils.h.

◆ returnFalseVReal

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

Definition at line 184 of file checkutils.h.

◆ returnNullptr

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

Definition at line 258 of file checkutils.h.

◆ returnNullptrReal

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

Definition at line 204 of file checkutils.h.

◆ returnNullptrV

#define returnNullptrV (   val)    returnNullptrVReal(val)

Definition at line 257 of file checkutils.h.

◆ returnNullptrVReal

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

Definition at line 200 of file checkutils.h.

◆ returnTrue

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

Definition at line 256 of file checkutils.h.

◆ returnTrueReal

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

Definition at line 196 of file checkutils.h.

◆ returnTrueV

#define returnTrueV (   val)    returnTrueVReal(val)

Definition at line 254 of file checkutils.h.

◆ returnTrueVReal

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

Definition at line 188 of file checkutils.h.