HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_PrimitiveJSONExtend Class Referenceabstract

Class which extends an existing JSON schema. More...

#include <GA_PrimitiveJSONExtend.h>

+ Inheritance diagram for GA_PrimitiveJSONExtend:

Public Member Functions

 GA_PrimitiveJSONExtend (const GA_PrimitiveJSON *base)
 
 ~GA_PrimitiveJSONExtend () override
 
int getEntries () const override
 
const UT_StringHoldergetKeyword (int i) const override
 
bool saveField (const GA_Primitive *prim, int i, UT_JSONWriter &w, const GA_SaveMap &map) const override
 
bool saveField (const GA_Primitive *prim, int i, UT_JSONValue &value, const GA_SaveMap &map) const override
 
bool loadField (GA_Primitive *prim, int i, UT_JSONParser &p, const GA_LoadMap &map) const override
 
bool loadField (GA_Primitive *prim, int i, UT_JSONParser &p, const UT_JSONValue &value, const GA_LoadMap &map) const override
 
bool isEqual (int i, const GA_Primitive *prim1, const GA_Primitive *prim2) const override
 
virtual int localEntries () const =0
 
virtual const UT_StringHolderlocalKeyword (int i) const =0
 
virtual bool localSave (const GA_Primitive *prim, int i, UT_JSONWriter &w, const GA_SaveMap &map) const =0
 
virtual bool localSave (const GA_Primitive *prim, int i, UT_JSONValue &value, const GA_SaveMap &map) const =0
 
virtual bool localLoad (GA_Primitive *prim, int i, UT_JSONParser &p, const GA_LoadMap &map) const =0
 
virtual bool localLoad (GA_Primitive *prim, int i, UT_JSONParser &p, const UT_JSONValue &value, const GA_LoadMap &map) const =0
 
virtual bool localIsEqual (int i, const GA_Primitive *prim1, const GA_Primitive *prim2) const =0
 
- Public Member Functions inherited from GA_PrimitiveJSON
 GA_PrimitiveJSON ()
 
virtual ~GA_PrimitiveJSON ()
 
virtual bool shouldSaveField (const GA_Primitive *prim, int i, const GA_SaveMap &save) const
 
virtual bool save (const GA_Primitive *prim, UT_JSONWriter &w, const GA_SaveMap &map) const
 
virtual bool save (const GA_Primitive *prim, UT_JSONValue &v, const GA_SaveMap &map) const
 Save a single primitive to a UT_JSONValue. More...
 
virtual bool load (GA_Primitive *prim, UT_JSONParser &p, const GA_LoadMap &map) const
 
virtual bool load (GA_Primitive *prim, UT_JSONParser &p, const UT_JSONValue &value, const GA_LoadMap &map) const
 Load a single primitive from a UT_JSONValue. More...
 

Protected Member Functions

bool isBase (int i) const
 
int getLocal (int i) const
 
- Protected Member Functions inherited from GA_PrimitiveJSON
virtual bool getRunFields (const GA_Primitive **list, int list_size, const GA_SaveMap &save, UT_StringArray &varying, UT_JSONValue &uniform, uint &user_flags) const
 
virtual bool matchRun (const GA_Primitive *prim0, const GA_Primitive *prim1, const UT_StringArray &varying, const UT_JSONValue &uniform, uint user_flags) const
 
virtual bool saveRunFields (const GA_Primitive *prim, const GA_SaveMap &save, const UT_StringArray &varying, UT_JSONWriter &w, uint user_flags) const
 
virtual bool load (GA_Primitive *prim, UT_JSONParser &p, const GA_LoadMap &load, const UT_StringArray &varying, const GA_JSONUniformBlock &uniform) const
 
virtual bool loadUniform (GA_Primitive *prim, UT_JSONParser &p, const GA_LoadMap &map, const GA_JSONUniformBlock &uniform) const
 
virtual bool loadUnknownToken (GA_Primitive *prim, const char *token, UT_JSONParser &p, const GA_LoadMap &load) const
 
void init ()
 

