From 4035284a0a2864ebb90db6a3c455fd0a037f05de Mon Sep 17 00:00:00 2001 From: Anton Bachin Date: Sun, 3 May 2015 15:04:04 -0400 Subject: [PATCH] Completed rename and combined former Enum.h/EnumInternal.h. --- EnumToBeRemoved.h | 19 ------------------- enum.h | 8 +++++++- 2 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 EnumToBeRemoved.h diff --git a/EnumToBeRemoved.h b/EnumToBeRemoved.h deleted file mode 100644 index ebfa43b..0000000 --- a/EnumToBeRemoved.h +++ /dev/null @@ -1,19 +0,0 @@ -/// @file Enum.h -/// Enum type generator. - - - -#pragma once - -#include "EnumInternal.h" - - - -// TODO Consider using a traits type instead of prefixing static members with an -// underscore. - -#define ENUM(EnumType, UnderlyingType, ...) \ - _ENUM_TAG_DECLARATION(EnumType); \ - _ENUM_ARRAYS(EnumType, UnderlyingType, _ENUM_TAG(EnumType), __VA_ARGS__); \ - using EnumType = _enum::_Enum<_enum::_ENUM_TAG(EnumType)>; \ - _ENUM_STATIC_DEFINITIONS(EnumType, _ENUM_TAG(EnumType)); diff --git a/enum.h b/enum.h index 58582bd..570e705 100644 --- a/enum.h +++ b/enum.h @@ -37,7 +37,7 @@ #include #include -#include "EnumPreprocessorMap.h" +#include "enum_preprocessor_map.h" @@ -717,3 +717,9 @@ class _Enum : public _GeneratedArrays { } } + +#define ENUM(EnumType, UnderlyingType, ...) \ + _ENUM_TAG_DECLARATION(EnumType); \ + _ENUM_ARRAYS(EnumType, UnderlyingType, _ENUM_TAG(EnumType), __VA_ARGS__); \ + using EnumType = _enum::_Enum<_enum::_ENUM_TAG(EnumType)>; \ + _ENUM_STATIC_DEFINITIONS(EnumType, _ENUM_TAG(EnumType));