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"<