dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::server::_preference Class Reference

persistant CoreAudio storarage base class - do not use directly! use coreaudio::server::preference More...

#include <dx_coreaudio_server.h>

Inheritance diagram for dx::coreaudio::server::_preference:
Collaboration diagram for dx::coreaudio::server::_preference:

Public Member Functions

 _preference (const ::AudioServerPlugInHostInterface *host=nullptr, ::CFStringRef key=nullptr)
 catch (...)
template<typename container_t, typename = typename std::enable_if< dx::is_string_container_v<container_t>, container_t>::type>
 operator container_t () const
 position-only: self's own child names, as any string container.
size_t size () const
 self's own immediate child count.

Static Public Member Functions

static void assign (const self_t &self, const value_t &value)
static void assign_property (const self_t &self, ::CFPropertyListRef value, ::CFPropertyListRef baseline=nullptr)
static container_t children (const self_t &self)
static constexpr bool enabled ()
static bool fetch (const self_t &self, value_t &value)
static bool nested (const self_t &self)
static ::CFPropertyListRef property_list (const self_t &self)
static void purge (const self_t &self) noexcept
static size_t size (const self_t &self)

Public Attributes

std::string key

Protected Member Functions

::CFIndex count () const noexcept
void erase ()
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
CFTypeID id () noexcept
reference & initialize (::CFPropertyListRef cf_object, bool retain=true)
 operator bool () const
 operator type<> () const noexcept
bool operator!= (::CFPropertyListRef cf_object) const noexcept
 operator::CFTypeID () const noexcept
 operator::CFTypeRef () const noexcept
bool operator== (::CFPropertyListRef cf_object) const noexcept
virtual bool operator== (::CFTypeID cf_type) const noexcept
reference & release () noexcept
const reference & retain () const noexcept

Static Protected Member Functions

::CFTypeID id () noexcept

Protected Attributes

::CFPropertyListRef cf_object

Friends

class cf::tree< _preference >

Detailed Description

persistant CoreAudio storarage base class - do not use directly! use coreaudio::server::preference

Due to CoreAudio persistant storage limitations this class does not support root key retrieval and excepts on such attempts, including checking for root container.

The value is cached @ the underlaying cf::reference<::CFPropertyListRef>.

Implements cf::tree's 10 position-only primitives (cf_tree.h) over AudioServerPlugInHostInterface's CopyFromStorage/WriteToStorage/ DeleteFromStorage - operating on this key alone, never the parent chain. cf::tree supplies the dx::key_value_tree<preference> contract (fetch/ assign/purge/nested) on top, by recursing through those primitives up to the true root. get()'s own dx_pass(host && key...) is what actually enforces this class' no-root-key limitation: property_list() (cf tree.h) reaches it only through operator bool()/operator ::CFPropertyListRef() below, so an empty key still excepts there instead of silently falling back to nullptr the way cf::_preference's root case does.

Constructor & Destructor Documentation

◆ _preference()

dx::coreaudio::server::_preference::_preference ( const ::AudioServerPlugInHostInterface * host = nullptr,
::CFStringRef key = nullptr )
inline

Member Function Documentation

◆ assign()

void cf::tree< _preference >::assign ( const self_t & self,
const value_t & value )
inlinestaticinherited

◆ assign_property()

void cf::tree< _preference >::assign_property ( const self_t & self,
::CFPropertyListRef value,
::CFPropertyListRef baseline = nullptr )
inlinestaticinherited

