An FLDoc points to (and often owns) Fleece-encoded data and provides access to its Fleece values.
NODISCARD FLEECE_PUBLIC FLDoc FLDoc_FromResultData (FLSliceResult data, FLTrust, FLSharedKeys FL_NULLABLE, FLSlice externData) Creates an FLDoc from Fleece-encoded data that's been returned as a result from FLSlice_Copy or other API.Creates an FLDoc from Fleece-encoded data that's been returned as a result from FLSlice_Copy or other API.
The resulting document retains the data, so you don't need to worry about it remaining valid.
◆ FLDoc_GetAllocedData()Returns the FLSliceResult data owned by the document, if any, else a null slice.
◆ FLDoc_GetAssociated()Returns the pointer associated with the document.
You can use this together with FLValue_FindDoc to associate your own object with Fleece values, for instance to find your object that "owns" a value: myDoc = (app::Document*)FLDoc_GetAssociated(FLValue_FindDoc(val), "app::Document");
.
Returns the encoded Fleece data backing the document.
◆ FLDoc_GetRoot()Returns the root value in the FLDoc, usually an FLDict.
◆ FLDoc_GetSharedKeys()Returns the FLSharedKeys used by this FLDoc, as specified when it was created.
◆ FLDoc_Release()Releases a reference to an FLDoc.
This must be called once to free an FLDoc you created.
◆ FLDoc_Retain()Adds a reference to an FLDoc.
This extends its lifespan until at least such time as you call FLRelease to remove the reference.
◆ FLDoc_SetAssociated()Associates an arbitrary pointer value with a document, and thus its contained values.
Allows client code to associate its own pointer with this FLDoc and its Values, which can later be retrieved with FLDoc_GetAssociated. For example, this could be a pointer to an app::Document
object, of which this Doc's root FLDict is its properties. You would store it by calling FLDoc_SetAssociated(doc, myDoc, "app::Document");
.
Looks up the Doc containing the Value, or NULL if there is none.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4