Commit Graph
51 Commits
Author SHA1 Message Date
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
Txema Ynzenga ae58ddab5f Remove boilerplate from rfl::internal::get_field_names
Also delete rfl::internal::get_field_name_ptrs, its previous purpose was
to store boilerplate but after the previous commit, and it only being
used in one place, it can be removed without issues
2023-12-06 17:47:11 +01:00
Txema Ynzenga 963465a0ab Remove boilerplate in rfl::internal::get_field_name_ptrs 2023-12-06 17:33:23 +01:00
Txema Ynzenga decaf003e2 Make rfl::internal::to_ptr_tuple constexpr 2023-12-06 17:31:12 +01:00
Txema Ynzenga 9944b743d0 Add rfl/internal/num_fields.hpp 2023-12-06 16:05:25 +01:00
Patrick Urbanke 2e3872c651 Fixed -fsanitize=undefined issue; #16, possibly #15 2023-12-04 20:16:09 +01:00
Patrick Urbanke b84453a099 Disable false positives in MSVC compilation 2023-12-03 20:16:42 +01:00
Patrick Urbanke c92f1d0b33 get_struct_name for MSVC 2023-12-03 17:38:25 +01:00
Patrick Urbanke f2fb381063 Made sure that struct names can be retrieved on MSVC 2023-12-03 17:04:12 +01:00
Patrick Urbanke 1382a2a505 Compile the JSON tests separately 2023-12-03 16:52:24 +01:00
Patrick Urbanke 013325fcab Minor tweaks to make sure things work on MSVC 2023-12-02 21:54:05 +01:00
Patrick Urbanke fd92304a1c Minor bugfix: Make sure that is_required is maintained inside Rename 2023-11-29 20:44:02 +01:00
Patrick Urbanke 456fc33613 Added support for tagged unions without explicitly tagging the structs 2023-11-28 19:09:14 +01:00
Patrick Urbanke abe7bd3546 Made sure that automatic field retrieval works in the context of tagged unions 2023-11-27 20:04:30 +01:00
Patrick Urbanke ac244c082d Added more features to the automated field name retrieval 2023-11-27 19:51:30 +01:00
Patrick Urbanke b527faeebb Added clang support for automatic field retrieval 2023-11-22 00:22:39 +01:00
Patrick Urbanke f55f8e3b24 Retrieve field names for struct with arbitrary amount of fields 2023-11-21 21:49:03 +01:00
Patrick Urbanke 81c14ec63d Added basic support for automated field name retrieval 2023-11-21 21:07:35 +01:00
Patrick Urbanke 23eaad1629 Added support for struct flattening in anonymous fields 2023-11-15 00:49:19 +01:00
Patrick Urbanke 27263ee611 Added move_tuple_to_struct 2023-11-13 22:29:16 +01:00
Patrick Urbanke d8faf14dc9 Added flatten_ptr_tuple 2023-11-13 21:28:47 +01:00
Patrick Urbanke 4792d596ee Added compile-time checks disallowing pointers 2023-11-12 22:25:08 +01:00
Patrick Urbanke c206699f64 Removed type names with leading underscore followed by capital letter; #9 2023-11-11 14:11:29 +01:00
Patrick Urbanke 540af2d0cb Merge branch 'main' of github.com:getml/reflect-cpp 2023-11-08 21:32:44 +01:00
Patrick Urbanke 63a9de90b3 Added thread-safe memoization 2023-11-08 21:32:31 +01:00
Patrick Urbanke 91cba55edb Added reading and writing for anonymous fields 2023-11-06 21:10:03 +01:00
Patrick Urbanke 57dad0df3f Began implementing support for anonymous structs 2023-11-05 20:09:29 +01:00
Patrick Urbanke 815b9fc45d Added AnyOf and more comparisons 2023-11-01 22:28:38 +01:00
Patrick Urbanke a0d6aa1b05 Fixed typo 2023-10-30 17:50:44 +01:00
Patrick Urbanke d0a66a673d Better error message for unsupported types 2023-10-30 17:50:35 +01:00
Patrick Urbanke f48e0ff425 Greatly simplified constructible_with_n_fields 2023-10-24 21:30:24 +02:00
Patrick Urbanke 383dde14f5 Use string_view to compare the fields 2023-10-15 13:45:07 +02:00
Patrick Urbanke 745c7ead2c Added support for clang 2023-10-09 21:08:05 +02:00
Patrick Urbanke fed24baea5 Added tests for replace_flatten 2023-10-07 21:37:19 +02:00
Patrick Urbanke c365d1b308 Made sure we support zero-copy replace 2023-10-07 21:00:01 +02:00
Patrick Urbanke 2b50fb8ce0 Made the .to_class(...) method optional 2023-10-07 13:53:16 +02:00
Patrick Urbanke 21803f509e Added support for std::unique_ptr and rfl::Box 2023-10-07 12:23:48 +02:00
Patrick Urbanke ce5ec98815 Added the field variant 2023-10-03 11:27:42 +02:00
Patrick Urbanke b67a2fabab Added support for setting default values 2023-10-02 19:12:01 +02:00