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

Substitution constants in trait views. #96

Open
2 tasks
Tracked by #70
elliotcmorris opened this issue May 28, 2024 · 1 comment
Open
2 tasks
Tracked by #70

Substitution constants in trait views. #96

elliotcmorris opened this issue May 28, 2024 · 1 comment

Comments

@elliotcmorris
Copy link
Contributor

elliotcmorris commented May 28, 2024

As a result of discussion about this : #70

Add constants to generated traits that support substitution (primarily locatableContent) to be used with substitution functions as the "keys"

For example

std::string resolvedPath = "/image_{frame}.png";
openassetio::utils::substitute(resolvedPath, {LocatableContent::FRAME_TOKEN, 123});

See how FRAME_TOKEN is provided, rather than just having to type out "frame" or whatever...

Tasks

@elliotcmorris
Copy link
Contributor Author

elliotcmorris commented Jun 10, 2024

This has more implications that you'd think. Currently what the substitution variables are are just docced in the IsTemplated property, when really they should/need to be data that can be generated from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant