[xsde-users] Newbie - How to traverse my data structures?
Boris Kolpackov
boris at codesynthesis.com
Tue Sep 23 03:43:29 EDT 2008
Hi Mark,
Mark Easton <mark63 at azurebell.co.nz> writes:
> Duhh, sorry. I just realised that from my site_serializer I can access my
> area_serializer and therefore tell it which record to use. I guess that is
> the right way to do it.
>
> I found that I had to cast area_serializer to (area_simpl)area_serializer.
You can definitely do it this way, however, there is a mechanism that
allows you to pass custom data from "parent" serializers (site_serializer
in your case) to "child" serializers (area_serializer in your case).
This mechanism is explained in Chapter 4, "Type Maps" in the Embedded
C++/Serializer Mapping Getting Started Guide:
http://codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/#4
In particular, note how people_simpl passes individual person records
to person_simpl. You may also want to read the previous Chapter 3,
"Serializer Skeletons" since that's where the schema used in Chapter
4 is introduced.
Boris
More information about the xsde-users
mailing list