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 8 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.

@@ -20,30 +20,25 @@
#include "PRP/plCreatable.h"
#include "Math/hsGeometry3.h"

class HSPLASMA_EXPORT plVertDelta
struct HSPLASMA_EXPORT plVertDelta
Copy link
Member

Choose a reason for hiding this comment

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

Why were these changed to structs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was the simplest way to make all the fields public. This seemed to be the convention in libHSPlasma for things that only hold simple data values.

But if you like, I can change it back to class and/or wrap the fields in getters/setters. I don't have opinions on the details here, as long as there's some way to access the data in the class.

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.

None yet

2 participants