Convenience class for generating a parameter id.
More...
#include <mostlyharmless_Parameters.h>
Convenience class for generating a parameter id.
Generates a hash for the given string, to be used as a unique parameter id when registering the parameters in the framework. Note that this hinges on your internalNames for each parameter being unique - if they're not, all hell will break loose
◆ ParameterID()
mostly_harmless::ParameterID::ParameterID |
( |
std::string_view | internalName | ) |
|
|
inlineexplicit |
Creates a ParameterID from a given string view. Generates the hash for the string at construction, and stores as a member.
- Parameters
-
internalName | The name to hash. Again, when using this to create params, make sure this is unique! |
◆ toString()
std::string mostly_harmless::ParameterID::toString |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Converts the PID to a string.
- Returns
- std::to_string on the pid member.
◆ pid
const std::uint32_t mostly_harmless::ParameterID::pid |
The hashed representation of the argument passed to the constructor.
The documentation for this struct was generated from the following file: