595 Commits

Author SHA1 Message Date
Shane Grant
94d49c42ac is_in/out_serializable is now aware of specialization
count_in/out_serializers will now count the number of specializations if a type is
specialized, otherwise it will count the number of non-specialized serialization functions.

as a result of this, is_output/input_serializable now works as you would expect from the name
and will return true for correctly configured specialized types too.

this caused some logic changes to need to happen in cereal.hpp, mostly within the PROCESS_IF macro.

added some tests related to this change and #180

fixes #180
2015-04-04 18:19:22 -07:00
Shane Grant
b385b3958a Empty string fixes with XML serialization
Fixes #182
2015-04-04 15:09:23 -07:00
Shane Grant
aad1e371c7 Merge branch 'develop' of github.com:USCiLab/cereal into develop 2015-03-29 00:36:28 -07:00
Shane Grant
14bc429d9a Various fixes for warning level 4 with MSVC
closes #178
relates #151
2015-03-29 00:35:34 -07:00
Shane Grant
16084f734a Merge branch 'eschnett-patch-1' into develop 2015-03-04 15:28:11 -08:00
Erik Schnetter
4f1dc224e6 Prevent infinite template recursion for 11-element tuples 2015-03-03 21:29:04 -05:00
Shane Grant
9c9ca54829 doxygen comment fix 2015-02-12 11:52:35 -08:00
Shane Grant
c6b899ef1f Add getNodeName API see #166, #66 2015-02-04 10:40:59 -08:00
Joel Holdsworth
93e075f008 Fixed parameter naming in CEREAL_REGISTER_DYNAMIC_INIT and CEREAL_FORCE_DYNAMIC_INIT 2015-02-04 16:24:06 +00:00
Shane Grant
7e491356e3 doxygen comment fix 2015-01-18 15:33:30 -08:00
Shane Grant
c9fa441d7d Tidy up error messages 2015-01-18 15:28:54 -08:00
Shane Grant
4cd441e3a6 Update error messages for #160 2015-01-18 14:53:20 -08:00
Shane Grant
3c330b7507 Doxygen updates and some renaming re #160 2015-01-18 14:50:40 -08:00
Shane Grant
994aceeec0 Poly types no longer fail to compile if an already included archive is not compatible with the type.
Updated run time error to be more informative when polymorphic serialization fails.

working on changing CEREAL_REGISTER_SHARED_LIBRARY to less specific name and description
2015-01-18 01:13:43 -08:00
Shane Grant
b524b60ddf base_class behaves properly with minimal serialization
Added static_assert on improper use of base_class with non base class.
Removed ElideMinimal type and related traits.
Added BaseClassBase type which base_class and virtual_base_class inherit from.
Added traits to see if wrapped type is minimal, updated xml/json accordingly.
2015-01-17 13:53:42 -08:00
Shane Grant
6e41ed80b8 Merge branch 'issues_113_137' into develop
Conflicts:
	include/cereal/details/helpers.hpp
2015-01-17 00:45:25 -08:00
Shane Grant
419343a0c5 Fix unused var warning for static vars, add cmake rules for shared lib sandbox 2015-01-17 00:36:36 -08:00
Shane Grant
5dc59708ca remove debug printout 2015-01-16 22:37:44 -08:00
Shane Grant
724112cccb Remove experimental any implementation
relates #46
2015-01-16 15:47:25 -08:00
Shane Grant
418271f219 Marking adapters as FUTURE_EXPERIMENTAL
see notes in #46
2015-01-16 15:42:10 -08:00
unknown
9fb72cf6c4 Assertion failed in destructor of JSONOutputArchive when no object was serialized 2015-01-15 15:36:39 -08:00
Shane Grant
3f4358d61a code cleanup 2015-01-15 15:31:07 -08:00
Mikhail Kremnyov
00f47ed3b9 CEREAL_REGISTER_TYPE can now be called multiple times for the same type
Conflicts:
	include/cereal/cereal.hpp
	include/cereal/details/polymorphic_impl.hpp
2015-01-15 15:27:58 -08:00
Shane Grant
1a963d06c3 Add tag in anon namespace to allow multiple translation units for CEREAL_CLASS_VERSION
relates #137
2015-01-14 23:02:15 -08:00
Shane Grant
56e20c93bf clean up static_object, add export to class
relates #113 #137
2015-01-14 22:58:06 -08:00
Shane Grant
330e53f3a1 Merge branch 'erichkeane-XmlFix' into develop
Conflicts:
	include/cereal/archives/xml.hpp
2015-01-09 20:15:28 -08:00
Erich Keane
871436a9c6 Fixed off-by-one memory allocation in xml
This defect was discovered in issue #153, and resulted in reading
past memory.  This fix repairs the off-by-one situations.  Additionally,
in usages of this function where the size is known, it saves processing
by using the std::string's length property.

Signed-off-by: Erich Keane <erich.keane@verizon.net>
2015-01-09 17:44:22 -08:00
Shane Grant
f7ec6cfcc3 Documentation/typo corrections for tuple
relates #143
2015-01-09 10:29:23 -08:00
Shane Grant
c1c604876e Merge branch 'erichkeane-TupleKeyNames' into develop
Conflicts:
	include/cereal/types/tuple.hpp