downward write-back mirroring property_list()'s upward read, creating ancestor dictionaries as needed. baseline is the parent value this write's own value was computed from (passed down from the caller's own property_list() read) - at the root, a mismatch against the current stored value means a concurrent writer raced this one, and dx::busy is raised so assign()/purge() retry against fresh state.

◆ catch()

cf::tree< _preference >::catch ( ...)
inlineinherited

◆ children()

container_t cf::tree< _preference >::children ( const self_t & self)
inlinestaticinherited

◆ count()

::CFIndex cf::reference< ::CFPropertyListRef >::count ( ) const
inlinenoexceptinherited

◆ enabled()

constexpr bool cf::tree< _preference >::enabled ( )
inlinestaticconstexprinherited

mirrors fetch<>'s supported value_t set, for key_value_tree_enabled's SFINAE (dx_key_value_tree.h) - cf's own POD/bridging or CFPropertyListRef-constructible types only.

◆ erase()

void dx::coreaudio::server::_preference::erase ( )
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetch()

bool cf::tree< _preference >::fetch ( const self_t & self,
value_t & value )
inlinestaticinherited

value_t is a cf POD/bridging type (see enabled() below) or a foreign type convertible from a CF pointer (e.g. cf::dictionary<>, routed via the third branch below); returns false for an absent self, throwing only for a genuinely malformed stored value.

◆ id() [1/24]

CFTypeID cf::reference<::CFMutableArrayRef >::id ( )
inlinenoexceptinherited

◆ id() [2/24]

CFTypeID cf::reference<::CFArrayRef >::id ( )
inlinenoexceptinherited

◆ id() [3/24]

CFTypeID cf::reference<::CFBundleRef >::id ( )
inlinenoexceptinherited

◆ id() [4/24]

CFTypeID cf::reference<::CFDataRef >::id ( )
inlinenoexceptinherited

◆ id() [5/24]

CFTypeID cf::reference<::CFMutableDictionaryRef >::id ( )
inlinenoexceptinherited
Here is the call graph for this function:

◆ id() [6/24]

CFTypeID cf::reference<::CFDictionaryRef >::id ( )
inlinenoexceptinherited
Here is the call graph for this function:

◆ id() [7/24]

CFTypeID cf::reference<::CFErrorRef >::id ( )
inlinenoexceptinherited

◆ id() [8/24]

CFTypeID cf::reference<::CFBooleanRef >::id ( )
inlinenoexceptinherited
Here is the call graph for this function:

◆ id() [9/24]

CFTypeID cf::reference<::CFNumberRef >::id ( )
inlinenoexceptinherited
Here is the call graph for this function:

◆ id() [10/24]

::CFTypeID cf::reference< ::CFPropertyListRef >::id ( )
staticnoexceptinherited
Here is the caller graph for this function:

◆ id() [11/24]

CFTypeID cf::reference<::CFRunLoopObserverRef >::id ( )
inlinenoexceptinherited

◆ id() [12/24]

CFTypeID cf::reference<::CFRunLoopSourceRef >::id ( )
inlinenoexceptinherited

◆ id() [13/24]

CFTypeID cf::reference<::CFRunLoopRef >::id ( )
inlinenoexceptinherited

◆ id() [14/24]

CFTypeID cf::reference<::CFReadStreamRef >::id ( )
inlinenoexceptinherited

◆ id() [15/24]

CFTypeID cf::reference<::CFMutableStringRef >::id ( )
inlinenoexceptinherited

◆ id() [16/24]

CFTypeID cf::reference<::CFStringRef >::id ( )
inlinenoexceptinherited

◆ id() [17/24]

CFTypeID cf::reference<::CFURLRef >::id ( )
inlinenoexceptinherited

◆ id() [18/24]

CFTypeID cf::reference<::CFUUIDRef >::id ( )
inlinenoexceptinherited

◆ id() [19/24]

CFTypeID cf::reference<::SCPreferencesRef >::id ( )
inlinenoexceptinherited

◆ id() [20/24]

CFTypeID cf::reference<::SecTrustRef >::id ( )
inlinenoexceptinherited

◆ id() [21/24]

CFTypeID cf::reference<::SecCertificateRef >::id ( )
inlinenoexceptinherited

◆ id() [22/24]

CFTypeID cf::reference<::SecStaticCodeRef >::id ( )
inlinenoexceptinherited

◆ id() [23/24]

CFTypeID cf::reference<::SecCodeRef >::id ( )
inlinenoexceptinherited

◆ id() [24/24]

CFTypeID cf::reference<::SecRequirementRef >::id ( )
inlinenoexceptinherited

◆ initialize()

reference & cf::reference< ::CFPropertyListRef >::initialize ( ::CFPropertyListRef cf_object,
bool retain = true )
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nested()

bool cf::tree< _preference >::nested ( const self_t & self)
inlinestaticinherited

◆ operator bool()

dx::coreaudio::server::_preference::operator bool ( ) const
inlineexplicitprotectedvirtual

◆ operator container_t()

template<typename container_t, typename = typename std::enable_if< dx::is_string_container_v<container_t>, container_t>::type>
dx::coreaudio::server::_preference::operator container_t ( ) const
inline

position-only: self's own child names, as any string container.

◆ operator type<>()

cf::reference< ::CFPropertyListRef >::operator type<> ( ) const
noexceptinherited

◆ operator!=()

bool cf::reference< ::CFPropertyListRef >::operator!= ( ::CFPropertyListRef cf_object) const
inlinenoexceptinherited

◆ operator::CFTypeID()

cf::reference< ::CFPropertyListRef >::operator::CFTypeID ( ) const
inlineexplicitnoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator::CFTypeRef()

cf::reference< ::CFPropertyListRef >::operator::CFTypeRef ( ) const
inlinenoexceptinherited

◆ operator==() [1/2]

bool cf::reference< ::CFPropertyListRef >::operator== ( ::CFPropertyListRef cf_object) const
inlinenoexceptinherited

◆ operator==() [2/2]

virtual bool cf::reference< ::CFPropertyListRef >::operator== ( ::CFTypeID cf_type) const
inlinevirtualnoexceptinherited
Here is the call graph for this function:

◆ property_list()

::CFPropertyListRef cf::tree< _preference >::property_list ( const self_t & self)
inlinestaticinherited
Here is the caller graph for this function:

◆ purge()

void cf::tree< _preference >::purge ( const self_t & self)
inlinestaticnoexceptinherited

◆ release()

reference & cf::reference< ::CFPropertyListRef >::release ( )
inlinenoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retain()

const reference & cf::reference< ::CFPropertyListRef >::retain ( ) const
inlinenoexceptinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size() [1/2]

size_t cf::tree< _preference >::size ( const self_t & self)
inlinestaticinherited

◆ size() [2/2]

size_t dx::coreaudio::server::_preference::size ( ) const
inline

self's own immediate child count.

◆ cf::tree< _preference >

friend class cf::tree< _preference >
friend

Member Data Documentation

◆ cf_object

::CFPropertyListRef cf::reference< ::CFPropertyListRef >::cf_object
protectedinherited

◆ key

std::string dx::coreaudio::server::_preference::key

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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.