Commit Graph
89 Commits
Author SHA1 Message Date
Patrick Urbanke 1dcd6af373 Added Names to NamedTuple 2024-03-31 17:45:09 +02:00
Patrick Urbanke 63e7bf3d81 Allow tagged unions with explicit tags 2024-03-31 14:37:34 +02:00
Patrick Urbanke 32ac265293 Made sure we can serialize and deserialize empty structs 2024-03-31 12:33:54 +02:00
Patrick Urbanke 6f01c3fccb Minor bugfix in copy_from_named_tuple 2024-03-31 11:44:34 +02:00
Patrick Urbanke 12a294af71 Allow writing from pointers 2024-03-31 11:42:20 +02:00
Patrick Urbanke 58d89e717c Optimizationg for the reader and writer; #68 2024-03-16 09:58:26 +01:00
Patrick Urbanke 54785ec893 Use std::string_view for the field names during the write process 2024-03-10 16:32:53 +01:00
Patrick Urbanke 1e6bf03387 Minor bugfix in get_type_name 2024-03-03 17:13:15 +01:00
Patrick Urbanke eaa715362c Added explanatory notes for clang on windows 2024-03-03 11:08:29 +01:00
Patrick Urbanke d1a9bc6b61 Added the JSON schema; #25 2024-03-03 07:09:28 +01:00
stu 617226cd1d rename to get_underlying_enumerators 2024-03-01 19:02:51 +00:00
stu cdca9ac73a add get_enumerators_underlying and get_enumerator_array_underlying 2024-03-01 18:59:47 +00:00
stu c76e7a6471 add rfl::get_enumerators() and rfl::get_enumerator_array() 2024-02-22 15:24:20 +00:00
stu dd8118637c fix use of std::source_location on windows clang 2024-02-06 13:59:09 +00:00
Mark Melton 6a65d01a26 Two small fixes for clang/Darwin build
On clang/Darwin, the array member `arr_` in StringLiteral was not
considered initalized when constructed using "". Adding default
initialization fixed the issue.

On clang/Darwin, std::string was not defined in Result.hpp. Including
<string> fixed the issue.
2024-01-12 16:43:13 -05:00
Patrick Urbanke 05b6955358 Added missing header; #46 2024-01-07 23:09:00 +01:00
Patrick Urbanke 696289dbf2 Made sure that we can get field names from structs declared inside functions or unnamed namespaces; #46 2024-01-07 23:05:39 +01:00
Patrick Urbanke b63c246f92 Made sure that to_named_tuple (and, by extension, rfl::replace) works properly 2024-01-04 21:49:25 +01:00
Patrick Urbanke 03f6f2ef44 Moved Array.hpp and wrap_in_rfl_array_t into internal 2024-01-04 04:39:36 +01:00
Patrick Urbanke a89cca0a94 Added explanatory comments to num_fields.hpp 2024-01-04 04:14:42 +01:00
Patrick Urbanke f4d2cf57d7 Simplified flatten_c_arrays 2024-01-03 23:13:33 +01:00
Patrick Urbanke d6f3fa510d Got rid of the reinterpret_casts 2024-01-03 17:40:42 +01:00
hazby2002 804e0ed868 Wrap C arrays with rfl::Array. 2024-01-02 15:27:11 +08:00
hazby2002 fe956b3779 Implement read operation of Parser for c-arrays. 2024-01-02 13:38:51 +08:00
hazby2002 2d45ddfdc8 Change all decay to remove_cvref. 2023-12-29 17:05:16 +08:00
hazby2002 38783b8907 Fix num_fields to support c-style arrays. 2023-12-29 17:05:16 +08:00
Patrick Urbanke 07942bb64d Added more tests and more includes 2023-12-28 21:00:57 +01:00
liuzicheng1987 092f07fd43 Merge branch 'main' into 41-missing-headers 2023-12-28 20:28:25 +01:00
GregTheMadMonk f031b35452 Fix #41: add an include and a fordward declaration 2023-12-28 21:01:25 +03:00
Txema Ynzenga a28d649311 Merge rfl/to_view.hpp changes into relative-includes 2023-12-26 12:57:58 +01:00
Patrick Urbanke 7de20db53e Added support for rfl::to_view; #32 2023-12-24 13:50:23 +01:00
Txema Ynzenga c5e5815e73 Change project includes to relative 2023-12-23 01:04:57 +01:00
Patrick Urbanke 8ed390c3bf Suppress GCC warning 2023-12-22 19:43:19 +01:00
Patrick Urbanke be7b1932a5 Made sure that attributes are written properly 2023-12-21 22:43:32 +01:00
Patrick Urbanke c5347eee28 Added XML support; #21 2023-12-20 21:07:36 +01:00
Patrick Urbanke 72e29d32e1 std::tuple_size{} to std::tuple_size_v whereever applicable 2023-12-17 21:23:05 +01:00
Lixin Wei 75ebc0e897 Update no_duplicate_field_names.hpp 2023-12-17 20:04:46 +08:00
Ed Catmur f429bd994a Serialization of std::reference_wrapper
Only for serialization - similarly to pointers, this should not be used for deserialization.

As discussed https://github.com/getml/reflect-cpp/pull/20#issuecomment-1857491501 this requires changing the implementation of bind_to_tuple, since std::ref() collapses on a std::reference_wrapper.
2023-12-16 05:31:13 +00:00
Patrick Urbanke a547abd8c1 Added support for flag enums; handle unidentified enums 2023-12-14 19:38:52 +01:00
liuzicheng1987 79c24add9a Merge pull request #20 from ChemiCalChems/reduce-boilerplate
Reduce boilerplate 2, electric boogaloo, and extras
2023-12-10 12:52:18 +01:00
Patrick Urbanke 7ab3026dbe Fixed minor issues in the enum name extraction 2023-12-09 22:44:38 +01:00
Txema Ynzenga 28c602e195 Remove boilerplate to rfl::internal::to_ptr_field_tuple
Also ensure the same behavioral changes that happened to
move/copy_to_field_tuple are actual for to_ptr_field_tuple by wrapping
in fields if necessary
2023-12-09 21:50:37 +01:00
Txema Ynzenga b86d2078e1 Remove boilerplate from rfl::internal::move_to_field_tuple 2023-12-09 21:21:10 +01:00
Txema Ynzenga 0a86ff352d Remove boilerplate from rfl::internal::to_ptr_tuple 2023-12-09 21:05:56 +01:00
Txema Ynzenga cc6e4351be Add rfl::internal::bind_to_tuple 2023-12-09 21:05:56 +01:00
Patrick Urbanke e416283e41 Added support for enums; #3 2023-12-09 13:27:57 +01:00
Patrick Urbanke 2c761efdcd Included the meta field retrieval 2023-12-08 00:13:14 +01:00
Patrick Urbanke 385f6434c5 Make sure that we can retrieve the type names and tags at compile time 2023-12-07 23:18:06 +01:00
Patrick Urbanke 243b40ca4c Removed obsolete file 2023-12-06 23:27:55 +01:00
Patrick Urbanke 5e0de0246c Added support for compile-time field name retrieval 2023-12-06 22:52:00 +01:00