937 Commits

Author SHA1 Message Date
Shane Grant
1e4398c5b2 adding missing cmake file 2015-01-17 11:40:15 -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
c2f881de5b reorganize sandbox_vs 2015-01-16 22:48:21 -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
0626809bac update vs sandbox 2015-01-14 23:05:41 -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
Shane Grant
f4290726af Adding some types to XML in sandbox 2015-01-09 20:14:32 -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
53aa47fd0d Merge branch 'ustulation-Support_Non-void_Return_Type_Functions' into develop
see #135
2014-10-31 10:46:43 -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
dfa871d5d8 Added test to VS build, related fixes
Relates to #46, passing on VS now
2014-10-05 18:01:12 -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
901489593f finish unit test for #46 2014-10-04 19:02:35 -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
Shane Grant
ed755a6fc5 Consolidate non member load minimal
relates #80
2014-09-27 23:33:58 -07:00
Shane Grant
669378d93b fix a typo 2014-09-27 18:25:57 -07:00
Shane Grant
7b51126bd3 Consolidate has_member_load_minimal
Relates #80
2014-09-27 18:24:12 -07:00
Shane Grant
43da02ddcf doxygen comment fix 2014-09-27 10:35:29 -07:00
Shane Grant
851e72bd1a Some ideas on solving adapters
This is a solution for #46 that uses RTTI to allow get_user_data to work
and throw an error when used in an archive that doesn't actually have user
data.  Unfortunately this is a run-time check and uses a dummy virtual function
that is never actually called (so the overhead of this will be very low, a few bytes
for the vtable, no runtime cost).

Another solution I'm going to play around with involves re-arranging some templates and
typedefs.
2014-09-26 21:59:18 -07:00
Shane Grant
3dba7636ba Merge branch 'develop' of github.com:USCiLab/cereal into develop 2014-09-26 15:03:26 -07:00
Shane Grant
2edc936e50 Better error messages for bad serialization
Inspired by #124, we now give explicit messages if you we can't find a serialization function
or if we find more than one.
2014-09-26 15:02:02 -07:00
Shane Grant
bbfd418013 Add traits for text archive identification
Archives that output text (human readable to some extent) should now derive from the type traits class
cereal::traits::TextArchive.

Testing for this can be done with cereal::traits::is_text_archive

Relates to #80
2014-09-06 22:28:10 -07:00