Martchus
dd652b4de7
Apply CMake format
2019-10-12 19:04:17 +02:00
Martchus
d8e626d259
Fix toJsonDocument() for maps
2019-10-05 01:05:48 +02:00
Martchus
f21f255e94
Don't use the same enum names twice
...
Prevents
```
[ 168s] /home/abuild/rpmbuild/BUILD/reflective-rapidjson-1563638877.5f7c18b/lib/tests/jsonreflector.cpp:41:12: warning: type 'SomeEnumClass' violates the C++ One Definition Rule [-Wodr]
[ 168s] 41 | enum class SomeEnumClass {
[ 168s] | ^
[ 168s] /home/abuild/rpmbuild/BUILD/reflective-rapidjson-1563638877.5f7c18b/lib/tests/binaryreflector.cpp:39:12: note: a type with different precision is defined in another translation unit
[ 168s] 39 | enum class SomeEnumClass : std::uint16_t {
[ 168s] | ^
```
observed in LTO-enabled builds
2019-08-09 17:48:08 +02:00
Martchus
a2b40753c3
Adapt adding include dirs to c++utilities 5
2019-06-20 22:53:03 +02:00
Martchus
6542eab80d
Adapt to changes in c++utilities
2019-06-14 19:16:51 +02:00
Martchus
8cac133104
Adapt to changes in c++utilities
2019-06-10 22:46:06 +02:00
Martchus
2194000938
Apply cmake-format 0.5.1
2019-06-01 12:16:27 +02:00
Martchus
dd174920fe
Adapt to c++utilities v5
2019-05-04 16:09:58 +02:00
Martchus
9b80d662bb
Catch polymorphic type by reference
2019-04-19 22:24:32 +02:00
Martchus
2b0acbdd1e
Cast pointer to the right type on non 64-bit architectures
...
That could explain why the tests sometimes fail under armv7l (before
making the fix for big pointer IDs).
2019-03-08 17:44:20 +01:00
Martchus
0bf19df0d9
Add explicit test for type mismatch on binary serialization
2019-03-08 17:40:36 +01:00
Martchus
04852627b2
Fix binary serializiation of shared_ptr too big for variable length encoding
...
* Retain backward compatibility by using either variable length int
or regular 64-bit int extending the flags
* Add test for both cases
2019-03-08 17:40:08 +01:00
Martchus
1f6fade6c2
Apply cmake-format
2019-02-09 21:25:11 +01:00
Martchus
39dcba215e
Let CMake generate code for test application
2019-01-13 22:27:35 +01:00
Martchus
974c0b0396
Allow to obtain only the JSON document
...
So the final serialization can be customized
2018-11-11 22:55:59 +01:00
Martchus
712eb4fb28
Fix compiling with GCC
...
Template specializations produced by the macros apparently
must be in the same namespace for GCC (not sure whether this
is actually enforced by the standard).
2018-11-01 04:54:46 +00:00
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