demo_struct.cpp:55 : tip: use -d to enable classloader debug output. demo_struct.cpp:96 : simplestruct looks like: (s11n::parens) data_node=(simplestruct (dbl 42.420000) (int 8) (str hello, s11n!) child=(simplestruct (dbl 7.700000) (int 7) (str Finally! Easy-to-use serialization in C++!) ) ) demo_struct.cpp:107 : Brute-force deserialized via an intermediary node: (s11n::parens) data_node=(simplestruct (dbl 42.420000) (int 8) (str hello, s11n!) child=(simplestruct (dbl 7.700000) (int 7) (str Finally! Easy-to-use serialization in C++!) ) ) demo_struct.cpp:118 : Loading new simplestruct from stream... demo_struct.cpp:122 : It looks like: (s11n::parens) data_node=(simplestruct (dbl 42.420000) (int 8) (str hello, s11n!) child=(simplestruct (dbl 7.700000) (int 7) (str Finally! Easy-to-use serialization in C++!) ) ) demo_struct.cpp:126 : Done! Run './demo_struct -map' to run the std::map demo, use -list to see lists and vectors, and use -mega to see a more complex example. demo_struct.cpp:55 : tip: use -d to enable classloader debug output. demo_struct.cpp:160 : proxied list : std::list (s11n::parens) data_node=("std::list" data_node=(simplestruct (dbl 2.800000) (int 1) (str 99 bottles of beer on the wall.) ) data_node=(simplestruct (dbl 5.600000) (int 2) (str 98 bottles of beer on the wall.) ) data_node=(simplestruct (dbl 8.400000) (int 3) (str 97 bottles of beer on the wall.) ) ) demo_struct.cpp:173 : Deserialized list should be indentical: (s11n::parens) data_node=("std::list" data_node=(simplestruct (dbl 2.800000) (int 1) (str 99 bottles of beer on the wall.) ) data_node=(simplestruct (dbl 5.600000) (int 2) (str 98 bottles of beer on the wall.) ) data_node=(simplestruct (dbl 8.400000) (int 3) (str 97 bottles of beer on the wall.) ) ) demo_struct.cpp:177 : Now let's "cast" the std::list to a std::vector: (s11n::parens) data_node=("std::vector" data_node=(simplestruct (dbl 2.800000) (int 1) (str 99 bottles of beer on the wall.) ) data_node=(simplestruct (dbl 5.600000) (int 2) (str 98 bottles of beer on the wall.) ) data_node=(simplestruct (dbl 8.400000) (int 3) (str 97 bottles of beer on the wall.) ) ) demo_struct.cpp:55 : tip: use -d to enable classloader debug output. demo_struct.cpp:207 : Here's our map: std::map (s11n::parens) data_node=("std::map" pair=("std::pair" first=(std::string (v 1x neat, innit?) ) second=(simplestruct (dbl 2.800000) (int 1) (str 1 bottle of beer on the wall.) ) ) pair=("std::pair" first=(std::string (v 2x neat, innit?) ) second=(simplestruct (dbl 5.600000) (int 2) (str 2 bottles of beer on the wall.) ) ) pair=("std::pair" first=(std::string (v 3x neat, innit?) ) second=(simplestruct (dbl 8.400000) (int 3) (str 3 bottles of beer on the wall.) ) ) ) demo_struct.cpp:216 : Deserialized: (s11n::parens) data_node=("std::map" pair=("std::pair" first=(std::string (v 1x neat, innit?) ) second=(simplestruct (dbl 2.800000) (int 1) (str 1 bottle of beer on the wall.) ) ) pair=("std::pair" first=(std::string (v 2x neat, innit?) ) second=(simplestruct (dbl 5.600000) (int 2) (str 2 bottles of beer on the wall.) ) ) pair=("std::pair" first=(std::string (v 3x neat, innit?) ) second=(simplestruct (dbl 8.400000) (int 3) (str 3 bottles of beer on the wall.) ) ) ) demo_struct.cpp:222 : Now let's clone() it: (s11n::parens) data_node=("std::map" pair=("std::pair" first=(std::string (v 1x neat, innit?) ) second=(simplestruct (dbl 2.800000) (int 1) (str 1 bottle of beer on the wall.) ) ) pair=("std::pair" first=(std::string (v 2x neat, innit?) ) second=(simplestruct (dbl 5.600000) (int 2) (str 2 bottles of beer on the wall.) ) ) pair=("std::pair" first=(std::string (v 3x neat, innit?) ) second=(simplestruct (dbl 8.400000) (int 3) (str 3 bottles of beer on the wall.) ) ) ) demo_struct.cpp:55 : tip: use -d to enable classloader debug output. demo_struct.cpp:276 : Our map looks like this: (s11n::parens) data_node=("std::map>" pair=("std::pair>" first=(std::string (v 0) ) second=("std::list" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #1) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #2) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #3) ) ) ) pair=("std::pair>" first=(std::string (v 1) ) second=("std::list" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 5.000000) (int 2) (str string #1) ) data_node=(simplestruct (dbl 9.000000) (int 3) (str string #2) ) data_node=(simplestruct (dbl 13.000000) (int 4) (str string #3) ) ) ) pair=("std::pair>" first=(std::string (v 2) ) second=("std::list" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 9.000000) (int 3) (str string #1) ) data_node=(simplestruct (dbl 17.000000) (int 5) (str string #2) ) data_node=(simplestruct (dbl 25.000000) (int 7) (str string #3) ) ) ) ) demo_struct.cpp:279 : Clone it: (s11n::parens) data_node=("std::map>" pair=("std::pair>" first=(std::string (v 0) ) second=("std::list" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #1) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #2) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #3) ) ) ) pair=("std::pair>" first=(std::string (v 1) ) second=("std::list" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 5.000000) (int 2) (str string #1) ) data_node=(simplestruct (dbl 9.000000) (int 3) (str string #2) ) data_node=(simplestruct (dbl 13.000000) (int 4) (str string #3) ) ) ) pair=("std::pair>" first=(std::string (v 2) ) second=("std::list" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 9.000000) (int 3) (str string #1) ) data_node=(simplestruct (dbl 17.000000) (int 5) (str string #2) ) data_node=(simplestruct (dbl 25.000000) (int 7) (str string #3) ) ) ) ) demo_struct.cpp:286 : Let's try "casting" it to a std::map> (s11n::parens) data_node=("std::map>" pair=("std::pair>" first=(std::string (v 0) ) second=("std::vector" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #1) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #2) ) data_node=(simplestruct (dbl 1.000000) (int 1) (str string #3) ) ) ) pair=("std::pair>" first=(std::string (v 1) ) second=("std::vector" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 5.000000) (int 2) (str string #1) ) data_node=(simplestruct (dbl 9.000000) (int 3) (str string #2) ) data_node=(simplestruct (dbl 13.000000) (int 4) (str string #3) ) ) ) pair=("std::pair>" first=(std::string (v 2) ) second=("std::vector" data_node=(simplestruct (dbl 1.000000) (int 1) (str string #0) ) data_node=(simplestruct (dbl 9.000000) (int 3) (str string #1) ) data_node=(simplestruct (dbl 17.000000) (int 5) (str string #2) ) data_node=(simplestruct (dbl 25.000000) (int 7) (str string #3) ) ) ) )