A SERVICE OF

logo

Setting the Values in Scene Graph Nodes
63
Using Tokens to Set and Get Multiple-Value Fields
To use tokens to set or get multiple-value elds, you
1. Get a handle to the eld specied by the token.
2. Use the handle to set or get values from a specic variable in the eld.
For example:
csMFRef *F;
csGroup *g;
F = g->getField(CHILDREN);
F->append(child);
child = F->get(1);
To retrieve the specic child in the csGroup, the last line of code shows that you must
specify in the argument of get() which child you want returned; in this example, it is child
number one.