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

Extension of GA_IOJSON which saves GD specific properties. More...

#include <GD_IOJSON.h>

+ Inheritance diagram for GD_IOJSON:

Public Member Functions

 GD_IOJSON ()
 
virtual ~GD_IOJSON ()
 
- Public Member Functions inherited from GA_IOJSON
 GA_IOJSON ()
 
virtual ~GA_IOJSON ()
 
bool statJSON (UT_JSONParser &p, GA_Stat &stat, uint level) const
 Stat geometry from a JSON stream. More...
 
bool readJSON (GA_Detail &g, UT_JSONParser &p, const GA_LoadOptions *options) const
 Read geometry from a JSON stream. More...
 
bool writeJSON (const GA_Detail &g, UT_JSONWriter &w, const GA_SaveOptions *options) const
 Write geometry to a JSON stream. More...
 
virtual const char * getToken () const override
 
virtual const char * getLabel () const override
 
virtual bool checkFilename (const char *filename, const GA_SaveOptions *opts) const override
 
virtual bool checkFilename (const char *filename, const GA_LoadOptions *opts) const override
 
virtual bool checkByteMagic (uint8 first_byte, const GA_LoadOptions *opts) const override
 
virtual bool statStream (UT_IStream &is, GA_Stat &stat, uint stat_level) const override
 
virtual bool readStream (GA_Detail &g, UT_IStream &is, const GA_LoadOptions *opts, UT_StringArray *errors) const override
 
virtual bool writeFile (const GA_Detail &g, const char *filename, const GA_SaveOptions *opts, UT_StringArray *errors) const override
 
virtual bool writeStream (const GA_Detail &g, std::ostream &os, bool binary, const GA_SaveOptions *opts, UT_StringArray *errors) const override
 

Protected Member Functions

bool jsonLoadExtra (GA_Detail &gdp, UT_JSONParser &p, const char *token, const GA_LoadMap &map) const
 
bool jsonSaveExtra (const GA_Detail &gdp, UT_JSONWriter &w, const GA_SaveMap &map) const
 
- Protected Member Functions inherited from GA_IOJSON
virtual bool finishLoad (GA_Detail &gdp, const GA_LoadMap &) const
 
virtual bool readCheckStdin () const override
 
virtual bool readCheckCompressed () const override
 
virtual bool writeCheckStdout () const override
 

Additional Inherited Members

- Static Public Member Functions inherited from GA_IOJSON
static bool isScExtension (const char *filename)
 Check whether filename uses BLOSC compression. More...
 
static bool isGzExtension (const char *filename)
 Check whether filename uses GZIP compression. More...
 

Detailed Description

Extension of GA_IOJSON which saves GD specific properties.

The GD_IOJSON saves two additional keywords

  • "altitude"
    The altitude of the trim profiles/curves
  • "trimregions"
    Trim region sections

Definition at line 22 of file GD_IOJSON.h.

Constructor & Destructor Documentation

GD_IOJSON::GD_IOJSON ( )
inline

Definition at line 25 of file GD_IOJSON.h.

virtual GD_IOJSON::~GD_IOJSON ( )
inlinevirtual

Definition at line 26 of file GD_IOJSON.h.

Member Function Documentation

bool GD_IOJSON::jsonLoadExtra ( GA_Detail gdp,
UT_JSONParser p,
const char *  token,
const GA_LoadMap loadmap 
) const
protectedvirtual

When the JSON loader hits a token it doesn't understand, it will call this method. This allows sub-classes to load extra fields.

Reimplemented from GA_IOJSON.

bool GD_IOJSON::jsonSaveExtra ( const GA_Detail gdp,
UT_JSONWriter w,
const GA_SaveMap savemap 
) const
protectedvirtual

The jsonSaveExtra method is called during writing. This allows sub-classes to save additional information into the JSON stream.

Reimplemented from GA_IOJSON.


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