HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_JSONHandleNull Class Reference

This class skips over any JSON events. More...

#include <UT_JSONHandle.h>

+ Inheritance diagram for UT_JSONHandleNull:

Public Member Functions

 UT_JSONHandleNull ()
 
 ~UT_JSONHandleNull () override
 
 UT_JSONHandleNull (const UT_JSONHandleNull &)=delete
 
UT_JSONHandleNulloperator= (const UT_JSONHandleNull &)=delete
 
bool jsonNull (UT_JSONParser &p) override
 Event method to process a null token. More...
 
bool jsonBool (UT_JSONParser &p, bool value) override
 Event method to process a bool (true or false tokens) More...
 
bool jsonInt (UT_JSONParser &p, int64 value) override
 Event method to process an integer. More...
 
bool jsonReal (UT_JSONParser &p, fpreal64 value) override
 Event method to process a real/float. More...
 
bool jsonString (UT_JSONParser &p, const char *v, int64 len) override
 Event method to process a string value. More...
 
bool jsonKey (UT_JSONParser &p, const char *v, int64 len) override
 Event method to process the key of a map/object is read. More...
 
bool jsonBeginMap (UT_JSONParser &p) override
 Event method invoked at the start of a map/object. More...
 
bool jsonEndMap (UT_JSONParser &p) override
 Event method invoked at the end of a map/object. More...
 
bool jsonBeginArray (UT_JSONParser &p) override
 Event method invoked at the beginning of an array object. More...
 
bool jsonEndArray (UT_JSONParser &p) override
 Event method invoked at the end of an array object. More...
 
- Public Member Functions inherited from UT_JSONHandle
 UT_JSONHandle ()
 
virtual ~UT_JSONHandle ()
 
 UT_JSONHandle (const UT_JSONHandle &)=delete
 
UT_JSONHandleoperator= (const UT_JSONHandle &)=delete
 
bool parseObject (UT_JSONParser &p, UT_IStream *is=0)
 Convenience method to parse a single object. More...
 
virtual bool jsonStringHolder (UT_JSONParser &p, const UT_StringHolder &s)
 
virtual bool jsonKeyHolder (UT_JSONParser &p, const UT_StringHolder &s)
 
virtual bool uaBool (UT_JSONParser &p, int64 length)
 
virtual bool uaInt8 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of int8 data. More...
 
virtual bool uaInt16 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of int16 data. More...
 
virtual bool uaInt32 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of int32 data. More...
 
virtual bool uaInt64 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of int64 data. More...
 
virtual bool uaReal16 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of real16 data. More...
 
virtual bool uaReal32 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of real32 data. More...
 
virtual bool uaReal64 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of real64 data. More...
 
virtual bool uaUInt8 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of unsigned uint8 data. More...
 
virtual bool uaUInt16 (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of unsigned uint16 data. More...
 
virtual bool uaString (UT_JSONParser &p, int64 length)
 Event method to handle uniform array of string data (use uaReadString) More...
 
virtual bool uaStringToken (UT_JSONParser &p, int64 length)
 
virtual void errorPrefix (UT_JSONParser &p, UT_WorkBuffer &msg)
 

Additional Inherited Members

- Static Public Member Functions inherited from UT_JSONHandle
static UT_JSONHandlegetNullHandle ()
 
static void releaseNullHandle (UT_JSONHandle *h)
 Instead of deleting the null handle, please call releaseNullHandle() More...
 
- Protected Member Functions inherited from UT_JSONHandle
bool isKey (const char *s1, const char *s2) const
 Convenience method to test key values. More...
 
void skipBadKey (UT_JSONParser &p, const char *key)
 
void fatalBadKey (UT_JSONParser &p, const char *key)
 

Detailed Description

This class skips over any JSON events.

The UT_JSONHandleNull will simply skip over any JSON events. useful as a base class for an event handler which only expects certain events. For example, if you only expect the keyword argument, you might have a class like:

class MyHandle : public UT_JSONHandleNull {
virtual bool jsonInt(UT_JSONParser &p, int64 len);
virtual bool jsonReal(UT_JSONParser &p, fpreal64 len);
virtual const char *className() { return "MyClass" }
}

The base class would skip over anything other than an integer or real.

Note
Uniform arrays are handled by the UT_JSONHandle base class
See Also
UT_JSONHandle, UT_JSONHandleError

Definition at line 212 of file UT_JSONHandle.h.

Constructor & Destructor Documentation

UT_JSONHandleNull::UT_JSONHandleNull ( )
inline

Definition at line 214 of file UT_JSONHandle.h.

UT_JSONHandleNull::~UT_JSONHandleNull ( )
inlineoverride

Definition at line 215 of file UT_JSONHandle.h.

UT_JSONHandleNull::UT_JSONHandleNull ( const UT_JSONHandleNull )
delete

Member Function Documentation

bool UT_JSONHandleNull::jsonBeginArray ( UT_JSONParser p)
overridevirtual

Event method invoked at the beginning of an array object.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonBeginMap ( UT_JSONParser p)
overridevirtual

Event method invoked at the start of a map/object.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonBool ( UT_JSONParser p,
bool  value 
)
overridevirtual

Event method to process a bool (true or false tokens)

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonEndArray ( UT_JSONParser p)
overridevirtual

Event method invoked at the end of an array object.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonEndMap ( UT_JSONParser p)
overridevirtual

Event method invoked at the end of a map/object.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonInt ( UT_JSONParser p,
int64  value 
)
overridevirtual

Event method to process an integer.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonKey ( UT_JSONParser p,
const char *  v,
int64  len 
)
overridevirtual

Event method to process the key of a map/object is read.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonNull ( UT_JSONParser p)
overridevirtual

Event method to process a null token.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonReal ( UT_JSONParser p,
fpreal64  value 
)
overridevirtual

Event method to process a real/float.

Implements UT_JSONHandle.

bool UT_JSONHandleNull::jsonString ( UT_JSONParser p,
const char *  value,
int64  len 
)
overridevirtual

Event method to process a string value.

Implements UT_JSONHandle.

UT_JSONHandleNull& UT_JSONHandleNull::operator= ( const UT_JSONHandleNull )
delete

The documentation for this class was generated from the following file: