|
CX Framework
Cross-platform C utility framework
|
#include <serreader.h>
Data Fields | |
| bool(* | readInt )(SerReader *r, int64 *out, stype declared) |
| bool(* | readUint )(SerReader *r, uint64 *out, stype declared) |
| bool(* | readReal )(SerReader *r, float64 *out, stype declared) |
| bool(* | arrBegin )(SerReader *r, int32 *count) |
| bool(* | arrNext )(SerReader *r) |
| false once the array is exhausted | |
| bool(* | mapBegin )(SerReader *r, int32 *count) |
| bool(* | mapNext )(SerReader *r, string *key) |
| false at end of map | |
| void(* | destroy )(SerReader *r) |
| frees private state and the struct | |
A serialization format, defined as a set of operations for reading each kind of value.
The traverser asks for whatever should come next according to the schema, and the backend checks and consumes it. peek is only needed when the next value's type isn't already known (a dynamic slot, an optional member); skip is for fields the schema doesn't recognize.
Definition at line 24 of file serreader.h.
| bool(* SerReaderOps::arrBegin) (SerReader *r, int32 *count) |
| count | Receives the element count, or < 0 if the format does not carry one |
Definition at line 40 of file serreader.h.
| bool(* SerReaderOps::mapBegin) (SerReader *r, int32 *count) |
| count | Receives the entry count, or < 0 if the format does not carry one |
Definition at line 44 of file serreader.h.
| bool(* SerReaderOps::readInt) (SerReader *r, int64 *out, stype declared) |
declared matters because some formats (e.g. compact binary) don't store a value's width on the wire – only the schema knows it. The value always comes back in its widest form; narrowing to the member's actual type happens elsewhere.
Definition at line 33 of file serreader.h.
| bool(* SerReaderOps::readReal) (SerReader *r, float64 *out, stype declared) |
declared matters because some formats (e.g. compact binary) don't store a value's width on the wire – only the schema knows it. The value always comes back in its widest form; narrowing to the member's actual type happens elsewhere.
Definition at line 35 of file serreader.h.
| bool(* SerReaderOps::readUint) (SerReader *r, uint64 *out, stype declared) |
declared matters because some formats (e.g. compact binary) don't store a value's width on the wire – only the schema knows it. The value always comes back in its widest form; narrowing to the member's actual type happens elsewhere.
Definition at line 34 of file serreader.h.