49#define J_ALIGNMT uintptr_t
51#define J_POINTER_NOT_ALIGNED(p) (0 != ((uintptr_t)p & (sizeof(J_ALIGNMT)-1)))
150 int vget(
const char* fmt, va_list* argList);
193 int get(
const char* fmt, ...);
209 JDecoder(
U8* buf,
int bufSize,
int extraStackLen=0);
221 int startServiceLevel;
233#define JD_MNUM(o, m) #m, &(o)->m
238#define JD_MSTR(o, m) #m, &(o)->m, sizeof((o)->m)
243#define JD_ASTR(o, m) &(o)->m, sizeof((o)->m)
261 JDecoder* o,
U8* buf,
int bufSize,
int extraStackLen);
270 va_start(argList, fmt);
int JDecoder_get(JDecoder *o, const char *fmt,...)
Build a pointer value tree that is used by the integrated parser callback function when the parser fe...
JDecoder JDecoder
JDecoder implements the parser callback API JParserIntf and builds a pointer value tree when JDecoder...
JDecoder(U8 *buf, int bufSize, int extraStackLen=0)
Create/initialize a JDecoder instance.
Definition: JDecoder.h:275
int vget(const char *fmt, va_list *argList)
Build the same schema as get(), consuming a variable argument list.
Definition: JDecoder.h:264
JDecoderS
JDecoder Status.
Definition: JDecoder.h:56
void JDecoder_constructor(JDecoder *o, U8 *buf, int bufSize, int extraStackLen)
Create/initialize a JDecoder instance.
int JDecoder_vget(JDecoder *o, const char *fmt, va_list *argList)
Build the same schema as get(), consuming a variable argument list.
int get(const char *fmt,...)
Build a pointer value tree that is used by the integrated parser callback function when the parser fe...
Definition: JDecoder.h:267
@ JDecoderS_Overflow
Unconsumed schema values remain when a container ends; also used for excessive schema nesting.
Definition: JDecoder.h:68
@ JDecoderS_Underflow
Input supplies another value after all schema children were consumed.
Definition: JDecoder.h:78
@ JDecoderS_OK
OK, no errors.
Definition: JDecoder.h:93
@ JDecoderS_NameNotFound
Parsed data includes a member whose name is not in value tree.
Definition: JDecoder.h:63
@ JDecoderS_StringOverflow
Parsed string longer than buffer provided.
Definition: JDecoder.h:71
@ JDecoderS_ChainedErr
A chained parser callback, provided via the 'X' format flag in JDecoder::get, reported an error.
Definition: JDecoder.h:89
@ JDecoderS_Unbalanced
Incorrect use of '{', '}', '[', or ']' in JDecoder::get.
Definition: JDecoder.h:74
@ JDecoderS_BufNotAligned
Memory buffer(s) provided in JDecoder constructor must be word aligned.
Definition: JDecoder.h:84
@ JDecoderS_FormatErr
Parsed data does not match the value tree that was created when method JDecoder::get was called.
Definition: JDecoder.h:60
@ JDecoderS_Unknown
Unknown error.
Definition: JDecoder.h:81
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:91
int64_t S64
Signed 64-bit integer.
Definition: GenPrimT.h:87
int32_t S32
Signed 32-bit integer.
Definition: GenPrimT.h:85
uint8_t U8
Unsigned 8-bit integer.
Definition: GenPrimT.h:89
Used internally in JDecoder for nested data structures.
Definition: JDecoder.h:99
Used internally in JDecoder, where one instance represents one node in the pointer value tree.
Definition: JDecoder.h:109
JDecoder implements the parser callback API JParserIntf and builds a pointer value tree when JDecoder...
Definition: JDecoder.h:144
JDecoderS status
Decoder status set by get() and parser callbacks.
Definition: JDecoder.h:219
The JParserIntf interface class is the interface between the parser and an object that implements the...
Definition: JParser.h:72