Types
IworkObject = ref object id*: uint64 ## tsp identifier, unique across the document msgType*: uint32 ## per-application registry type number raw*: string ## undecoded payload bytes entry*: string ## container entry the object came from
- one archived object from an iwa stream Source Edit
ObjectIndex = object objects*: Table[uint64, IworkObject]
- every object in a document, keyed by identifier Source Edit
Procs
proc buildIndex(c: IworkContainer): ObjectIndex {. ...raises: [IworkFormatError, Exception, IworkContainerError, KeyError], tags: [RootEffect], forbids: [].}
- parses every .iwa in the container into one id-keyed object table Source Edit
proc deref(idx: ObjectIndex; msg: WireMessage; field: int): Option[IworkObject] {. ...raises: [KeyError], tags: [], forbids: [].}
- resolves a tsp.reference held in a field into the target object, or none if the field is absent, malformed, or dangling Source Edit
proc derefAll(idx: ObjectIndex; msg: WireMessage; field: int): seq[IworkObject] {. ...raises: [KeyError], tags: [], forbids: [].}
- resolves every tsp.reference in a repeated field, skipping malformed or dangling ones Source Edit
proc message(obj: IworkObject): WireMessage {....raises: [IworkFormatError], tags: [], forbids: [].}
- Source Edit