Norman Vine writes:

 > Jim Wilson writes:
 > >
 > > Is there a way to copy a block of properties
 > 
 > #include <simgear/misc/props_io.hxx>
 > copyProperties (const SGPropertyNode *in, SGPropertyNode *out)
 > 
 > But AFAIK this requires that the 'out' nodes exist
 > i.e. this copies but does not construct the nodes

No, that's wrong -- all of the nodes are created on demand except for
the root node.  This will work just fine:

  SGPropertyNode * saved_props = new SGPropertyNode();
  copyProperties(props, saved_props);


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to