Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RootNode API Changes #1931

Open
wants to merge 7 commits into
base: feature/tree_api_tests
Choose a base branch
from

Conversation

danrbailey
Copy link
Contributor

This implements a number of changes to the RootNode. These methods are now part of the public API:

  • RootNode::tileCount() - renamed from getTileCount
  • RootNode::activeTileCount() - renamed from getActiveTileCount
  • RootNode::inactiveTileCount() - renamed from getInactiveTileCount
  • RootNode::hasKey()
  • RootNode::coordToKey()

This new method is added - RootNode::deleteChildOrTile()

This introduces the ability to delete a child or tile from a RootNode. This was previously not possible, except for an unintuitive workaround by adding a background tile (which implicitly replaced the child or tile), then to erase all background tiles.

A bug was fixed in RootNode::setOrigin() where the origin was updated before the error was thrown allowing the user to catch the error and potentially leaving the root in an invalid and unsupported state.

Finally, I added a new RootNode unit test that added additional validation that wasn't previously being done and to confirm the changes in behaviour mentioned above. (Note this unit test is added using SPDX Apache-2.0 so #1928 needs to be merged first).

@danrbailey danrbailey changed the base branch from feature/drop_abi_9 to feature/tree_api_tests October 17, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant