Flatten Data Member Function

Traverses each <Node> in the source <NodeBuffer> and performs a breadth-first search to find all nested child <Node> objects. Populates the destination <NodeBuffer> with non-owning pointers to these <Node> objects.

Prototype

int32 Flatten( NodeBuffer src, NodeBuffer dst, int32 p_nReserve )

Parameters

Parameter Type Parameter Name Documentation
<NodeBuffer>srcA pointer to the source <NodeBuffer>.
<NodeBuffer>dstA pointer to the destination <NodeBuffer>.
int32p_nReserveThe amount of the reserve allocation for the destination <NodeBuffer>. Try to set this value to something appropriate for the number of <Node> pointers you expect to have in the destination <NodeBuffer>.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.