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

Add missing sidre group methods #674

Closed
rhornung67 opened this issue Oct 12, 2021 · 1 comment · Fixed by #1072
Closed

Add missing sidre group methods #674

rhornung67 opened this issue Oct 12, 2021 · 1 comment · Fixed by #1072
Assignees
Labels
enhancement New feature or request Reviewed Sidre Issues related to Axom's 'sidre' component

Comments

@rhornung67
Copy link
Member

rhornung67 commented Oct 12, 2021

For consistency with other methods, we should add methods to the Group class:

  • destroyGroupAndData()
  • destroyGroupsAndData()
  • destroyGroupSubtreeAndData()
  • destroyGroupSubtreesAndData()

See #100 for additional context

@nselliott
Copy link
Contributor

I have the following methods in progress. The AndData signifies that each will use the existing destroyViewAndData when destroying a View. This will destroy any Buffer that becomes attached to zero Views upon the destruction of its last View.

  • void destroyGroupAndData(const std::string& path);

  • void destroyGroupAndData(IndexType idx);
    These destroy a specific Group and its entire subtree.

  • void destroyGroupsAndData();
    This destroys all Groups owned by this Group. The Views directly owned by this are not affected. There is an analogous destroyViewsAndData() already in the code.

  • void destroyGroupSubtreeAndData();
    This destroys the entire subtree of this Group, both Views and Groups. this remains in existence as an empty Group.

At the top of this issue there is also the suggestion destroyGroupSubtreesAndData, but I am not sure what this would mean that is not redundant with what I have described here. Is there something more needed that I am overlooking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Reviewed Sidre Issues related to Axom's 'sidre' component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants