dxd - dynax driver framework 2.3.0d114
cross platform open source driver development framework
Loading...
Searching...
No Matches
cf::key_value_tree< cf_type > Class Template Reference

key-value pair tree to inherit from suitable CF storage types More...

#include <cf_key_value_tree.h>

+ Inheritance diagram for cf::key_value_tree< cf_type >:
+ Collaboration diagram for cf::key_value_tree< cf_type >:

Public Member Functions

iterator begin () const
 
 dx_catchall_rethrow () template< typename value_t
 write POD to key_value_pair with conversion to CoreFoundation types
 
iterator end () const
 
 key_value_tree (const key_value_tree &key_value_tree, ::CFStringRef key)
 
template<typename value_t , typename = enable_if_convertible<value_t>>
 key_value_tree (value_t key)
 
key_value_treeoperator= (const key_value_tree &key_value_tree) try
 

Public Attributes

 typename
 

Protected Attributes

key_value_treeparent = nullptr
 

Detailed Description

template<typename cf_type>
class cf::key_value_tree< cf_type >

key-value pair tree to inherit from suitable CF storage types

This class provides hierchical traversal access functionality for CF storage types. It provides type conversions from POD to CF types for key and values. Each valid hierarchy level has a valid key associated with with one exception: The root level does not need to hava a key set and if it hasn't operates on the entire tree.

It requires it's CF base class to comply to the following layout:

class cf_storage_class{
friend class key_value_tree<cf_storage_class>;
protected:
cf_storage_type(const cf_storage_type& cf_storage_type, ::CFStringRef key);
void operator =(const cf_storage_type& cf_storage_type);
operator ::CFPropertyListRef() const; // return item for key - throws if key does not exists - if key has not been set returns the entire tree from root - but may throw if not supported by underlaying OS function
operator ::CFArrayRef() const; // return all sub keys for key - throws if key does not exists - if key has not been set returns all keys from root - but may throw if not supported by underlaying OS function
void operator =(::CFPropertyListRef value); // assign a value to a key - if key does not exist places value in root - but may throw if not supported by underlaying OS function
::CFPropertyListRef() operator =(::CFPropertyListRef default) [noexcept]; // returns item for key - if key does not exist returns default - if key has not been set returns the entire tree from root - but may throw if not supported by underlaying OS function
void erase() [noexcept]; // removes this node from storage - if key does not exist it does nothing - if key has not been set operates on the tree root - but may throw if not supported by underlaying OS function
operator bool() const noexcept; // returns true if either key has been set and exists or if key has not been set
bool container(); // return true if node is container
operator cf::array<>::dx_container(); // returns retained keys container of node
public:
cf::type<const char*> key;
};
Definition dx_mach.h:448
key-value pair tree to inherit from suitable CF storage types
Definition cf_key_value_tree.h:97
Definition cf_reference.h:32
corefoundation namespace
Definition cf_dictionary.h:36

see implementation of interface/macOS/cf_preference.h interface/macOS/sc_preference.h

Constructor & Destructor Documentation

◆ key_value_tree() [1/2]

template<typename cf_type >
template<typename value_t , typename = enable_if_convertible<value_t>>
cf::key_value_tree< cf_type >::key_value_tree ( value_t key)
inline

◆ key_value_tree() [2/2]

template<typename cf_type >
cf::key_value_tree< cf_type >::key_value_tree ( const key_value_tree< cf_type > & key_value_tree,
::CFStringRef key )
inline

Member Function Documentation

◆ begin()

template<typename cf_type >
iterator cf::key_value_tree< cf_type >::begin ( ) const
inline

◆ dx_catchall_rethrow()

template<typename cf_type >
cf::key_value_tree< cf_type >::dx_catchall_rethrow ( )

write POD to key_value_pair with conversion to CoreFoundation types

◆ end()

template<typename cf_type >
iterator cf::key_value_tree< cf_type >::end ( ) const
inline

◆ operator=()

template<typename cf_type >
key_value_tree & cf::key_value_tree< cf_type >::operator= ( const key_value_tree< cf_type > & key_value_tree)
inline

Member Data Documentation

◆ parent

template<typename cf_type >
key_value_tree* cf::key_value_tree< cf_type >::parent = nullptr
protected

◆ typename

template<typename cf_type >
cf::key_value_tree< cf_type >::typename

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri May 9 2025

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.