Feature #790

UBF Dictionary like access without marshaling to dict

Added by Madars over 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:09/25/2022
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

Class endurox.UbfDict shall be added to the module, which would provide the following interfaces:


import endurox as e

buf = e.UbfDict({"T_STRING_FLD":["HELLO", "WORLD"]})

print(buf["T_STRING_FLD"][0])
print(buf.T_STRING_FLD[0])

buf.T_STRING2_FLD="OK" 

_,_,_ = e.tpcall("SVC, {"data":buf})

The fields by themselves shall be UbfDictFld class-based objects, which would allow list-like sequence occurrence access.
UbfDict() shall provide additional features:

- String representations in the dictionary format
- Init shall take another UbfDict() or standard dictionary as input
- Compare with dict and UbfDict()
- Iterators over the UbfDict: keys only, keys/value (lists), Keys/value occs
- Delete field
- Access to sub-buffers (BFLD_UBF), marking them as read-only
- Automatic underlying XATMI buffer GC when the object goes out of the scope

History

#1 Updated by Madars about 1 year ago

  • Status changed from New to Resolved

Release notes

Implemented UBF direct dictionary support.

Available from Enduro/X Python release 8.0.4+.

#2 Updated by Madars about 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF