228 Commits

Author SHA1 Message Date
Randolph Voorhies
480cfcc4b6 Added array unit tests 2013-06-13 17:54:42 -07:00
Randolph Voorhies
d1abb9effa Fixing error when serializing arrays with internal
We need to be careful about accepting values as const in our save and
load functions for containers. Consider the following example:

SomeStruct has an internal serialize method. We want to serialize an
array of these things, and so we write a function like:

  void save(BinaryOutputArchive & ar, std::array<SomeStruct, N> const & arr)
  {
    for(SomeStruct const & s : arr) ar & s;
  }

Now we're screwed, because SomeStruct's serialize function looks like
this:

  struct SomeStruct
  {
    template<class Archive>
    void serialize(Archive & ar) // notice there is no const qualifier here!
    { ... whatever ... }
  };

So, the solution is to write a non-const and a const version of save for
containers of non-arithmetic types.
2013-06-13 17:39:27 -07:00
Randolph Voorhies
d198eea570 Merge branch 'master' of git.r-c-v.com:rand/cereal 2013-06-13 17:12:15 -07:00
Awesome Robot
1f5cc9f8b0 adding map and multimap 2013-06-13 17:04:02 -07:00
Randolph Voorhies
bb3f5409d8 Added unit tests for pointers 2013-06-13 17:02:46 -07:00
Awesome Robot
80d0d4ab05 adding support for more stl types 2013-06-13 16:55:56 -07:00
Randolph Voorhies
0186e16fcb Adding unit tests for POD types 2013-06-13 16:54:32 -07:00
Awesome Robot
bb39747ca9 array support 2013-06-13 16:44:19 -07:00
Awesome Robot
a723dfb47a Added unique_ptr 2013-06-13 16:15:03 -07:00
=
b4afce223b Added weak_ptr support 2013-06-13 16:07:36 -07:00
Laurent Itti
58abf1d2b9 std::shared_ptr works with pointer tracking 2013-06-13 15:54:08 -07:00
Randolph Voorhies
e11edef4c8 Made a special case for arithmetic vectors 2013-06-13 13:29:37 -07:00
Shane Grant
97304f8272 working on pointer support 2013-06-13 12:17:59 -07:00
Shane Grant
4d56ae215b Moving things around into folders; starting to add individual files for support for various standard library things.
Pointers will take some careful thought
2013-06-13 11:31:55 -07:00
Randolph Voorhies
1b7d5387d2 Starting a JSON archive 2013-06-12 20:37:36 -07:00
Shane Grant
b1ef8f9ddb Minor docs 2013-06-12 18:01:02 -07:00
Shane Grant
a4498932e4 Added string loading 2013-06-12 17:57:35 -07:00
Shane Grant
5d24d9f066 Basic deserialization now working 2013-06-12 17:50:30 -07:00
Shane Grant
3210a2b3c3 Splitting out basic functionality to OutputArchive 2013-06-12 17:04:18 -07:00
Shane Grant
41e4211748 added string serialization 2013-06-12 15:22:44 -07:00
Shane Grant
aeeb326477 fixed nvp macro 2013-06-12 14:54:03 -07:00
Shane Grant
679caf17ba NVPs more or less working 2013-06-12 14:52:18 -07:00
Shane Grant
71cd5c3cb5 Fixed const stuff on save/load 2013-06-12 14:33:00 -07:00
Shane Grant
f6f0b37c5b Removing versioning completely 2013-06-12 13:56:32 -07:00
Randolph Voorhies
be5d1581d4 Class versioning working 2013-06-12 11:18:35 -07:00
Randolph Voorhies
c8c6846905 Awesome detection of serialization method works 2013-06-12 11:04:24 -07:00
Randolph Voorhies
149771df0f Having trouble getting non_member versions to work 2013-06-11 19:40:17 -07:00
Randolph Voorhies
a5dcb04c97 First commit - basic split/serialize checking works 2013-06-11 18:18:21 -07:00