dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
cf Namespace Reference

corefoundation namespace More...

Namespaces

namespace  mutate

Classes

class  __string
 RAII CFString class. More...
class  _preference
 persistant storarage base class - do not use directly! use cf::preference More...
class  array
class  array<::CFArrayRef, cf_object_t>
 a ::CFArray read: its elements as a plain vector (container, unretained) or as cf::type values (dx_container), and a range-for over them More...
class  array<::CFMutableArrayRef>
 an array being built: add() appends, and the result converts to what an API asks for More...
class  bundle
 a bundle by identifier, or the running one: its URL, its resources and its Info.plist as a dictionary More...
class  data
 a byte blob: made from a string, a buffer or a file, compared and copied back out - what a certificate's DER, a descriptor or a property's raw bytes travel in More...
class  dictionary
 key value pair store More...
class  dictionary<::CFDictionaryRef, cf_object_t>
 a ::CFDictionary read: operator [] names an entry, which converts to what the caller asks for, and a range-for walks key and value pairs. An entry hands out a retained value (cf::reference's ownership rule) More...
class  dictionary<::CFMutableDictionaryRef>
 a dictionary being built: set() chains one entry after another, which is what the desc's CF serialization expands into More...
class  error
 a ::CFError, in both directions: made from an OSStatus to name it, or taken from an API that hands one out (operator ::CFErrorRef*() is the out parameter). cf::describe is what dx::exception prints for a macOS result More...
class  interface
 a COM style IOKit plugin interface: QueryInterface on the plugin (or on an io_object_t, which is opened as a plugin first) and the release at the end of the object's life - every IOUSBLib and IOCFPlugIn interface is reached through one More...
class  interface<::IOCFPlugInInterface>
class  reference
class  runloop
 a run loop on a thread of its own: sources are added with += and removed with -=, and the object's construction waits until that loop is up, so a source may be attached right away. Every dxd entity that takes IOKit or CF notifications owns one More...
class  stream
 a file open for reading, closed with the object; its offset is what a parse error is reported at More...
class  tree
 dx::key_value_tree<derived_t> contract (dxd/interface/dx_key_value_tree.h), implemented once for every CF-backed preference store (cf::_preference, sc::_preference, dx::coreaudio::server::_preference) - inherit from this (CRTP: class _preference: public cf::tree<_preference>) instead of reimplementing it. More...
class  type
class  type<bool>
 a boolean is no ::CFNumber but one of the two ::kCFBoolean singletons, so this one carries no reference of its own More...
class  type<char *>
class  type<const char *>
class  type<double>
class  type<float>
class  type<std::string>
class  type<type_t, typename std::enable_if_t<(std::is_enum_v<type_t>||std::is_integral_v<type_t>)&& sizeof(type_t)== 1>>
class  type<type_t, typename std::enable_if_t<(std::is_enum_v<type_t>||std::is_integral_v<type_t>)&& sizeof(type_t)== 2>>
class  type<type_t, typename std::enable_if_t<(std::is_enum_v<type_t>||std::is_integral_v<type_t>)&& sizeof(type_t)== 4>>
class  type<type_t, typename std::enable_if_t<(std::is_enum_v<type_t>||std::is_integral_v<type_t>)&& sizeof(type_t)== 8>>
class  type<::CFTypeRef>
 opaque type serves as type::factory More...
class  url
 a file system path or a bundle resource as a ::CFURL, converting back to a path, a string and a read stream More...
class  uuid
 a UUID, generated or read from its string or bytes - dx::guid on macOS More...

Typedefs

using bool_t= type<bool>
using double_t= type<double>
using float32= type<float>
using float64= type<double>
using float_t= type<float>
using int16= type<int16_t>
using int32= type<int32_t>
using int64= type<int64_t>
using int8= type<int8_t>
using preference= dx::key_value_tree<_preference>
 preference store
using string= type<const char*>
using uint16= type<uint16_t>
using uint32= type<uint32_t>
using uint64= type<uint64_t>
using uint8= type<uint8_t>

Functions

std::string describe(dx::os_result result) noexcept
template<typename type_t>
constexpr bool is_compatible()
std::false_type is_reference_test(...)
template<typename cf_object_t>
std::true_type is_reference_test(const reference<cf_object_t> *)
std::ostream& operator <<(std::ostream &, ::CFArrayRef)
std::ostream& operator <<(std::ostream &, ::CFBooleanRef)
std::ostream& operator <<(std::ostream &, ::CFDataRef)
std::ostream& operator <<(std::ostream &, ::CFDictionaryRef)
std::ostream& operator <<(std::ostream &, ::CFNumberRef)
std::ostream& operator <<(std::ostream &, ::CFStringRef)
std::ostream& operator <<(std::ostream &, ::CFTypeRef)
std::ostream& operator <<(std::ostream &, ::CFURLRef)

Variables

template<typename type_t, typename cf_object_t= ::CFTypeRef>
constexpr bool adopts_v
 foreign class whose CF conversion hands over a +1 (ownership rule above): adopted, not retained, on insertion
template<typename type_t>
constexpr bool is_reference_v
 derived from any cf::reference<>: converts unretained, in contrast to a foreign class' +1 conversion

Detailed Description

corefoundation namespace

Typedef Documentation

◆ bool_t

using cf::bool_t= type<bool>

◆ double_t

using cf::double_t= type<double>

◆ float32

using cf::float32= type<float>

◆ float64

using cf::float64= type<double>

◆ float_t

using cf::float_t= type<float>

◆ int16

◆ int32

◆ int64

◆ int8

using cf::int8= type<int8_t>

◆ preference

using cf::preference= dx::key_value_tree<_preference>

preference store

◆ string

using cf::string= type<const char*>

◆ uint16

◆ uint32

◆ uint64

◆ uint8

Function Documentation

◆ describe()

std::string cf::describe(dx::os_result result)
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_compatible()

template<typename type_t>
bool cf::is_compatible()
constexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_reference_test() [1/2]

std::false_type cf::is_reference_test(...)
Here is the call graph for this function:

◆ is_reference_test() [2/2]

template<typename cf_object_t>
std::true_type cf::is_reference_test(const reference<cf_object_t>*)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator <<() [1/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFArrayRef ref)
inline
Here is the caller graph for this function:

◆ operator <<() [2/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFBooleanRef ref)
inline

◆ operator <<() [3/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFDataRef ref)
inline

◆ operator <<() [4/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFDictionaryRef ref)
inline
Here is the call graph for this function:

◆ operator <<() [5/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFNumberRef ref)
inline

◆ operator <<() [6/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFStringRef ref)
inline

◆ operator <<() [7/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFTypeRef ref)
inline

◆ operator <<() [8/8]

std::ostream& cf::operator <<(std::ostream& os, ::CFURLRef ref)
inline

Variable Documentation

◆ adopts_v

template<typename type_t, typename cf_object_t= ::CFTypeRef>
bool cf::adopts_v
constexpr
Initial value:
=
(std::is_class_v<type_t> || std::is_union_v<type_t>) && !is_reference_v<type_t> && std::is_convertible_v<const type_t&, cf_object_t>
constexpr bool is_reference_v
derived from any cf::reference<>: converts unretained, in contrast to a foreign class' +1 conversion
Definition cf_reference.h:164

foreign class whose CF conversion hands over a +1 (ownership rule above): adopted, not retained, on insertion

◆ is_reference_v

template<typename type_t>
bool cf::is_reference_v
constexpr
Initial value:
=
decltype(is_reference_test(std::declval<std::remove_reference_t<type_t>*>()))::value
std::true_type is_reference_test(const reference< cf_object_t > *)

derived from any cf::reference<>: converts unretained, in contrast to a foreign class' +1 conversion