Skip to content

bakwc/HandyPack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HandyPack

Build Status

Tiny C++ serializer. Single-header, supports POD types, classes and STL containers.

#include "handypack.hpp"

using namespace NHandyPack;

struct Bar {
  int A;
  std::vector<std::string> B;
  std::list<Foo> C;
  HANDYPACK(A, B, C)
}

Bar bar;
std::stringstream out;
bar.Save(out);

std::string data = out.str();

Bar bar2;
imemstream in(data.c_str(), data.size());
bar2.Load(in);