Commit 18b56355 authored by Matthieu Hautreux's avatar Matthieu Hautreux Committed by Morris Jette
Browse files

[PATCH 13/17] layouts: extend layouts entity management API

> layouts_entity_{set,get,setpush,pullget}_kv[_ref] calls

These new calls enable to perform the get/set operations on the key/value pairs
of a particular entity in a defined layout. The push/pull operations enable to
call for the automatic update of the linked entities in the layouts (i.e. parent)
for push and for the automatic update of the requested entity using the linked
entities information for pull.

Note that 2 variations are proposed for each call, differentiated by the _ref
suffix. When _ref is suffixed, then the calls only deal with references and no
copy of the data is performed, only data references (pointers) are set/get. The
_ref suffixed calls should then be considered as more efficient but can lead to
issues if the pointers are modified after the get operations occur but before
their real use. For that reason, layouts_{lock,unlock} calls would certainly
appear in a next commit as well as _nolock suffixed calls in order to better
handle those scenarios.

Note that the ...pull/push... calls are just stubbed in that commit. The logic
will be added later.

> layouts_entity_get_mkv[_ref] calls

These new calls enable to perform the get operations on a set of key/value pairs
of a particular entity in a defined layout. (mkv stands for multiple k/v pairs)

When _ref is suffixed, then the calls only deal with references and no copy of
the data is performed, only data references (pointers) are got. The _ref suffixed
calls should then be considered as more efficient but can lead to issues if the
pointers are modified after the get operations occur but before their real use.

For that reason, layouts_{lock,unlock} calls would certainly appear in a next
commit as well as _nolock suffixed calls in order to better handle these
scenarios.
parent f3b7e017
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment