From f0807fc44dde14531759306317611bab87c8fccf Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 19 Oct 2020 09:13:58 +0800 Subject: +gamelab proj --- Runtime/Utilities/UtilMacros.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Runtime/Utilities/UtilMacros.h (limited to 'Runtime/Utilities/UtilMacros.h') diff --git a/Runtime/Utilities/UtilMacros.h b/Runtime/Utilities/UtilMacros.h new file mode 100644 index 0000000..1941d7f --- /dev/null +++ b/Runtime/Utilities/UtilMacros.h @@ -0,0 +1,16 @@ +#ifndef UTIL_MACROS_H +#define UTIL_MACROS_H + +#define GET_SET(TYPE,PROP,VAR) \ + inline void Set##PROP (TYPE val) { VAR = val; } \ + inline TYPE Get##PROP () {return VAR; } + +#define GET(TYPE, PROP, VAR) \ + inline TYPE Get##PROP () const {return VAR; } + +#define SET(TYPE, PROP, VAR) \ + inline void Set##PROP (TYPE val) { VAR = val; } \ + +#define Mask(v) (1 << v) + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0