From c16fe5421ef08fed30a6f95b45057b7008523080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Mon, 27 Apr 2009 10:59:16 +0000 Subject: [PATCH] new file --- doc/examples/list_serialization.cxx | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/examples/list_serialization.cxx diff --git a/doc/examples/list_serialization.cxx b/doc/examples/list_serialization.cxx new file mode 100644 index 0000000..ecde5f6 --- /dev/null +++ b/doc/examples/list_serialization.cxx @@ -0,0 +1,42 @@ +/*! @file + + @id $Id: inherit_serialization.cxx 26 2009-04-24 07:13:10Z $ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +// g++ -I../../src ../../src/xml.cxx list_serialization.cxx + +#include +#include +#include +#include + +class A: public xml::Serialize { + public: + std::list list; + protected: + void initXmlMembers() { + className("A"); + persist(list, "list", "item"); + } +}; + +int main(int, char**) { + std::stringstream ss("\n" + "\t\n" + "\t\tHello\n" + "\t\tWorld\n" + "\t\thow\n" + "\t\tare\n" + "\t\tyou\n" + "\t\n" + ""); + A a; + std::cout<<"Schema:\n"<