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

JSON I/O of geometry objects. More...

#include <GA_IOJSON.h>

+ Inheritance diagram for GA_IOJSON:

Public Member Functions

 GA_IOJSON ()
 
 ~GA_IOJSON () override
 
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...
 
const char * getToken () const override
 
const char * getLabel () const override
 
bool checkFilename (const char *filename, const GA_SaveOptions *opts) const override
 
bool checkFilename (const char *filename, const GA_LoadOptions *opts) const override
 
bool checkByteMagic (uint8 first_byte, const GA_LoadOptions *opts) const override
 
bool statStream (UT_IStream &is, GA_Stat &stat, uint stat_level) const override
 
bool readStream (GA_Detail &g, UT_IStream &is, const GA_LoadOptions *opts, UT_StringArray *errors) const override
 
bool writeFile (const GA_Detail &g, const char *filename, const GA_SaveOptions *opts, UT_StringArray *errors) const override
 
bool writeStream (const GA_Detail &g, std::ostream &os, bool binary, const GA_SaveOptions *opts, UT_StringArray *errors) const override
 

Static Public Member Functions

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...
 

Protected Member Functions

virtual bool jsonLoadExtra (GA_Detail &gdp, UT_JSONParser &p, const char *token, const GA_LoadMap &loadmap) const
 
virtual bool jsonSaveExtra (const GA_Detail &gdp, UT_JSONWriter &w, const GA_SaveMap &savemap) const
 
virtual bool finishLoad (GA_Detail &gdp, const GA_LoadMap &) const
 
bool readCheckStdin () const override
 
bool readCheckCompressed () const override
 
bool writeCheckStdout () const override
 

Detailed Description

JSON I/O of geometry objects.

Definition at line 37 of file GA_IOJSON.h.

Constructor & Destructor Documentation

GA_IOJSON::GA_IOJSON ( )
GA_IOJSON::~GA_IOJSON ( )
override

Member Function Documentation

bool GA_IOJSON::checkByteMagic ( uint8  first_byte,
const GA_LoadOptions opts 
) const
override

Methods required to implement GA_IO interface

bool GA_IOJSON::checkFilename ( const char *  filename,
const GA_SaveOptions opts 
) const
override

Methods required to implement GA_IO interface

bool GA_IOJSON::checkFilename ( const char *  filename,
const GA_LoadOptions opts 
) const
override

Methods required to implement GA_IO interface

virtual bool GA_IOJSON::finishLoad ( GA_Detail gdp,
const GA_LoadMap  
) const
protectedvirtual

When the JSON loader finishes, it will call this method. This allows sub-classes to perform any post-load processing.

Reimplemented in GU_IOJSON.

const char* GA_IOJSON::getLabel ( ) const
override

Methods required to implement GA_IO interface

const char* GA_IOJSON::getToken ( ) const
override

Methods required to implement GA_IO interface

static bool GA_IOJSON::isGzExtension ( const char *  filename)
static

Check whether filename uses GZIP compression.

static bool GA_IOJSON::isScExtension ( const char *  filename)
static

Check whether filename uses BLOSC compression.

virtual bool GA_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 in GD_IOJSON, and GU_IOJSON.

virtual bool GA_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 in GD_IOJSON, and GU_IOJSON.

bool GA_IOJSON::readCheckCompressed ( ) const
inlineoverrideprotected

Configuration from GA_IO

Definition at line 93 of file GA_IOJSON.h.

bool GA_IOJSON::readCheckStdin ( ) const
inlineoverrideprotected

Configuration from GA_IO

Definition at line 92 of file GA_IOJSON.h.

bool GA_IOJSON::readJSON ( GA_Detail g,
UT_JSONParser p,
const GA_LoadOptions options 
) const

Read geometry from a JSON stream.

bool GA_IOJSON::readStream ( GA_Detail g,
UT_IStream is,
const GA_LoadOptions opts,
UT_StringArray errors 
) const
override

Methods required to implement GA_IO interface

bool GA_IOJSON::statJSON ( UT_JSONParser p,
GA_Stat stat,
uint  level 
) const

Stat geometry from a JSON stream.

bool GA_IOJSON::statStream ( UT_IStream is,
GA_Stat stat,
uint  stat_level 
) const
override

Methods required to implement GA_IO interface

bool GA_IOJSON::writeCheckStdout ( ) const
inlineoverrideprotected

Configuration from GA_IO

Definition at line 94 of file GA_IOJSON.h.

bool GA_IOJSON::writeFile ( const GA_Detail g,
const char *  filename,
const GA_SaveOptions opts,
UT_StringArray errors 
) const
override

Methods required to implement GA_IO interface

bool GA_IOJSON::writeJSON ( const GA_Detail g,
UT_JSONWriter w,
const GA_SaveOptions options 
) const

Write geometry to a JSON stream.

bool GA_IOJSON::writeStream ( const GA_Detail g,
std::ostream &  os,
bool  binary,
const GA_SaveOptions opts,
UT_StringArray errors 
) const
override

Methods required to implement GA_IO interface


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