LiteCore
Couchbase Lite cross-platform core implementation
Loading...
Searching...
No Matches
Fleece CoreFoundation and Objective-C Helpers

Functions

NODISCARD FLEECE_PUBLIC bool FLEncoder_WriteCFObject (FLEncoder, CFTypeRef)
 Writes a Core Foundation (or Objective-C) object to an Encoder.
 
NODISCARD FLEECE_PUBLIC CFTypeRef FLValue_CopyCFObject (FLValue FL_NULLABLE)
 Returns a Value as a corresponding CoreFoundation object.
 
FLValue FLValue_FromCFValue (CFTypeRef)
 Copies a CoreFoundation object to a standalone Fleece object, if possible.
 
void FLSlot_SetCFValue (FLSlot slot, CFTypeRef value)
 Stores a CoreFoundation object into a slot in a Fleece dict/array, if possible.
 
NODISCARD FLEECE_PUBLIC FLValue FLDict_GetWithCFString (FLDict FL_NULLABLE, CFStringRef)
 Same as FLDictGet, but takes the key as a CFStringRef.
 

Detailed Description

Function Documentation

◆ FLDict_GetWithCFString()

NODISCARD FLEECE_PUBLIC FLValue FLDict_GetWithCFString ( FLDict FL_NULLABLE,
CFStringRef  )

Same as FLDictGet, but takes the key as a CFStringRef.

◆ FLEncoder_WriteCFObject()

NODISCARD FLEECE_PUBLIC bool FLEncoder_WriteCFObject ( FLEncoder ,
CFTypeRef  )

Writes a Core Foundation (or Objective-C) object to an Encoder.

Supports all the JSON types, as well as CFData.

◆ FLSlot_SetCFValue()

void FLSlot_SetCFValue ( FLSlot slot,
CFTypeRef value )

Stores a CoreFoundation object into a slot in a Fleece dict/array, if possible.

This is supported for the CF/NS equivalents of Fleece types: CFString, CFNumber, CFData, CFArray, CFDictionary.

◆ FLValue_CopyCFObject()

NODISCARD FLEECE_PUBLIC CFTypeRef FLValue_CopyCFObject ( FLValue FL_NULLABLE)

Returns a Value as a corresponding CoreFoundation object.

Caller must CFRelease the result.

◆ FLValue_FromCFValue()

FLValue FLValue_FromCFValue ( CFTypeRef )

Copies a CoreFoundation object to a standalone Fleece object, if possible.

Exceptions
anNSException if the object is not of a class that can be converted, or if it contains such an object.
Note
You must call FLValue_Release when finished with the result.