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

#include <UT_JSONParser.h>

+ Inheritance diagram for UT_JSONParser::TiledStreamBuf:

Public Member Functions

 TiledStreamBuf (UT_JSONParser &p)
 
 ~TiledStreamBuf () override
 
 TiledStreamBuf (const TiledStreamBuf &)=delete
 
TiledStreamBufoperator= (const TiledStreamBuf &)=delete
 
int_type underflow () override
 

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
break;
os.write(buffer, nread);
}
return true;
}

Definition at line 726 of file UT_JSONParser.h.

Constructor & Destructor Documentation

UT_JSONParser::TiledStreamBuf::TiledStreamBuf ( UT_JSONParser p)
UT_JSONParser::TiledStreamBuf::~TiledStreamBuf ( )
override
UT_JSONParser::TiledStreamBuf::TiledStreamBuf ( const TiledStreamBuf )
delete

Member Function Documentation

TiledStreamBuf& UT_JSONParser::TiledStreamBuf::operator= ( const TiledStreamBuf )
delete
int_type UT_JSONParser::TiledStreamBuf::underflow ( )
override

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