From: Raymond S. <rs...@cs...> - 2006-08-03 22:46:27
|
Brian Gerkey wrote: > On Aug 2, 2006, at 3:21 PM, Toby Collett wrote: > > >> Geoff's XDR point was an implementation comment, the XDR >> implementation >> *requires* a count for each array otherwise it cant pack and unpack >> the >> data automatically. The only way around two counts is one count and a >> point structure with several values. >> > > Indeed. It's a limitation of the parser that I wrote to process > <player.h> and produce XDR marshaling functions. An array 'foo' will > be variable-length only if you have an accompanying integer field > 'foo_count' declared earlier in the structure. Otherwise, it will be > transmitted fixed-length (XDR calls these vectors) at its maximum size. > Ah OK that makes sense ... So what do people feel will be the lesser of two "potential evils"? Having two counters that should be in step or having a new datatype that would contain both an existing 3D point and a colour? Actually that brings up another question I've been wondering about ... say a new datatype was created for each entry in this vector (so it'd contain a 3D point and a colour). Can XDR handle this new datatype itself containing variable length data? Cheers! - Raymond |