persistant storarage base class - do not use directly! use cf::preference
More...
#include <cf_preference.h>
|
| | _preference (::CFStringRef application=::kCFPreferencesCurrentApplication, ::CFStringRef user=::kCFPreferencesCurrentUser, ::CFStringRef host=::kCFPreferencesAnyHost) |
| | _preference (const char *application) |
| | 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.
|
| void | synchronize () noexcept |
persistant storarage base class - do not use directly! use cf::preference
Implements cf::tree's 10 position-only primitives (cf_tree.h) over CFPreferences - operating on this key alone (application/user/host, one bare CFPreferences key, empty meaning the whole domain), 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.
◆ _preference() [1/3]
| cf::_preference::_preference |
( |
const _preference & | preference, |
|
|
const std::string & | key ) |
|
inlineprotected |
cheap: no I/O at all, just extends identity with a bare child name - this is what dx::key_value_tree::operator[] builds on.
◆ ~_preference()
| cf::_preference::~_preference |
( |
| ) |
|
|
inlineprotected |
◆ _preference() [2/3]
| cf::_preference::_preference |
( |
::CFStringRef | application = ::kCFPreferencesCurrentApplication, |
|
|
::CFStringRef | user = ::kCFPreferencesCurrentUser, |
|
|
::CFStringRef | host = ::kCFPreferencesAnyHost ) |
|
inline |
◆ _preference() [3/3]
| cf::_preference::_preference |
( |
const char * | application | ) |
|
|
inline |
◆ assign()
◆ 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()
◆ children()
◆ container()
| bool cf::_preference::container |
( |
| ) |
const |
|
inlineprotected |
◆ 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 cf::_preference::erase |
( |
| ) |
|
|
inlineprotectednoexcept |
◆ fetch()
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.
◆ nested()
◆ operator array<>::dx_container()
| cf::_preference::operator array<>::dx_container |
( |
| ) |
const |
|
inlineprotected |
same enumeration as operator ::CFArrayRef(), as the friendlier vector-of-cf::type<> container.
◆ operator bool()
| cf::_preference::operator bool |
( |
| ) |
const |
|
inlineprotectednoexcept |
◆ operator container_t()
template<typename container_t, typename = typename std::enable_if< dx::is_string_container_v<container_t>, container_t>::type>
| cf::_preference::operator container_t |
( |
| ) |
const |
|
inline |
position-only: self's own child names, as any string container.
◆ operator()()
◆ operator::CFArrayRef()
| cf::_preference::operator::CFArrayRef |
( |
| ) |
const |
|
inlineprotected |
+1: this key's own dictionary keys, or (key empty) the whole domain's top-level keys.
◆ operator::CFPropertyListRef()
| cf::_preference::operator::CFPropertyListRef |
( |
| ) |
const |
|
inlineprotected |
position-only: this key alone (empty means the whole domain) - +1, never sees the parent chain (see contract note above).
◆ operator=() [1/2]
◆ operator=() [2/2]
| void cf::_preference::operator= |
( |
const _preference & | preference | ) |
|
|
inlineprotectednoexcept |
◆ property_list()
◆ purge()
|
|
inlinestaticnoexceptinherited |
◆ size() [1/2]
| size_t cf::_preference::size |
( |
| ) |
const |
|
inline |
self's own immediate child count.
◆ size() [2/2]
◆ synchronize()
| void cf::_preference::synchronize |
( |
| ) |
|
|
inlinenoexcept |
◆ tree< _preference >
◆ key
| std::string cf::_preference::key |
The documentation for this class was generated from the following file: