Commit Graph

255 Commits

Author SHA1 Message Date
Martchus cb1741de89 Add PATHS to find_program(REFLECTION_GENERATOR_EXECUTABLE 2018-01-20 21:15:14 +01:00
Martchus cb095b936a Add include directory for build time
This dir is used when building eg. tageditor and reflective
rapidjson as one big project.
2018-01-20 21:14:48 +01:00
Martchus c2e15f10fb Fix unused variable 2018-01-20 20:43:29 +01:00
Martchus 5f86cc6243 Add notes regarding cross compilation 2018-01-20 19:47:09 +01:00
Martchus baf7eec38e Invoke add_reflection_generator_invocation only if building tests 2018-01-20 19:46:17 +01:00
Martchus beb4d1d672 Prevent ambiguity of own arguments and clang options consistently 2018-01-20 19:32:46 +01:00
Martchus c36279665d Fix cross-compilation with mingw-w64 2018-01-20 18:10:58 +01:00
Martchus 35850df15e Improve README.md 2018-01-15 01:25:23 +01:00
Martchus 3d750ada08 Add link to Arch Linux package 2018-01-12 17:01:55 +01:00
Martchus 742511ba10 Add CMake module paths of c++utilities for library 2018-01-12 15:55:10 +01:00
Martchus 282a3a1fb6 Add architecture diagram 2018-01-12 15:35:17 +01:00
Martchus 38d843b399 Improve README.md 2018-01-07 00:56:12 +01:00
Martchus 2fa1e923f9 Skip deserializing const member variables 2017-12-31 00:48:51 +01:00
Martchus c5968f1663 Test whether code generation is skipped for included structs 2017-12-31 00:37:30 +01:00
Martchus 51e55f1673 Fix 'isOnlyIncluded' check for 3rdparty adaption
* Ensure the adaption is done in our source file
* Allow the 3rdparty class/struct to be in any file
2017-12-26 16:29:51 +01:00
Martchus ca2a6acb2a Add dummy for pulling C-style string
So at least everything can compile and the type-check
is done.
2017-12-24 02:13:16 +01:00
Martchus 272ec99bb0 Allow parsing any number as any kind of integral/floating point
Makes sense because JSON does not distinguish different kinds of
numbers anyways
2017-12-24 02:12:01 +01:00
Martchus 5f799cc65d Prevent code generator for records which are only included 2017-12-24 02:02:40 +01:00
Martchus bae7cf3414 Prevent generating pull method for non-default constructable classes 2017-12-24 01:07:52 +01:00
Martchus 0bb06d5190 Ensure all pull helper are declared prior to the call site 2017-12-24 00:57:08 +01:00
Martchus ec66f14e4c Just use IsNumber() to check for numbers
Otherwise deserializing doubles does not work
when there's no explicit decimal point in the
JSON file.
2017-12-22 20:44:04 +01:00
Martchus 489d4c71c0 Fix typo 2017-12-22 20:31:48 +01:00
Martchus 8016a42394 Fix adding adaption records in namespaces 2017-12-22 20:31:35 +01:00
Martchus 29b39bc7bc Use uint64/int64 to serialize enums
Otherwise, enums using char as underlying types
can not not be serialized.
2017-12-22 20:30:55 +01:00
Martchus 9a2c2cfef6 Deserialize enums as well 2017-12-22 20:30:01 +01:00
Martchus 7b6fe57aac Prevent segfault when no args specified 2017-11-23 15:18:44 +01:00
Martchus b27e0ba772 Make condition for bundled c++utilities more generic 2017-11-18 00:28:54 +01:00
Martchus 86a577748e Allow direct serialization of iteratables 2017-11-18 00:28:24 +01:00
Martchus 69d4fa193f Apply clang-format 2017-11-18 00:27:25 +01:00
Martchus add8ddaeec Apply clang-format 2017-11-17 22:04:11 +01:00
Martchus f5a240649f Separate RapidJSON specific parts
So when extending this for further applications of
reflection, the JSON-specific parts can be made optional.
2017-11-17 22:04:01 +01:00
Martchus 8c3dd5535d Pass the include dir for c++utilities and RapidJSON to tests
So test cases do not fail if the header files for those
dependencies are installed in a custom location.
2017-11-17 22:01:18 +01:00
Martchus 227d3f3942 Allow passing target config to generator invocation
So the code generator 'sees' the source code in the same
way as the compiler does.
2017-11-17 21:42:49 +01:00
Martchus 19cab9c791 Bundle c++utilities correctly
* Use the c++utilities source directory for includes rather
  than the locations where headers are goint to be installed
* Call find_package for c++utilities only once
2017-11-17 21:21:34 +01:00
Martchus d5144d8e75 Restore GCC compatibility 2017-11-16 01:56:04 +01:00
Martchus a159bdbdb0 Propagate binary and source dir to parent scope 2017-11-16 01:56:04 +01:00
Martchus a7f587cb84 Support std::map and std::unordered_map 2017-11-13 20:16:43 +01:00
Martchus 19590d30a4 Explicitely ignore static members (for now) 2017-11-13 16:41:47 +01:00
Martchus c71a9baa54 Test std::unique_ptr in generated code 2017-11-13 16:18:32 +01:00
Martchus 683d87c366 Allow disabling generator 2017-11-13 08:51:33 +01:00
Martchus f24390a00b Support smart pointer 2017-11-12 23:18:01 +01:00
Martchus ce89e3d878 Only include required Boost.Hana headers 2017-11-12 20:13:17 +01:00
Martchus 61a343bda1 Refactor redundant type checks 2017-11-12 20:07:43 +01:00
Martchus e9324f0ec3 Fix incomplete use of AdaptedJsonSerializable and handling tuple 2017-11-12 00:44:47 +01:00
Martchus 4655387c4d Clean code for JSON generator 2017-11-11 23:29:17 +01:00
Martchus 9fb26e69e9 Remove leftovers from debugging 2017-11-11 22:54:00 +01:00
Martchus ee0ca561c0 Allow exporting generated functions and don't inline by default 2017-11-11 22:53:40 +01:00
Martchus 9f0f208f28 Trun only errors into warnings which are actually required 2017-11-11 00:26:23 +01:00
Martchus 0d74d915f8 Allow optionally (de)serializing private members 2017-11-09 01:11:00 +01:00
Martchus e29dcce40f Only consider public members
Otherwise the compiler would complain about accessibility
anyways.
2017-11-09 00:07:40 +01:00