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

Attribute Interface for file I/O. More...

#include <GA_AIFJSON.h>

Public Member Functions

 GA_AIFJSON ()
 
virtual ~GA_AIFJSON ()
 
virtual bool save (UT_JSONWriter &w, const GA_Attribute *attrib, const GA_SaveMap &save) const =0
 
virtual bool load (UT_JSONParser &p, GA_Attribute *attrib, int64 save_version, const GA_LoadMap &load) const =0
 

Protected Member Functions

const GA_RangegetRange (const GA_Attribute *attrib, const GA_SaveMap &map)
 

Detailed Description

Attribute Interface for file I/O.

This class provides an interface used to save and load attributes to and from JSON files. This class is responsible for saving and loading the private data object in an attribute's JSON description.

JSON Schema: GA_Attribute-Data

Each attribute can save/load its information in its own JSON attribute block. Any data needed by the attribute can be saved in this data block.

See Also
GA_Attribute, GA_AttributeType, JSON Schema: GA_ATINumeric, JSON Schema: GA_ATIString

Definition at line 39 of file GA_AIFJSON.h.

Constructor & Destructor Documentation

GA_AIFJSON::GA_AIFJSON ( )
inline

Definition at line 42 of file GA_AIFJSON.h.

virtual GA_AIFJSON::~GA_AIFJSON ( )
inlinevirtual

Definition at line 43 of file GA_AIFJSON.h.

Member Function Documentation

const GA_Range& GA_AIFJSON::getRange ( const GA_Attribute attrib,
const GA_SaveMap map 
)
protected

During saving, this method can get an iterator for the specific attribute. The iterator will process the items which need to be saved.

virtual bool GA_AIFJSON::load ( UT_JSONParser p,
GA_Attribute attrib,
int64  save_version,
const GA_LoadMap load 
) const
pure virtual

Load and create a new attribute from a JSON stream.

Parameters
p
The JSON parser
attrib
The attribute to load
version
The version specified in the attribute definition (the value returned by getSaveVersion() when the attribute was saved). Default is 0.
load
The load map The detail being loaded should be retrieved by from the GA_LoadMap::getDetail() method.
virtual bool GA_AIFJSON::save ( UT_JSONWriter w,
const GA_Attribute attrib,
const GA_SaveMap save 
) const
pure virtual

Save the attribute to JSON stream.

Parameters
wThe JSON writer
attribThe attribute to be saved
saveThe save map.

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