From bdb6ca33521be285781ec61d5e67cc7ce54408d1 Mon Sep 17 00:00:00 2001 From: Doyle Date: Sat, 23 Feb 2019 15:42:11 +1100 Subject: [PATCH] Remove old readme --- Code/readme.md | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 Code/readme.md diff --git a/Code/readme.md b/Code/readme.md deleted file mode 100644 index d6904d8..0000000 --- a/Code/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# Dqn -Personal utility library. - -## DqnInspect -A simple C++ introspection metaprogram designed as a prebuild step and generates type information for the inspected types. It is a minimal single header file licensed in the public domain with only CRT dependencies. It is only able to parse C-like C++, i.e. Plain Old Data types only. - -The generated file is written to stdout. - -### Usage -Annotate the C++ code using `DQN_INSPECT`, i.e. - -``` -DQN_INSPECT struct Entity -{ - V2 pos; - V2 size; -} - -DQN_INSPECT enum struct SomeEnum -{ - Hello, - Foo -} -``` - -And then build DqnInspect by defining `DQN_INSPECT_EXECUTABLE_IMPLEMENTATION` before compiling and execute it as follows - -`DqnInspect.exe SourceCode.h > SourceCodeInspected.h` - -Include and use the file in code - -``` -#include "DqnReflect.h" -#include "SourceCode.h" -#include "SourceCodeInspected.h" -SomeEnum enum = SomeEnum::Hello; -printf("%s\n", DqnInspect_EnumString(enum)); // prints Hello - -Entity entity = {}; -DqnInspect_Struct const *inspector = DqnInspect_GetStruct(&entity); -for (int i = 0; i < inspector->members_len; ++i) - printf("%s\n", inspector->members[i].name); -```