A tree object that can be packed into an array of bytes and unpacked again. More...
Public Member Functions
|constructs a new tree with a root and zero branches. |
|int||recursive_packed_size () const|
|spiders the tree starting at this node to calculate the packed size. |
|void||recursive_pack (basis::byte_array &packed_form) const|
|packs the whole tree starting at this node into the packed form. |
Static Public Member Functions
|static packable_tree *||recursive_unpack (basis::byte_array &packed_form, packable_tree_factory &creator)|
|unpacks a tree stored in "packed_form" and returns it. |
A tree object that can be packed into an array of bytes and unpacked again.
|void nodes::packable_tree::recursive_pack||(||basis::byte_array &||packed_form||)||const|
|packable_tree * nodes::packable_tree::recursive_unpack||(||basis::byte_array &||packed_form,|
unpacks a tree stored in "packed_form" and returns it.
if NIL is returned, then the unpack failed. the "creator" is needed for making new derived packable_tree objects of the type stored.
References structures::stack< contents >::acquire_pop(), nodes::tree::attach(), nodes::ATTACH_BRANCHES, nodes::BRANCHES_FOLLOW, nodes::packable_tree_factory::create(), nodes::FINISH, NIL, structures::stack< contents >::push(), structures::stack< contents >::size(), basis::packable::unpack(), and basis::WHACK().