.. default-domain:: chpl .. module:: ChplFormat :synopsis: The ChplFormat module provides a chplSerializer and chplDeserializer that ChplFormat ========== **Usage** .. code-block:: chapel use ChplFormat; or .. code-block:: chapel import ChplFormat; .. warning:: ChplFormat module is considered unstable pending naming changes The ChplFormat module provides a chplSerializer and chplDeserializer that aim to read and write data in a format similar to that of Chapel's syntax. .. record:: chplSerializer .. method:: proc ref serializeValue(writer: _writeType, const val: ?t) throws .. record:: AggregateSerializer .. attribute:: var writer .. attribute:: var _parent = false .. attribute:: var _first = true .. attribute:: var _firstPtr: c_ptr(bool) = nil .. method:: proc ref startClass(writer: _writeType, name: string, size: int) throws .. method:: proc endRecord() throws .. record:: TupleSerializer .. attribute:: var writer .. attribute:: const size: int .. attribute:: var _first: bool = true .. method:: proc ref writeElement(const element: ?) throws .. method:: proc endTuple() throws .. record:: ListSerializer .. attribute:: var writer .. attribute:: var _first: bool = true .. method:: proc ref writeElement(const element: ?) throws .. record:: ArraySerializer .. attribute:: var writer .. attribute:: var _first = true .. method:: proc startDim(size: int) throws .. method:: proc endDim() throws .. method:: proc ref writeElement(const element: ?) throws .. method:: proc endArray() throws .. record:: MapSerializer .. attribute:: var writer .. attribute:: var _first = true .. record:: chplDeserializer .. method:: proc ref deserializeType(reader: _readerType, type readType): readType throws .. method:: proc ref deserializeValue(reader: _readerType, ref val: ?readType): void throws .. record:: AggregateDeserializer .. attribute:: var reader .. attribute:: var _first = true .. attribute:: var _parent = false .. method:: proc startClass(reader: _readerType, name: string) throws .. method:: proc endRecord() throws .. record:: TupleDeserializer .. attribute:: var reader .. method:: proc readElement(type eltType): eltType throws .. method:: proc readElement(ref element) throws .. method:: proc endTuple() throws .. record:: ListDeserializer .. attribute:: var reader .. attribute:: var _first = true .. method:: proc ref readElement(type eltType): eltType throws .. method:: proc ref readElement(ref element) throws .. method:: proc endList() throws .. method:: proc hasMore(): bool throws .. record:: ArrayDeserializer .. attribute:: var reader .. method:: proc startDim() throws .. method:: proc endDim() throws .. method:: proc endArray() throws .. record:: MapDeserializer .. attribute:: var reader .. attribute:: var _first = true .. method:: proc hasMore(): bool throws