Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Base type for classes that have a Property. More...
#include "gadget.hh"
Public Types | |
using | MemberAccessF = std::function< bool(GadgetImpl *, const Value *, Value *)> |
using | MemberInfosP = const StringS &(*)() |
using | MemberClassT = bool(*)(const SharedBase &) |
Public Member Functions | |
String | get_name () const override |
void | set_name (const std::string &n) override |
void | _set_parent (GadgetImpl *parent) override |
Assign parent container. | |
GadgetImpl * | _parent () const override |
Retrieve parent container. | |
String | type_nick () const override |
PropertyS | access_properties () override |
Retrieve handles for all properties. | |
bool | set_data (const String &key, const Value &v) override |
Assign session data, prefix ephemerals with '_'. | |
Value | get_data (const String &key) const override |
Retrieve session data. | |
template<class O , class M > | |
void | _register_parameter (O *, M *, const Param::ExtraVals &) const |
![]() | |
ASE_USE_RESULT Connection | on_event (const String &eventselector, const EventHandler &eventhandler) override |
void | emit_event (const String &type, const String &detail, const ValueR fields={}) override |
void | emit_notify (const String &detail) override |
Emit notify:detail , multiple notifications maybe coalesced if a CoalesceNotifies instance exists. | |
![]() | |
void | js_trigger (const String &eventselector, JsTrigger callback) |
![]() | |
T | enable_shared_from_this (T... args) |
T | operator= (T... args) |
T | shared_from_this (T... args) |
T | weak_from_this (T... args) |
T | ~enable_shared_from_this (T... args) |
![]() | |
template<class T > | |
void | set_custom_data (CustomDataKey< T > *key, T data) |
Assign data to the custom keyed data member, deletes any previously set data. | |
template<class T > | |
T | get_custom_data (CustomDataKey< T > *key) const |
Retrieve contents of the custom keyed data member, returns DataKey::fallback if nothing was set. | |
template<class T > | |
bool | has_custom_data (CustomDataKey< T > *key) const |
Retrieve wether contents of the custom keyed data member exists. | |
template<class T > | |
bool | del_custom_data (CustomDataKey< T > *key) |
Delete the current contents of the custom keyed data member, invokes DataKey::destroy. | |
![]() | |
ProjectImpl * | _project () const |
Find Project in parent ancestry. | |
virtual StringS | list_properties () |
List all property identifiers. | |
virtual PropertyP | access_property (String ident) |
Retrieve handle for a Property. | |
Value | get_value (String ident) |
Get native property value. | |
bool | set_value (String ident, const Value &v) |
Protected Types | |
enum | : uint64_t { GADGET_DESTROYED , DEVICE_ACTIVE , MASTER_TRACK } |
Protected Member Functions | |
uint64_t | gadget_flags () const |
uint64_t | gadget_flags (uint64_t setbits, uint64_t mask=~uint64_t(0)) |
virtual String | fallback_name () const |
void | serialize (WritNode &xs) override |
Serialize members and childern. | |
virtual void | create_properties () |
![]() | |
void | custom_data_destroy () |
Static Protected Member Functions | |
static String | canonify_key (const String &input) |
Protected Attributes | |
PropertyImplS | props_ |
Additional Inherited Members | |
![]() | |
const EventHandler & | eventhandler |
![]() | |
Member<&Gadget::get_name,&Gadget::set_name > | name |
using Ase::GadgetImpl::MemberAccessF = std::function<bool(GadgetImpl*,const Value*,Value*)> |
using Ase::GadgetImpl::MemberClassT = bool (*) (const SharedBase&) |
using Ase::GadgetImpl::MemberInfosP = const StringS& (*) () |
|
overridevirtual |
Retrieve parent container.
Implements Ase::Gadget.
Definition at line 30 of file gadget.hh.
Referenced by Ase::ClapDeviceImpl::_activate(), and Ase::TrackImpl::_activate().
void Ase::GadgetImpl::_register_parameter | ( | O * | obj, |
M * | memb, | ||
const Param::ExtraVals & | ev | ||
) | const |
|
overridevirtual |
Assign parent container.
Implements Ase::Gadget.
Reimplemented in Ase::NativeDeviceImpl, and Ase::TrackImpl.
Definition at line 30 of file gadget.cc.
References assert_return.
|
overridevirtual |
Retrieve handles for all properties.
Implements Ase::Gadget.
Reimplemented in Ase::NativeDeviceImpl.
|
protectedvirtual |
|
protectedvirtual |
|
overridevirtual |
Implements Ase::Gadget.
|
overrideprotectedvirtual |
Serialize members and childern.
Implements Ase::Serializable.
Reimplemented in Ase::NativeDeviceImpl, Ase::ProjectImpl, and Ase::TrackImpl.
Definition at line 72 of file gadget.cc.
References Ase::WritNode::in_load(), Ase::WritNode::in_save(), std::vector::size(), and Ase::string_option_check().
Assign session data, prefix ephemerals with '_'.
Implements Ase::Gadget.
Reimplemented in Ase::ServerImpl.
Definition at line 62 of file gadget.cc.
References return_unless, and std::string::size().
|
overridevirtual |
Implements Ase::Gadget.
|
overridevirtual |
Implements Ase::Gadget.