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

Dynamic MarkerComponents #676

Open
jkelleyrtp opened this issue Feb 6, 2020 · 1 comment
Open

Dynamic MarkerComponents #676

jkelleyrtp opened this issue Feb 6, 2020 · 1 comment

Comments

@jkelleyrtp
Copy link

I'm curious if it's possible to implement a way of tagging items dynamically. Currently, the status quo is to use the marker component, but there might be times where the marker might be user-generated at runtime rather than at compile time. Is there a current strategy implemented in Specs without me having to implement a custom storage solution?

@a1phyr
Copy link
Contributor

a1phyr commented Feb 7, 2020

Maybe you could use a Set<T> as a component (given that you use type T to represent user-generated markers) and check whether the value corresponding a given marker is in the Set ?

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

No branches or pull requests

2 participants