47#define J_ALIGNMT uintptr_t
49#define J_POINTER_NOT_ALIGNED(p) (0 != ((uintptr_t)p & (sizeof(J_ALIGNMT)-1)))
145 int vget(
const char* fmt, va_list* argList);
174 int get(
const char* fmt, ...);
187 JDecoder(U8* buf,
int bufSize,
int extraStackLen=0);
197 int startServiceLevel;
209#define JD_MNUM(o, m) #m, &(o)->m
214#define JD_MSTR(o, m) #m, &(o)->m, sizeof((o)->m)
219#define JD_ASTR(o, m) &(o)->m, sizeof((o)->m)
225int JDecoder_vget(
JDecoder* o,
const char* fmt, va_list* argList);
226int JDecoder_get(
JDecoder* o,
const char* fmt, ...);
227void JDecoder_constructor(
228 JDecoder* o, U8* buf,
int bufSize,
int extraStackLen);
232 return JDecoder_vget(
this, fmt, argList);
237 va_start(argList, fmt);
238 stat = JDecoder_vget(
this, fmt, &argList);
243 JDecoder_constructor(
this, buf, bufSize, extraStackLen);
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:242
int vget(const char *fmt, va_list *argList)
See JDecoder::get for details.
Definition: JDecoder.h:231
JDecoderS
JDecoder Status.
Definition: JDecoder.h:54
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:234
@ JDecoderS_Overflow
Received more array or object member values from parsed data than found in value tree.
Definition: JDecoder.h:66
@ JDecoderS_Underflow
Received less array or object member values from parsed data than found in value tree.
Definition: JDecoder.h:77
@ JDecoderS_OK
OK, no errors.
Definition: JDecoder.h:92
@ JDecoderS_NameNotFound
Parsed data includes a member whose name is not in value tree.
Definition: JDecoder.h:61
@ JDecoderS_StringOverflow
Parsed string longer than buffer provided.
Definition: JDecoder.h:69
@ JDecoderS_ChainedErr
A chained parser callback, provided via the 'X' format flag in JDecoder::get, reported an error.
Definition: JDecoder.h:88
@ JDecoderS_Unbalanced
Incorrect use of '{', '}', '[', or '[' in JDecoder::get.
Definition: JDecoder.h:72
@ JDecoderS_BufNotAligned
Memory buffer(s) provided in JDecoder constructor must be word aligned.
Definition: JDecoder.h:83
@ JDecoderS_FormatErr
Parsed data does not match the value tree that was created when method JDecoder::get was called.
Definition: JDecoder.h:58
@ JDecoderS_Unknown
Unkown error.
Definition: JDecoder.h:80
Used internally in JDecoder for nested data structures.
Definition: JDecoder.h:98
Used internally in JDecoder, where one instance represents one node in the pointer value tree.
Definition: JDecoder.h:108
JDecoder implements the parser callback API JParserIntf and builds a pointer value tree when JDecoder...
Definition: JDecoder.h:143
The JParserIntf interface class is the interface between the parser and an object that implements the...
Definition: JParser.h:65