Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6jsoncontenthandler.h
Go to the documentation of this file.
1 
15 #ifndef P6JSONCONTENTHANDLER_H__
16 #define P6JSONCONTENTHANDLER_H__ 1
17 
18 #include "p6jsontypes.h"
19 #include "p6jsonlocator.h"
20 
21 namespace P6R {
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
58 interface p6IJSONContentHandler : public p6ICom
59 {
70  P6COMMETHOD endDocument() = 0;
71 
84  P6COMMETHOD endObject( P6UINT32 nestingLevel ) = 0;
85 
98  P6COMMETHOD endArray( P6UINT32 nestingLevel ) = 0;
99 
113 
124 
136  P6COMMETHOD startObject( P6UINT32 nestingLevel ) = 0;
137 
152  P6COMMETHOD startPair( P6JSONSTRING* pName ) = 0;
153 
165  P6COMMETHOD startArray( P6UINT32 nestingLevel ) = 0;
166 
188  P6COMMETHOD value( P6JSONVALUE* pValue ) = 0;
189 };
190 
191 // {97382B44-0238-43de-930F-5823575A7D8E}
192 #define IF_p6IJSONContentHandler {0x97382b44,0x238,0x43de,{0x93,0xf,0x58,0x23,0x57,0x5a,0x7d,0x8e}}
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 } // namespace
199 
200 
201 #endif
202 
203 
204 
205 
206 
207 
unsigned int P6UINT32
Definition: p6types.h:40
This interface is implemented by an application to handle the parsing events that are generated by th...
The 'jstring' field is set for: { P6JSON_TYPE_STR, P6JSON_TYPE_STRPART, P6JSON_TYPE_STREND, P6JSON_TYPE_INTEGER, P6JSON_TYPE_REAL } jstring is set for numbers to allow an application to convert the string to another numeric variable type (e.g., P6UINT64 value).
Definition: p6jsontypes.h:72
An instance of this component is passed to the application in 2 ways: a) Via the setDocumentLocator()...
Definition: p6jsonlocator.h:31
virtual P6R::P6ERR value(P6JSONVALUE *pValue)=0
Both JSON objects and arrays contain values which can be strings, boolean values, numeric values...
virtual P6R::P6ERR endArray(P6UINT32 nestingLevel)=0
Provides an application the notification when the most recent array (as defined by a callback of the ...
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
This is the interface structure used to point to tokens inside the JSON document being parsed...
virtual P6R::P6ERR endObject(P6UINT32 nestingLevel)=0
Provides an application the notification when the most recent object (as defined by a callback of the...
virtual P6R::P6ERR startObject(P6UINT32 nestingLevel)=0
Provides an application the notification when a new JSON object has been detected.
virtual P6R::P6ERR startArray(P6UINT32 nestingLevel)=0
Provides an application the notification when a new JSON array has been detected. ...
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR startDocument()=0
Provides an application the notification when the start of the JSON input document has been reached b...
virtual P6R::P6ERR endDocument()=0
Provides an application the notification when the end of the JSON input document has been reached by ...
virtual P6R::P6ERR setDocumentLocator(p6IJSONLocator *pObject)=0
This method is called just before the startDocument() method and the application is given a p6IJSONLo...
To avoid having to copy strings or creating new strings we simply point into a set of buffers the sta...
Definition: p6jsontypes.h:32
virtual P6R::P6ERR startPair(P6JSONSTRING *pName)=0
A JSON object consists of an unordered set of name/value pairs.
This is a JSON parsing utility interface which is implemented by P6R's parser.