Protected Attributes

const GA_PrimitiveJSONmyBase
 
int myBaseEntries
 
- Protected Attributes inherited from GA_PrimitiveJSON
UT_FSAmyTokens
 
int myEntries
 

Detailed Description

Class which extends an existing JSON schema.

Definition at line 28 of file GA_PrimitiveJSONExtend.h.

Constructor & Destructor Documentation

GA_PrimitiveJSONExtend::GA_PrimitiveJSONExtend ( const GA_PrimitiveJSON base)
GA_PrimitiveJSONExtend::~GA_PrimitiveJSONExtend ( )
override

Member Function Documentation

int GA_PrimitiveJSONExtend::getEntries ( ) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Implements GA_PrimitiveJSON.

const UT_StringHolder& GA_PrimitiveJSONExtend::getKeyword ( int  i) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Implements GA_PrimitiveJSON.

int GA_PrimitiveJSONExtend::getLocal ( int  i) const
inlineprotected

Definition at line 86 of file GA_PrimitiveJSONExtend.h.

bool GA_PrimitiveJSONExtend::isBase ( int  i) const
inlineprotected

Definition at line 85 of file GA_PrimitiveJSONExtend.h.

bool GA_PrimitiveJSONExtend::isEqual ( int  i,
const GA_Primitive prim1,
const GA_Primitive prim2 
) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Implements GA_PrimitiveJSON.

bool GA_PrimitiveJSONExtend::loadField ( GA_Primitive prim,
int  i,
UT_JSONParser p,
const GA_LoadMap map 
) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Implements GA_PrimitiveJSON.

bool GA_PrimitiveJSONExtend::loadField ( GA_Primitive prim,
int  i,
UT_JSONParser p,
const UT_JSONValue value,
const GA_LoadMap map 
) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Reimplemented from GA_PrimitiveJSON.

virtual int GA_PrimitiveJSONExtend::localEntries ( ) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

virtual bool GA_PrimitiveJSONExtend::localIsEqual ( int  i,
const GA_Primitive prim1,
const GA_Primitive prim2 
) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

virtual const UT_StringHolder& GA_PrimitiveJSONExtend::localKeyword ( int  i) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

virtual bool GA_PrimitiveJSONExtend::localLoad ( GA_Primitive prim,
int  i,
UT_JSONParser p,
const GA_LoadMap map 
) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

virtual bool GA_PrimitiveJSONExtend::localLoad ( GA_Primitive prim,
int  i,
UT_JSONParser p,
const UT_JSONValue value,
const GA_LoadMap map 
) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

virtual bool GA_PrimitiveJSONExtend::localSave ( const GA_Primitive prim,
int  i,
UT_JSONWriter w,
const GA_SaveMap map 
) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

virtual bool GA_PrimitiveJSONExtend::localSave ( const GA_Primitive prim,
int  i,
UT_JSONValue value,
const GA_SaveMap map 
) const
pure virtual

The local methods return information about the local schema (i.e. the extending schema. All indices (i) are 0 based.

bool GA_PrimitiveJSONExtend::saveField ( const GA_Primitive prim,
int  i,
UT_JSONWriter w,
const GA_SaveMap map 
) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Implements GA_PrimitiveJSON.

bool GA_PrimitiveJSONExtend::saveField ( const GA_Primitive prim,
int  i,
UT_JSONValue value,
const GA_SaveMap map 
) const
overridevirtual

Methods implemented from base GA_PrimitiveJSON. These methods are all implemented as:

if (isBase(i))
myBase->method(i, ...);
else
localMethod(getLocal(i), ...);

Return the number of data fields in the primitive private schema

Reimplemented from GA_PrimitiveJSON.

Member Data Documentation

const GA_PrimitiveJSON* GA_PrimitiveJSONExtend::myBase
protected

Definition at line 88 of file GA_PrimitiveJSONExtend.h.

int GA_PrimitiveJSONExtend::myBaseEntries
protected

Definition at line 89 of file GA_PrimitiveJSONExtend.h.


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