Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Ase::GadgetImpl Class Reference

Base type for classes that have a Property. More...

#include "gadget.hh"

Inheritance diagram for Ase::GadgetImpl:
[legend]

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
 
- Public Member Functions inherited from Ase::EmittableImpl
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.
 
- Public Member Functions inherited from Ase::Emittable
void js_trigger (const String &eventselector, JsTrigger callback)
 
- Public Member Functions inherited from std::enable_shared_from_this< SharedBase >
enable_shared_from_this (T... args)
 
operator= (T... args)
 
shared_from_this (T... args)
 
weak_from_this (T... args)
 
~enable_shared_from_this (T... args)
 
- Public Member Functions inherited from Ase::CustomDataContainer
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 >
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.
 
- Public Member Functions inherited from Ase::Gadget
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 ()
 
- Protected Member Functions inherited from Ase::CustomDataContainer
void custom_data_destroy ()
 

Static Protected Member Functions

static String canonify_key (const String &input)
 

Protected Attributes

PropertyImplS props_
 

Additional Inherited Members

- Public Attributes inherited from Ase::Emittable
const EventHandlereventhandler
 
- Public Attributes inherited from Ase::Gadget
Member<&Gadget::get_name,&Gadget::set_name > name
 

Detailed Description

Base type for classes that have a Property.

Definition at line 12 of file gadget.hh.

Member Typedef Documentation

◆ MemberAccessF

Definition at line 36 of file gadget.hh.

◆ MemberClassT

using Ase::GadgetImpl::MemberClassT = bool (*) (const SharedBase&)

Definition at line 38 of file gadget.hh.

◆ MemberInfosP

using Ase::GadgetImpl::MemberInfosP = const StringS& (*) ()

Definition at line 37 of file gadget.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : uint64_t
protected

Definition at line 18 of file gadget.hh.

Constructor & Destructor Documentation

◆ ~GadgetImpl()

Ase::GadgetImpl::~GadgetImpl ( )
protectedvirtual

Definition at line 18 of file gadget.cc.

Member Function Documentation

◆ _parent()

GadgetImpl * Ase::GadgetImpl::_parent ( ) const
overridevirtual

Retrieve parent container.

Implements Ase::Gadget.

Definition at line 30 of file gadget.hh.

Referenced by Ase::ClapDeviceImpl::_activate(), and Ase::TrackImpl::_activate().

◆ _register_parameter()

template<class O , class M >
void Ase::GadgetImpl::_register_parameter ( O *  obj,
M *  memb,
const Param::ExtraVals ev 
) const

Definition at line 46 of file gadget.hh.

◆ _set_parent()

void Ase::GadgetImpl::_set_parent ( GadgetImpl parent)
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.

◆ access_properties()

PropertyS Ase::GadgetImpl::access_properties ( )
overridevirtual

Retrieve handles for all properties.

Implements Ase::Gadget.

Reimplemented in Ase::NativeDeviceImpl.

Definition at line 159 of file gadget.cc.

◆ canonify_key()

String Ase::GadgetImpl::canonify_key ( const String input)
staticprotected

Definition at line 46 of file gadget.cc.

◆ create_properties()

void Ase::GadgetImpl::create_properties ( )
protectedvirtual

Definition at line 270 of file gadget.cc.

◆ fallback_name()

String Ase::GadgetImpl::fallback_name ( ) const
protectedvirtual

Definition at line 40 of file gadget.cc.

◆ gadget_flags() [1/2]

uint64_t Ase::GadgetImpl::gadget_flags ( ) const
protected

Definition at line 19 of file gadget.hh.

◆ gadget_flags() [2/2]

uint64_t Ase::GadgetImpl::gadget_flags ( uint64_t  setbits,
uint64_t  mask = ~uint64_t (0) 
)
protected

Definition at line 22 of file gadget.cc.

◆ get_data()

Value Ase::GadgetImpl::get_data ( const String key) const
overridevirtual

Retrieve session data.

Implements Ase::Gadget.

Reimplemented in Ase::ServerImpl.

Definition at line 55 of file gadget.cc.

◆ get_name()

String Ase::GadgetImpl::get_name ( ) const
overridevirtual

Implements Ase::Gadget.

Definition at line 140 of file gadget.cc.

◆ serialize()

void Ase::GadgetImpl::serialize ( WritNode xs)
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().

◆ set_data()

bool Ase::GadgetImpl::set_data ( const String key,
const Value v 
)
overridevirtual

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().

◆ set_name()

void Ase::GadgetImpl::set_name ( const std::string n)
overridevirtual

Implements Ase::Gadget.

Definition at line 148 of file gadget.cc.

◆ type_nick()

String Ase::GadgetImpl::type_nick ( ) const
overridevirtual

Implements Ase::Gadget.

Definition at line 126 of file gadget.cc.

Member Data Documentation

◆ props_

PropertyImplS Ase::GadgetImpl::props_
protected

Definition at line 17 of file gadget.hh.


The documentation for this class was generated from the following files: