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 public getters and setters to various classes #286

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dgelessus
Copy link
Contributor

These classes were already fully implemented, but had no public API beyond the basic read/write methods, so there was no way to interact with them outside libHSPlasma. This PR adds getters and setters where appropriate and converts some classes to public structs.

This is a somewhat random selection of classes (I was experimenting with PrpShop and these are the ones I stumbled across). There are probably still more places that could use the same treatment.

@dgelessus
Copy link
Contributor Author

I'm noticing now that the first few commits of this PR overlap with #253. The other PR should probably be merged first, then I can rebase this PR to drop the redundant changes.


public:
plKey getDefaultMesh() const { return fDefaultMesh; }
ST::string getRootName() const { return fRootName; }
Copy link
Member

Choose a reason for hiding this comment

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

I would probably return strings as references, since they will potentially invoke a deep copy otherwise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Most existing getters return ST::string by copy though (which is why I did the same thing initially).

@dgelessus dgelessus force-pushed the add_missing_getters_setters branch from 6a5aaa8 to 0fd72a5 Compare March 2, 2025 12:12
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.

2 participants