Currently the corto_rw API does not correctly handle observable/optional fields and fields of a target type (objective state). The corto_rw API should:
set the right member of a target member depending on whether the thread owns the object
correctly set the value of observable members (requires extra dereference)
correctly set the value of optional members (requires extra dereference) and add feature to unset optional value
For target members, the API should automatically pick the target or actual members when not explicitly specified. For example, given the following type description:
if my_obj is owned by the current thread, the m.actual member should be set. If the object is not owned, the m.target member should be set. The target, actual and objective members may also be explicitly set. When attempting to explicitly assign a member that is not owned by the thread, the set operation will fail.
The API should also take into account complex types. Take for example this type definition:
Currently the
corto_rw
API does not correctly handle observable/optional fields and fields of atarget
type (objective state). Thecorto_rw
API should:target
member depending on whether the thread owns the objectFor
target
members, the API should automatically pick thetarget
oractual
members when not explicitly specified. For example, given the following type description:and the following code:
if
my_obj
is owned by the current thread, them.actual
member should be set. If the object is not owned, them.target
member should be set. Thetarget
,actual
andobjective
members may also be explicitly set. When attempting to explicitly assign a member that is not owned by the thread, the set operation will fail.The API should also take into account complex types. Take for example this type definition:
It should be possible to select field expression
m.x
, and depending on whether the object is owned or not, the API will setm.target.x
orm.actual.x
.