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

Merged

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
Copy link
Contributor

@kmuseth kmuseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@danrbailey danrbailey changed the base branch from feature/tree_api_tests to master October 26, 2024 23:51
@danrbailey danrbailey merged commit 60a9314 into AcademySoftwareFoundation:master Oct 28, 2024
40 checks passed
@danrbailey danrbailey deleted the root_api_changes branch October 28, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants