Skip to content

Add missing public getters and setters to various classes#286

Merged
zrax merged 7 commits into
H-uru:masterfrom
dgelessus:add_missing_getters_setters
Oct 11, 2025
Merged

Add missing public getters and setters to various classes#286
zrax merged 7 commits into
H-uru:masterfrom
dgelessus:add_missing_getters_setters

Conversation

@dgelessus

Copy link
Copy Markdown
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.

Comment thread core/PRP/Geometry/plMorphDelta.h
@dgelessus

Copy link
Copy Markdown
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.

Comment thread core/PRP/Avatar/plArmatureMod.h Outdated

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

Copy link
Copy Markdown
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
Copy Markdown
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
@dgelessus dgelessus force-pushed the add_missing_getters_setters branch from 0fd72a5 to 6b47499 Compare October 11, 2025 21:38
@zrax zrax merged commit 85200e4 into H-uru:master Oct 11, 2025
8 checks passed
@dgelessus dgelessus deleted the add_missing_getters_setters branch October 12, 2025 00:08
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