2015-01-09 10:21:32 -08:00
Erich Keane
58d1675fe0 Changed tuple to generate names compile-time
tuple names are now generated at compile time.  Additionally,
a breaking-change of re-ordering tuples to be from first-last
rather than last-first has been included.
2014-12-22 13:06:24 -08:00
Erich Keane
a790351bef Implement Tuple Name Differences in XML/JSON
User rggjan requested that tuples provide a different name for each
element in this issue: https://github.com/USCiLab/cereal/issues/140.

This fix modifies tuple.hpp to generate tuple names in the order which
they are are placed in the tuple.  Note that this will appear to be a
countdown (tuple_element2, tuple_element1, tuple_element0) since tuples
are generated in reverse order.

Signed-off-by: Erich Keane <erich.keane@verizon.net>
2014-12-19 18:56:44 -08:00
Erich Keane
3d6cd67fe7 Implement Tuple Name Differences in XML/JSON
User rggjan requested that tuples provide a different name for each
element in this issue: https://github.com/USCiLab/cereal/issues/140.

This fix modifies tuple.hpp to generate tuple names in the order which
they are are placed in the tuple.  Note that this will appear to be a
countdown (tuple_element2, tuple_element1, tuple_element0) since tuples
are generated in reverse order.

Signed-off-by: Erich Keane <erich.keane@verizon.net>
2014-12-19 18:50:51 -08:00
Shane Grant
036e00c6ca fix typo 2014-11-12 15:21:32 -08:00
Shane Grant
72cb6e3c00 Merge branch 'develop' of github.com:USCiLab/cereal into develop 2014-11-12 15:18:06 -08:00
Shane Grant
cc5a7359c5 fix macro renaming bug introduced by earlier merge 2014-11-12 15:17:50 -08:00
Shane Grant
27ce5592f3 progress on #113
still not working properly - StaticObject will correctly be initialized but then we'll end up with more than one of them (one in DLL one in app)
2014-11-09 16:48:13 -08:00
Shane Grant
292f9760bd Progress on #113
Adding a VS sandbox to test DLLs, also a few changes in poly for DLL export
2014-11-09 14:52:45 -08:00
Shane Grant
e4aef13d75 Merge branch 'develop' into issues_113_137 2014-11-09 14:46:46 -08:00
Shane Grant
acc33b3a9b Replace template alias with normal struct because VS can't handle the truth 2014-11-09 14:45:00 -08:00
Shane Grant
93b5073c62 Mostly solution for 137
This is option 1 for #137 which I'm quite happy with.  Works across compilation units and
shared libs on linux, need to test on windows.

As for #113, it doesn't seem to be an issue on linux so just remains to sort that out on windows.
2014-11-09 14:25:45 -08:00
Shane Grant
3189f037b7 Fixed a trait relating to minimal serialization
closes #131
2014-10-31 11:07:32 -07:00
Shane Grant
9addb12616 Merge branch 'Support_Non-void_Return_Type_Functions' of https://github.com/ustulation/cereal into ustulation-Support_Non-void_Return_Type_Functions
Conflicts:
	include/cereal/access.hpp
2014-10-31 10:42:23 -07:00
ustulation
929cfe6217 For non-void type deduction by decltype, the functions should have an explicit return mentioned. Not having this breaks build for codes with serializing function signatures similar to the one below:
struct Cerealizable {
  template<typename Archive>
  Archive& serialize(Archive& ref_archive) {
    return ref_archive(stuff_0, stuff_1);
  }

  int stuff_0 {}, stuff_1 {};
};

Build error in GCC with "-Wall -Werror" flags
2014-10-29 18:14:46 +05:30
Shane Grant
5dfd60063f Rename WrapperBase to ElideMinimal
Removed WrapperBase and added ElideMinimal instead, which is a trait that is checked by
text archives performing minimal serialization to see if they should go ahead and skip creating various nodes
and naming things.  Currently only used on base_class and virtual_base_class
2014-10-21 14:44:20 -07:00
Shane Grant
84fa7cd39f Merge branch 'issue_46' into develop
Accidentally did this on another branch, relates #129
2014-10-21 14:19:04 -07:00
Shane Grant
1e3190d444 Adding traits::WrapperBase to identify wrapped classes
relates #129
2014-10-21 14:14:56 -07:00
Shane Grant
d4d433daca Fix forward decl for #46
Passing tests on linux
2014-10-04 19:31:24 -07:00
Shane Grant
e054ec1b10 Merge branch 'issue_46' into develop relates #46 2014-10-04 19:15:05 -07:00
Shane Grant
97fa66f34e Doxygen doc updates for #46 2014-10-04 18:58:54 -07:00
Shane Grant
5715d7ad01 Clean up UserDataAdapter
Wrapped dynamic_cast in a cereal exception,
made the rtti function private,
updated test case to expect failure on some cases
2014-10-03 14:39:21 -07:00