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 accessors for context data #1529

Merged
merged 1 commit into from
May 19, 2022
Merged

Add accessors for context data #1529

merged 1 commit into from
May 19, 2022

Conversation

LaurentiuCristofor
Copy link
Contributor

This PR adds some "shortcut" accessors for context data that is more frequently used.

Accessors of scalar type variables are read-only (getters), but accessors of objects are returning a reference, which allows calling additional methods to update them. I didn't create explicit setters because each piece of data is usually set once but accessed more times.

Copy link
Contributor

@senderista senderista 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, this helps readability a lot!

@LaurentiuCristofor LaurentiuCristofor merged commit 9c5d502 into master May 19, 2022
@LaurentiuCristofor LaurentiuCristofor deleted the laur_accessors branch May 19, 2022 19:59
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