[xsde-users] Newbie - How to traverse my data structures?

Mark Easton mark63 at azurebell.co.nz
Tue Sep 23 04:15:15 EDT 2008


Oh, ok. Many thanks Boris! I had read chapter three quite quickly, but had
not got on to chapter four yet. Will study that tonight and change my code
tomorrow. Great tool!


 

> -----Original Message-----
> From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
> Sent: Tuesday, September 23, 2008 7:43 PM
> To: Mark Easton
> Cc: xsde-users at codesynthesis.com
> Subject: Re: [xsde-users] Newbie - How to traverse my data structures?
> 
> 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/seria
> lizer/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