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 static accessor/mutator conveniences #35

Open
feltech opened this issue Aug 16, 2023 · 0 comments
Open

Add static accessor/mutator conveniences #35

feltech opened this issue Aug 16, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@feltech
Copy link
Member

feltech commented Aug 16, 2023

What

Generate static conveniences for trait accessors/mutators, such that the (C++) refcount of the TraitsData is not modified.

Why

C++ purists will balk at wrapping a TraitsData in a short-lived trait view to operate on it, likely necessitating a shared_ptr copy and refcount bump. This is a potentially measurable performance hit in large-volume operations.

E.g. we can add static variants such as getLocationFrom(const TraitsData&), and similarly setLocationTo.

@feltech feltech added the enhancement New feature or request label Aug 16, 2023
@feltech feltech changed the title Add non-refcount-increasing conveniences Add static accessor/mutator conveniences Aug 16, 2023
@foundrytom foundrytom transferred this issue from OpenAssetIO/OpenAssetIO-MediaCreation Aug 16, 2023
@elliotcmorris elliotcmorris added this to the v1.0.0 milestone Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants