Metadata< Metadata_T, Object > Class Template Reference

Static metadata implementation. More...

Detailed Description

template<typename Metadata_T, typename Object>
class Metadata< Metadata_T, Object >

Static metadata implementation.

This class is used to provide various kind of metadata on the classes in the software. It is akin to a compile-time map<key, value>.

The usage looks like :

Static metadata implementation.
Definition: lib/score/tools/Metadata.hpp:36

The metadata has to be registered, either by hand :

template<>
struct Metadata<PrettyName_k, MyType>
{
static auto get() { return "some name"; }
};
Metadata to get the name that will be shown in the user interface.
Definition: lib/score/tools/Metadata.hpp:42

Or by using one of the various macros provided. Custom types are encouraged to provide macros to easily aggregate all the metadata required for them.

Note
Since the mechanism works by template specialization, it is necessary to put the macros or implementation outside of any namespace.

The documentation for this class was generated from the following file: