![]() |
Sound Bakery  v0.1.0
Open-source audio middleware for games
|
Holds discrete named integer values. More...
#include <parameter.h>


Public Member Functions | |
| NamedParameter () | |
| Creates a NamedParameter with min and max values. | |
| SB::Core::DatabasePtr< NamedParameterValue > | addNewValue (const std::string_view name) |
| Adds a new value to the parameter. | |
| std::unordered_set< SB::Core::DatabasePtr< NamedParameterValue > > | getValues () |
| Gets all named values in this parameter. | |
| void | setSelectedValue (SB::Core::DatabasePtr< NamedParameterValue > value) |
| Sets the parameter value with a DatabasePtr, ensuring the value exists in this parameter. | |
| SB::Core::DatabasePtr< NamedParameterValue > | getSelectedValue () const |
| Get the selected value as a DatabasePtr. | |
Public Member Functions inherited from SB::Engine::Parameter< SB_ID > | |
| Parameter (SB_ID min, SB_ID max) | |
| Creates a Parameter with min and max values set. | |
| SB_ID | get () const |
| Get the current value of the parameter. | |
| SB_ID | getDefault () const |
| void | set (SB_ID value) |
| Set the value of the parameter. | |
| void | setDefault (SB_ID value) |
| ParameterProperty::PropertyChangedDelegate & | getDelegate () |
| Get the parameter delegate that fires when changing the value. | |
| LocalParameter | createLocalParameterFromThis () const |
| Copies this Parameter to a runtime version, suitable for handling unique variations per game object etc. | |
Public Member Functions inherited from SB::Core::DatabaseObject | |
| SB_ID | getDatabaseID () const |
| void | setDatabaseID (SB_ID id) |
| std::string_view | getDatabaseName () const |
| void | setDatabaseName (std::string_view name) |
| bool | getEditorHidden () const |
| void | setEditorHidden (bool hidden) |
| operator SB_ID () const | |
Public Member Functions inherited from SB::Core::Object | |
| template<typename T > | |
| T * | tryConvertObject () noexcept |
| Gets the most derived type of this object and upcasts it to T. | |
| template<typename T > | |
| const T * | tryConvertObject () const noexcept |
| rttr::type | getType () const |
Public Member Functions inherited from SB::Core::ObjectUtilities | |
| SB::Engine::System * | getSystem () const |
| sc_system * | getChef () const |
| ma_engine * | getMini () const |
Public Member Functions inherited from SB::Core::DatabaseObjectUtilities | |
| virtual void | onLoaded () |
| virtual void | onProjectLoaded () |
| virtual void | onDestroy () |
Additional Inherited Members | |
Public Types inherited from SB::Engine::Parameter< SB_ID > | |
| using | ParameterProperty = SB::Core::Property< SB_ID > |
| Defines the underlying property type used to store and broadcast values. | |
| using | LocalParameter = std::pair< SB_ID, ParameterProperty > |
| Defines the type used for passing local versions/variations of this parameter. | |
| using | LocalParameterValuePair = std::pair< SB_ID, SB_ID > |
| Defines an ID to a parameter and a value for that parameter. | |
Public Attributes inherited from SB::Core::ObjectUtilities | |
| std::string | m_debugName |
Protected Attributes inherited from SB::Engine::Parameter< SB_ID > | |
| SB_ID | m_defaultValue |
| SB::Core::Property< SB_ID > | m_property |
Holds discrete named integer values.
|
inline |
Creates a NamedParameter with min and max values.
|
inline |
Adds a new value to the parameter.
| name | Name of the parameter value |
|
inline |
Get the selected value as a DatabasePtr.
Mainly used in reflection and for displaying in the editor.
|
inline |
Gets all named values in this parameter.
If none exists, ensures at least the "None" value exists.
|
inline |
Sets the parameter value with a DatabasePtr, ensuring the value exists in this parameter.
Internally sets the parameter with the DatabasePtr's ID.
| value |