Skip to content

Commit

Permalink
Add an Iterate method to walk a tree (#22)
Browse files Browse the repository at this point in the history
* Add an Iterate method to walk a tree

This is useful to dump the tree to disk and restore it for example. A
second commit would contain the generated code for the specialized
versions.

* Add generated code for the Iterate method
  • Loading branch information
vincentbernat authored Aug 8, 2022
1 parent dc67e04 commit f3af281
Show file tree
Hide file tree
Showing 98 changed files with 3,805 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ipv6code:
cp template/tree_v4.go template/tree_v6_generated.go
$(SED) -i -e 's/Template file./Code generated by automation. DO NOT EDIT/' template/tree_v6_generated.go
$(SED) -i -e 's/TreeV4/TreeV6/g' template/tree_v6_generated.go
$(SED) -i -e 's/TreeIteratorV4/TreeIteratorV6/g' template/tree_v6_generated.go
$(SED) -i -e 's/treeNodeV4/treeNodeV6/g' template/tree_v6_generated.go
$(SED) -i -e 's/IPv4Address/IPv6Address/g' template/tree_v6_generated.go

Expand Down
77 changes: 77 additions & 0 deletions bool_tree/tree_v4.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions bool_tree/tree_v4_manual.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions bool_tree/tree_v6_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions bool_tree/tree_v6_manual.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions bool_tree/trees.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions byte_tree/tree_v4.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions byte_tree/tree_v4_manual.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f3af281

Please sign in to comment.