From 5983071127eeca4bf652ea4bb144ccc8bf160d7b Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 15 Dec 2017 18:14:27 -0800 Subject: [PATCH] Initial `genie` API implementation --- specter/CMakeLists.txt | 3 ++- specter/include/specter/genie.hpp | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 specter/include/specter/genie.hpp diff --git a/specter/CMakeLists.txt b/specter/CMakeLists.txt index be652b9af..f2113b802 100644 --- a/specter/CMakeLists.txt +++ b/specter/CMakeLists.txt @@ -60,7 +60,8 @@ list(APPEND SPECTER_HEADERS include/specter/FileBrowser.hpp include/specter/Icon.hpp include/specter/FontCache.hpp - include/specter/Translator.hpp) + include/specter/Translator.hpp + include/specter/genie.hpp) atdna(atdna_FontCache.cpp include/specter/FontCache.hpp) diff --git a/specter/include/specter/genie.hpp b/specter/include/specter/genie.hpp new file mode 100644 index 000000000..2693cbe47 --- /dev/null +++ b/specter/include/specter/genie.hpp @@ -0,0 +1,15 @@ +#ifndef __SPECTER_GENIE_HPP__ +#define __SPECTER_GENIE_HPP__ + +#if __specter__ +#define SPECTER_PROPERTY(n, d) \ + [[using specter: name(n), description(d)]] +#define SPECTER_ENUM(n, d, et) \ + [[using specter: name(n), description(d), enum_type(et)]] +#else +#define SPECTER_PROPERTY(n, d) +#define SPECTER_ENUM(n, d, et) +#endif + + +#endif //__SPECTER_GENIE_HPP__