Commit Graph

72 Commits

Author SHA1 Message Date
Martchus d64174c000 Add experimental support for multimap
Makes sense for binary (de)serialization, not sure about
JSON (de)serialization
2018-11-01 04:54:46 +00:00
Martchus f77229471a Allow to teat custom types as std::map/std::set 2018-11-01 04:54:46 +00:00
Martchus 933d14ef1d Check whether include dirs for generator exist at configure time 2018-08-04 15:22:32 +02:00
Martchus 29cd810507 Use C++ standard from target in CMake macro 2018-07-27 17:40:15 +02:00
Martchus 25e7891573 Apply clang-format 2018-06-26 00:10:44 +02:00
Martchus da56134456 binary (de)serialization: Prevent duplicating shared pointer 2018-06-26 00:10:09 +02:00
Martchus f140c7f436 Use C++ 17 2018-06-26 00:07:59 +02:00
Martchus 6117ef3e1d Rename functions of BinarySerializable
So the names are more like the ones in JsonSerializable.
2018-06-23 17:24:28 +02:00
Martchus 04dccdbd74 Make binary (de)serialization for chrono utils inline 2018-06-23 17:23:37 +02:00
Martchus ac1fe81497 Add Boost.Hana support for binary (de)serialization 2018-06-23 15:30:51 +02:00
Martchus 9dc7bd371c Apply clang-format 2018-06-23 14:35:53 +02:00
Martchus 316c1ba838 Add library for basic binary (de)serialization 2018-06-23 14:35:43 +02:00
Martchus 8628427e6d Fix usage of enable_if with GCC 8
Seems like the trick with the three dots isn't working
with GCC 8 anymore. So let's make it a default template
parameter then.

Not sure whether GCC 8 is here correct and whether this
workaround causes further trouble.
2018-05-07 23:48:37 +02:00
Martchus 03e3a4bc67 Support std::(unordered_)?(multi)?set 2018-02-26 22:39:09 +01:00
Martchus 9e11d805c1 Prevent running Qt's generator on files from this generator 2018-02-05 21:21:56 +01:00
Martchus 54d4a15d4f Set Clang's resource dir and platform triple correctly
* The option `-resource-dir` must be specified to
  point to Clang's resource directory containing built-in
  header files. Then the massive warnings are gone.
* Setting the platform triple seems to be the right way
  for cross-compilation. Note that the stdlib.h still needs
  to be worked around.
2018-02-03 15:44:10 +01:00
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 c36279665d Fix cross-compilation with mingw-w64 2018-01-20 18:10:58 +01:00
Martchus 742511ba10 Add CMake module paths of c++utilities for library 2018-01-12 15:55:10 +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 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 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 86a577748e Allow direct serialization of iteratables 2017-11-18 00:28:24 +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 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 a7f587cb84 Support std::map and std::unordered_map 2017-11-13 20:16:43 +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 ee0ca561c0 Allow exporting generated functions and don't inline by default 2017-11-11 22:53:40 +01:00
Martchus 0d74d915f8 Allow optionally (de)serializing private members 2017-11-09 01:11:00 +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 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