Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
d5144d8e75 Restore GCC compatibility 2017-11-16 01:56:04 +01:00
a7f587cb84 Support std::map and std::unordered_map 2017-11-13 20:16:43 +01:00
f24390a00b Support smart pointer 2017-11-12 23:18:01 +01:00
ce89e3d878 Only include required Boost.Hana headers 2017-11-12 20:13:17 +01:00
61a343bda1 Refactor redundant type checks 2017-11-12 20:07:43 +01:00
e9324f0ec3 Fix incomplete use of AdaptedJsonSerializable and handling tuple 2017-11-12 00:44:47 +01:00
ee0ca561c0 Allow exporting generated functions and don't inline by default 2017-11-11 22:53:40 +01:00
0d74d915f8 Allow optionally (de)serializing private members 2017-11-09 01:11:00 +01:00
062f8c0d27 Allow enabling (de)serialization for 3rd party structs 2017-11-06 23:27:27 +01:00
eac2d20638 Allow specifying Clang options and JSON classes in CMake macro 2017-11-06 20:10:06 +01:00
516f80b325 Use "is_base_of"-trait also for pushing objects 2017-11-04 15:16:05 +01:00
f212fc8de7 Prevent overflow on size type conversion 2017-11-04 15:15:12 +01:00
a4fac7c515 Further simplify JSON reflector 2017-11-04 02:33:34 +01:00
4dbb5a3982 Prevent code duplication for iterator variants of pull() 2017-11-03 23:00:15 +01:00
423d9ee393 Move all helper functions inside JsonReflector namespace 2017-11-03 22:42:18 +01:00
8b61fcc29a Make location of code generator customizable 2017-11-03 22:41:51 +01:00
76a8f649bc Add example for custom (de)serialization 2017-11-03 17:45:16 +01:00
daf1a8602c Rename Reflector -> JsonReflector
So helper methods for other applications of reflections
would go into a separate namespace to prevent conflicts.
2017-11-02 23:35:56 +01:00
407de04d91 Allow deserializing tuples 2017-10-29 22:53:02 +01:00
d849144504 Allow serializing tuples 2017-10-29 22:14:04 +01:00
5e95127185 Exclude tuple from the types considered 'user defined' 2017-10-29 21:41:18 +01:00
ae3d8030b6 Allow serializing enums
Note that deserializing is not so simple because
we would need to check whether the integer actually
is an item of the expected enumeration type.
2017-10-29 21:31:23 +01:00
0520341411 Fix passing temporary to Reflector::push() 2017-10-28 18:29:15 +02:00
104e362762 Imporve documentation and build script 2017-10-28 18:24:12 +02:00
c94c896f6c Refactor RapidJSON wrapper
* Move all JSON related files into own directory
* Move helper for error handling in own header
* Remove some leftovers from debugging
* Rename classes, use Json instead of JSON
2017-10-28 16:23:39 +02:00
5d441cf5ab Fix Boost.Hana tests
Boost.Hana doesn't make the record name accessible so
it can not be provided in the error case.
2017-10-28 15:53:16 +02:00
ad03afb1f2 Keep track of errors and fix usage of Boost.Hana
* Optionally save errors which occur during deserialization
  to allow error handling
* Don't operate on copies when using Boost.Hana
2017-10-28 15:50:16 +02:00
1b1d07ef8c Improve error handling
* Throw ParseResult when parsing error occurs
* Silence type mismatch or missing members for now
2017-10-27 20:59:08 +02:00
97f1dc57cf Make use of reserve() and size() if possible 2017-10-27 18:26:36 +02:00
31c37a8ee4 Add helper to ease disambiguation 2017-10-27 15:48:55 +02:00
ef6a91076f Apply clang-format 2017-10-27 15:48:26 +02:00
34779dcf4b Remove unused files 2017-10-25 19:23:50 +02:00
8922c26c3d Add some documentation 2017-10-25 19:18:13 +02:00
0d17d5f20b Allow using Boost.Hana instead of code generator 2017-10-25 19:16:55 +02:00
b725f59e78 Rename moc -> generator 2017-10-25 17:41:19 +02:00
3889031247 Handle multiple input files correctly
by invoking the generator multiple times
2017-10-25 17:32:03 +02:00
617ee58b91 Clear interatables before pulling array elements 2017-10-25 16:37:49 +02:00
8679263f09 Add CMake macro and actually test the generated code 2017-10-24 01:00:40 +02:00
4a8ebc99a3 Rename Reflectable -> JSONSerializable
This allows to provide multiple independently
functional reflection features by simply using
different base classes for them.
2017-10-23 00:41:10 +02:00
8344a99778 Add project basic project structure
* Implement simple RapidJSON wrapper
* Add skeleton for code generator to play around with
  LibTooling and LibClang
2017-10-19 01:10:51 +02:00