All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_JSONParser::TiledStreamBuf Class Reference

#include <UT_JSONParser.h>

+ Inheritance diagram for UT_JSONParser::TiledStreamBuf:

Public Member Functions

 TiledStreamBuf (UT_JSONParser &p)
virtual ~TiledStreamBuf ()
virtual int_type underflow ()

Detailed Description

The TiledStream class reads data that was generated by a UT_JSONWriter::TiledStream. The reader expects an array, followed by multiple arrays of uint8. The multiple arrays appear as a single stream to the user. To read a tiled stream from a JSON file, you would do something like:

bool copyStream(UT_JSONParser &p, ostream &os)
while (true)
char buffer[128];
exint nread = is.read(buffer, 128);
if (nread < 0)
return false; // See p.getErrors() for error message
if (nread == 0) // Read to end of stream
os.write(buffer, nread);
return true;

Definition at line 708 of file UT_JSONParser.h.

Constructor & Destructor Documentation

UT_JSONParser::TiledStreamBuf::TiledStreamBuf ( UT_JSONParser p)
virtual UT_JSONParser::TiledStreamBuf::~TiledStreamBuf ( )

Member Function Documentation

virtual int_type UT_JSONParser::TiledStreamBuf::underflow ( )

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