specs icon indicating copy to clipboard operation
specs copied to clipboard

Dynamic MarkerComponents

Open jkelleyrtp opened this issue 5 years ago • 1 comments

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?

jkelleyrtp avatar Feb 06 '20 06:02 jkelleyrtp

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 ?

a1phyr avatar Feb 07 '20 22:02 a1phyr