|
cgv
|
A helper class to simplify registering color schemes in a registry and counting the number of successful registrations. More...
#include <color_scheme.h>
Public Member Functions | |
| color_scheme_registry_helper (RegistryT ®istry, const std::set< ColorSchemeType > &types) | |
| Construct using a reference to the used registry and supported set of types. | |
| void | load (const std::string &name, const ColorSchemeT &scheme) |
| Register a color scheme under the given name. | |
| bool | can_load (ColorSchemeType type) const |
| Return whether the registry helper can load the given type of color scheme. | |
| size_t | loaded_count () const |
| Return the count of successfully registered color schemes. | |
A helper class to simplify registering color schemes in a registry and counting the number of successful registrations.
Can be configured to only accept certain color scheme types.
| RegistryT | The registry type. Must accept ColorSchemeT. |
| ColorSchemeT | The color scheme class type. |
Definition at line 231 of file color_scheme.h.
|
inline |
Construct using a reference to the used registry and supported set of types.
| registry | The used color scheme registry. |
| types | The supported color scheme types. |
Definition at line 237 of file color_scheme.h.
|
inline |
Return whether the registry helper can load the given type of color scheme.
| type | The color scheme type to query. |
Definition at line 251 of file color_scheme.h.
|
inline |
Register a color scheme under the given name.
| name | The color scheme name. |
| scheme | The color scheme. |
Definition at line 243 of file color_scheme.h.
|
inline |
Return the count of successfully registered color schemes.
Definition at line 256 of file color_scheme.h.