wc-duck / datalibrary

Open Source Data Library for data serialization.
Other
42 stars 8 forks source link

Add "tag" support on structs, members, enums and enum-members #35

Closed wc-duck closed 6 years ago

wc-duck commented 8 years ago

It should be possible to add "tags" to each of the above mentioned parts of a typelibrary for the user to use as they see fit. ( mostly for editor/tools use ).

A tag should be any string and dl will put no meaning to these. On each of the aboved items a list of these tags should be valid.

Tags use-case examples: "file" to indicate that a string should be a file "range(0,100)" to say the range of an int. "slider" should be edited by a slider in some editor. Note: This will NOT be implemented by dl, only the tag-support.

lundmark commented 8 years ago

Oh +1! That would be awesome.

lundmark commented 6 years ago

After having checked out how the member parsing / implementation is done, I think I could probably fix this feature and create a pull-request if wanted?

wc-duck commented 6 years ago

Maybe... There is one other possible solution to this, but it is more complicated. Just making metadata an array of dl-structs. Then we could embed any metadata without having dl dictate what that metadata is.

lundmark commented 6 years ago

Hmmm, not sure what you mean with "array of dl-structs" in this context?

wc-duck commented 6 years ago

You define your metadata as dl-types and then the metadata of a type as

"metadata" : [ { "range" : { "min" : 1, "max" : 5 } ]

wc-duck commented 6 years ago

On types or on members that is!

lundmark commented 6 years ago

Ooooooooooooooooohhhhhhhhhhhhhhhh... That's really nice!

lundmark commented 6 years ago

To be honest I think that this is maybe solved by the comment-functionality, or what do you think?

wc-duck commented 6 years ago

I still think metadata is a better solution, but maybe that is better as a new issue?

lundmark commented 6 years ago

Hmmm yeah probably a new issue. It's a completely different system and even more awesome to be honest.

wc-duck commented 6 years ago

Replaced by #97