OSSIA
Open Scenario System for Interactive Application
|
Default implementation for parameter_base, with everything expected and mutable
Public Member Functions | |
generic_parameter (ossia::net::node_base &node_base) | |
Used for repetition filter. | |
generic_parameter (const parameter_data &, ossia::net::node_base &node_base) | |
ossia::net::protocol_base & | get_protocol () const noexcept override |
void | pull_value () final override |
Value getters ///. More... | |
std::future< void > | pull_value_async () final override |
pull_value_async More... | |
void | request_value () final override |
request_value More... | |
ossia::net::generic_parameter & | push_value (const ossia::value &) final override |
Sets the value locally, and sends it to the network. | |
ossia::net::generic_parameter & | push_value (ossia::value &&) final override |
ossia::net::generic_parameter & | push_value () final override |
const ossia::value & | getValue () const |
ossia::value | value () const final override |
Clone the current value without any network request. | |
ossia::value | set_value (const ossia::value &) override |
ossia::value | set_value (ossia::value &&) override |
ossia::value | set_value_quiet (const ossia::value &) override |
ossia::value | set_value_quiet (ossia::value &&) override |
void | set_value_quiet (const ossia::destination &) |
ossia::val_type | get_value_type () const noexcept final override |
ossia::net::generic_parameter & | set_value_type (ossia::val_type) final override |
ossia::access_mode | get_access () const noexcept final override |
ossia::net::generic_parameter & | set_access (ossia::access_mode) final override |
const ossia::domain & | get_domain () const noexcept final override |
ossia::net::generic_parameter & | set_domain (const ossia::domain &) final override |
ossia::bounding_mode | get_bounding () const noexcept final override |
ossia::net::generic_parameter & | set_bounding (ossia::bounding_mode) final override |
bool | filter_value (const ossia::value &val) const noexcept final override |
generic_parameter & | set_unit (const ossia::unit_t &v) final override |
void | on_first_callback_added () final override |
on_first_callback_added More... | |
void | on_removing_last_callback () final override |
on_removing_last_callback More... | |
Public Member Functions inherited from ossia::net::parameter_base | |
parameter_base (ossia::net::node_base &n) | |
parameter_base (const parameter_base &)=delete | |
parameter_base (parameter_base &&)=delete | |
parameter_base & | operator= (const parameter_base &)=delete |
parameter_base & | operator= (parameter_base &&)=delete |
ossia::net::node_base & | get_node () const noexcept |
ossia::value | fetch_value () |
Pulls and clone the value. | |
void | push_value_quiet (const ossia::value &v) |
void | push_value_quiet (ossia::value &&v) |
ossia::value | value (ossia::destination_index) const |
Returns the sub-value at the index given by destination_index. | |
std::vector< ossia::value > | value (const std::vector< ossia::destination_index > &) const |
Returns a list of sub-values matching the indexes. | |
std::optional< ossia::value > | get_default_value () const noexcept |
void | set_default_value (const ossia::value &v) |
repetition_filter | get_repetition_filter () const noexcept |
parameter_base & | set_repetition_filter (repetition_filter=repetition_filter::ON) |
const ossia::unit_t & | get_unit () const noexcept |
by default there is no filter | |
bool | get_disabled () const noexcept |
parameter_base & | set_disabled (bool) |
bool | get_muted () const noexcept |
parameter_base & | set_muted (bool) |
bool | get_critical () const noexcept |
parameter_base & | set_critical (bool v) |
parameter_type | get_type () const noexcept |
Public Member Functions inherited from ossia::callback_container< value_callback > | |
callback_container (const callback_container &other) | |
callback_container (callback_container &&other) noexcept | |
callback_container & | operator= (const callback_container &other) |
callback_container & | operator= (callback_container &&other) noexcept |
iterator | add_callback (value_callback &&callback) |
add_callback Add a new callback. More... | |
void | remove_callback (iterator it) |
remove_callback Removes a callback identified by an iterator. More... | |
void | replace_callback (iterator it, value_callback &&cb) |
Replaces an existing callback with another function. | |
void | replace_callbacks (impl &&cbs) |
disabled_callback | disable_callback (iterator it) |
std::size_t | callback_count () const |
callback_count More... | |
bool | callbacks_empty () const |
callbacks_empty More... | |
void | send (Args &&... args) |
send Trigger all callbacks More... | |
void | callbacks_clear () |
clear Clears callbacks. | |
impl m_callbacks | TS_GUARDED_BY (m_mutx) |
Protected Member Functions | |
ossia::value m_value | TS_GUARDED_BY (m_valueMutex) |
Protected Attributes | |
ossia::net::protocol_base & | m_protocol |
ossia::val_type | m_valueType {} |
ossia::access_mode | m_accessMode {} |
ossia::bounding_mode | m_boundingMode {} |
mutex_t | m_valueMutex |
ossia::domain | m_domain |
ossia::value | m_previousValue |
Protected Attributes inherited from ossia::net::parameter_base | |
ossia::net::node_base & | m_node |
unit_t | m_unit |
bool | m_critical {} |
bool | m_disabled {} |
bool | m_muted {} |
ossia::repetition_filter | m_repetitionFilter {ossia::repetition_filter::OFF} |
parameter_type | m_type {} |
Additional Inherited Members | |
Public Types inherited from ossia::net::parameter_base | |
using | callback_index = callback_container< value_callback >::iterator |
Public Types inherited from ossia::callback_container< value_callback > | |
using | impl = std::list< value_callback > |
impl How the callbackas are stored. A list is used since iterators to other callbacks must not be invalidated upon removal. | |
using | iterator = typename impl::iterator |
Public Attributes inherited from ossia::callback_container< value_callback > | |
mutex | m_mutx |
|
finaloverridevirtual |
Value getters ///.
pull_value
Retrieve the current value over the network. Not all protocols may provide this capability.
This may be a blocking call.
Implements ossia::net::parameter_base.
|
finaloverridevirtual |
pull_value_async
Requests the current value over the network. Not all protocols may provide this capability.
This function returns a future that can be waited upon by client code.
Reimplemented from ossia::net::parameter_base.
|
finaloverridevirtual |
request_value
Requests the current value over the network. Not all protocols may provide this capability.
This call may not block but there is no guarantee that the value has been pulled when the call returns.
However, the callback will be called when the value is received.
Reimplemented from ossia::net::parameter_base.
|
finaloverridevirtual |
Value setters /// Sends the local value to the network
Implements ossia::net::parameter_base.
|
overridevirtual |
Set a value without sending notifications
Reimplemented from ossia::net::parameter_base.
|
finaloverridevirtual |
on_first_callback_added
These functions can be reimplemented by subclasses wishing to perform special actions. For instance, when the last callback is removed, stop listening somewhere...
Reimplemented from ossia::callback_container< value_callback >.
|
finaloverridevirtual |
on_removing_last_callback
Reimplemented from ossia::callback_container< value_callback >.