C++ TargetRTS
Loading...
Searching...
No Matches
RTJsonParserUtils.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2024. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTJsonParserUtils_h__
11#define __RTJsonParserUtils_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#include <RTConfig.h>
18
19typedef enum
20{
21 RTJ_NONE = 1,
22 RTJ_OBJECT = 2,
23 RTJ_ARRAY = 4,
24 RTJ_COLON = 8,
25 RTJ_COMMA = 16,
26 RTJ_VALUE = 32
27}RTJsonKind;
28
29typedef enum
30{
31 RTJTOK_ERROR = 0,
32 RTJTOK_NONE = 1,
33 RTJTOK_OBJ_OPEN = 2,
34 RTJTOK_OBJ_CLOSE = 3,
35 RTJTOK_ARR_OPEN = 4,
36 RTJTOK_ARR_CLOSE = 5,
37 RTJTOK_COLON = 6,
38 RTJTOK_COMMA = 7,
39 RTJTOK_NULL = 8,
40 RTJTOK_TRUE = 9,
41 RTJTOK_FALSE = 10,
42 RTJTOK_NUMBER = 11,
43 RTJTOK_STRING = 12
44}RTJsonToken;
45
47{
48 unsigned int rtJsonMask;
49
50 RTS_INLINE int isRTJsonKind( RTJsonKind RTJKind );
51
52 RTS_INLINE void setRTJsonKind( RTJsonKind RTJKind );
53
54 RTS_INLINE void clearRTJsonKind( RTJsonKind RTJKind );
55
56 RTS_INLINE bool isRTJsonTokenValue( RTJsonToken rtJsonToken );
57
58public:
59 RTS_INLINE RTJsonParserUtils();
60
61 RTS_INLINE bool isExpectedToken( RTJsonToken rtjtok );
62
63 RTS_INLINE void RTJsonObjectOpen();
64
65 RTS_INLINE void RTJsonArrayOpen();
66
67 RTS_INLINE void RTJsonObjectClose();
68
69 RTS_INLINE void RTJsonArrayClose();
70
71 RTS_INLINE void RTJsonKeyword();
72
73 RTS_INLINE void RTJsonColonField();
74
75 RTS_INLINE void RTJsonCommaField();
76
77 RTS_INLINE void RTJsonNumberField();
78
79 RTS_INLINE void RTJsonStringField();
80
81 RTS_INLINE void RTJsonResetMask();
82
83};
84
85#if RTS_INLINES
86#include <RTJsonParserUtils.inl>
87#endif
88
89#endif // __RTJsonParserUtils_h__
Definition: RTJsonParserUtils.h:47