![]() |
Sound Bakery  v0.1.0
Open-source audio middleware for games
|
Defines a database object with a changeable property. More...
#include <parameter.h>


Public Types | |
| using | ParameterProperty = SB::Core::Property< ParameterType > |
| 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, ParameterType > |
| Defines an ID to a parameter and a value for that parameter. | |
Public Member Functions | |
| Parameter (ParameterType min, ParameterType max) | |
| Creates a Parameter with min and max values set. | |
| ParameterType | get () const |
| Get the current value of the parameter. | |
| ParameterType | getDefault () const |
| void | set (ParameterType value) |
| Set the value of the parameter. | |
| void | setDefault (ParameterType 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 () |
Protected Attributes | |
| ParameterType | m_defaultValue |
| SB::Core::Property< ParameterType > | m_property |
Additional Inherited Members | |
Public Attributes inherited from SB::Core::ObjectUtilities | |
| std::string | m_debugName |
Defines a database object with a changeable property.
Used for changing effect parameters, choosing sounds and anything else.
| using SB::Engine::Parameter< ParameterType >::LocalParameter = std::pair<SB_ID, ParameterProperty> |
Defines the type used for passing local versions/variations of this parameter.
Uses a SB_ID for the parameter ID instead of DatabasePtr<T> to help when used in child classes.
| using SB::Engine::Parameter< ParameterType >::LocalParameterValuePair = std::pair<SB_ID, ParameterType> |
Defines an ID to a parameter and a value for that parameter.
Used when setting the value on a parameter.
|
inline |
Creates a Parameter with min and max values set.
| min | value of the parameter. |
| max | value of the parameter. |
|
inline |
|
inline |
Set the value of the parameter.
This sets the internal property and will therefore call any bound delegates.