
On Fri, Nov 6, 2009 at 11:00 AM, Noah Roberts
In article
, emildotchevski@gmail.com says... On Thu, Nov 5, 2009 at 4:08 PM, Noah Roberts
wrote: Consider something like so:
struct A { ...? };
struct B { std::list<A> items; };
struct C { A const* ptr_to_item_in_B_items; };
I want to recover the structure layout. If a C had a pointer to A item X in C then when it reloads it should point at X again.
Sure but what do you imagine in terms of a serialization library? Obviously, *you* could serialize your pointer, for example as index in the list, but all that the serialization library sees is a pointer. It has no way of knowing that it points an element within the list, it has no way of knowing that there is a list even. But maybe I'm missing something so I asked how would that work. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode