Adding additional meta information to properties or methods can be very useful. So for instance, it allows to add ToolTips or the information what kind of editor should be created in the GUI. You can also tag certain properties to make only those available in a scripting engine which has a certain key set.
The metadata consists of a
key and a
value, both objects are forwarded to variants. So the only requirement for metadata is that it has to be copyable.
Please take a look at following example:
It has following synopsis:
This will register a global property named
"value" with two metadata informations. The first use an enum type as key, the second a string.
And the following snippet shows, how to retrieve this information:
Every property, method, enumeration and constructor can have metadata.