Commit Graph

255 Commits

Author SHA1 Message Date
Martchus 13dfac3991 Update TODOs 2017-11-07 00:28:41 +01:00
Martchus 062f8c0d27 Allow enabling (de)serialization for 3rd party structs 2017-11-06 23:27:27 +01:00
Martchus eac2d20638 Allow specifying Clang options and JSON classes in CMake macro 2017-11-06 20:10:06 +01:00
Martchus c4b4429880 Test --json-classes argument 2017-11-06 20:04:42 +01:00
Martchus e12e33a28f Remove obsolete comment 2017-11-06 19:11:02 +01:00
Martchus a7feb57f22 Allow specifying additional classes for JSON serialization 2017-11-06 15:31:21 +01:00
Martchus d039daf938 Extend TODOs 2017-11-06 00:05:56 +01:00
Martchus 95719ac8a4 Test mixing custom (de)serialization with generated code 2017-11-04 15:17:06 +01:00
Martchus 516f80b325 Use "is_base_of"-trait also for pushing objects 2017-11-04 15:16:05 +01:00
Martchus f212fc8de7 Prevent overflow on size type conversion 2017-11-04 15:15:12 +01:00
Martchus a4fac7c515 Further simplify JSON reflector 2017-11-04 02:33:34 +01:00
Martchus 4dbb5a3982 Prevent code duplication for iterator variants of pull() 2017-11-03 23:00:15 +01:00
Martchus 423d9ee393 Move all helper functions inside JsonReflector namespace 2017-11-03 22:42:18 +01:00
Martchus 8b61fcc29a Make location of code generator customizable 2017-11-03 22:41:51 +01:00
Martchus 76a8f649bc Add example for custom (de)serialization 2017-11-03 17:45:16 +01:00
Martchus 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
Martchus fdadb17c04 Call tests for JSON generator JsonGeneratorTests 2017-11-02 23:09:39 +01:00
Martchus ccd70d0bcf Extend documentation 2017-11-02 15:15:29 +01:00
Martchus c0e6570848 Document supported datatypes 2017-10-29 23:46:11 +01:00
Martchus 407de04d91 Allow deserializing tuples 2017-10-29 22:53:02 +01:00
Martchus d849144504 Allow serializing tuples 2017-10-29 22:14:04 +01:00
Martchus 5e95127185 Exclude tuple from the types considered 'user defined' 2017-10-29 21:41:18 +01:00
Martchus 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
Martchus e1dca1d1a2 Improve README.md 2017-10-28 22:52:31 +02:00
Martchus 0520341411 Fix passing temporary to Reflector::push() 2017-10-28 18:29:15 +02:00
Martchus 104e362762 Imporve documentation and build script 2017-10-28 18:24:12 +02:00
Martchus a768408493 Refactor JsonSerializationCodeGenerator
* JSONSerializationCodeGenerator -> JsonSerializationCodeGenerator
* Move to separate file
2017-10-28 16:31:07 +02:00
Martchus 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
Martchus 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
Martchus 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
Martchus 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
Martchus 97f1dc57cf Make use of reserve() and size() if possible 2017-10-27 18:26:36 +02:00
Martchus f51fec58c2 Test nested structs with generator 2017-10-27 17:53:25 +02:00
Martchus fe40840486 Don't call generator when declarations already deleted 2017-10-27 17:45:23 +02:00
Martchus 31c37a8ee4 Add helper to ease disambiguation 2017-10-27 15:48:55 +02:00
Martchus ef6a91076f Apply clang-format 2017-10-27 15:48:26 +02:00
Martchus 5b550bc33a Fix example 2017-10-27 15:47:35 +02:00
Martchus d4662164fc Extend README.md 2017-10-25 20:08:22 +02:00
Martchus 646edfc16d Add Boost.Hana to dependencies 2017-10-25 19:25:27 +02:00
Martchus 34779dcf4b Remove unused files 2017-10-25 19:23:50 +02:00
Martchus 8922c26c3d Add some documentation 2017-10-25 19:18:13 +02:00
Martchus 0d17d5f20b Allow using Boost.Hana instead of code generator 2017-10-25 19:16:55 +02:00
Martchus c026dafff7 Split generator tests into multiple files 2017-10-25 18:25:47 +02:00
Martchus b725f59e78 Rename moc -> generator 2017-10-25 17:41:19 +02:00
Martchus 3889031247 Handle multiple input files correctly
by invoking the generator multiple times
2017-10-25 17:32:03 +02:00
Martchus 3008e3ad6e Consider base classes when generating code for (de)serialization 2017-10-25 16:47:14 +02:00
Martchus 617ee58b91 Clear interatables before pulling array elements 2017-10-25 16:37:49 +02:00
Martchus 2233ddadd0 Don't use braces around scalar 2017-10-25 15:39:08 +02:00
Martchus f8678f2c3f Split generator.h and generator.cpp 2017-10-25 15:38:45 +02:00
Marius Kittler 1ecf12b7f5 Extend README.md 2017-10-24 18:00:51 +02:00