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

#include <UT_JSONWriter.h>

Public Member Functions

 UT_AutoJSONWriter (UT_WorkBuffer &b)
 Write directly to the UT_WorkBuffer. More...
 
 UT_AutoJSONWriter (std::ostream &os, bool binary, UT_CompressionType compressionType=UT_COMPRESSION_TYPE_NONE)
 Write to the given ostream (binary and optionally gzipped) More...
 
 UT_AutoJSONWriter (const char *filename, bool binary, UT_CompressionType compressionType=UT_COMPRESSION_TYPE_NONE)
 Write to the given filename (binary and optionally gzipped) More...
 
 UT_AutoJSONWriter (UT_JSONValue &value)
 Write directly to the UT_JSONValue. More...
 
 ~UT_AutoJSONWriter ()
 
 operator UT_JSONWriter & ()
 Allow implicit casting between an auto-writer and the underlying writer. More...
 
void close ()
 Close the stream (causing all data to be flushed) More...
 
UT_JSONWriterwriter () const
 
UT_JSONWriteroperator* () const
 
UT_JSONWriteroperator-> () const
 

Detailed Description

Convenience class to allocate a writer which is automatically deleted For example:

bool save(UT_JSONWriter &w) { ... } // Method to save to standard writer
bool save(UT_WorkBuffer &buffer) // Save to a UT_WorkBuffer
{
return save(w);
}
bool save(UT_JSONValue &value) // Save to a UT_JSONValue
{
return save(w);
}
Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 476 of file UT_JSONWriter.h.

Constructor & Destructor Documentation

UT_AutoJSONWriter::UT_AutoJSONWriter ( UT_WorkBuffer b)
inline

Write directly to the UT_WorkBuffer.

Definition at line 480 of file UT_JSONWriter.h.

UT_AutoJSONWriter::UT_AutoJSONWriter ( std::ostream &  os,
bool  binary,
UT_CompressionType  compressionType = UT_COMPRESSION_TYPE_NONE 
)
inline

Write to the given ostream (binary and optionally gzipped)

Definition at line 485 of file UT_JSONWriter.h.

UT_AutoJSONWriter::UT_AutoJSONWriter ( const char *  filename,
bool  binary,
UT_CompressionType  compressionType = UT_COMPRESSION_TYPE_NONE 
)
inline

Write to the given filename (binary and optionally gzipped)

Definition at line 492 of file UT_JSONWriter.h.

UT_AutoJSONWriter::UT_AutoJSONWriter ( UT_JSONValue value)
inline

Write directly to the UT_JSONValue.

Definition at line 499 of file UT_JSONWriter.h.

UT_AutoJSONWriter::~UT_AutoJSONWriter ( )
inline

Definition at line 503 of file UT_JSONWriter.h.

Member Function Documentation

void UT_AutoJSONWriter::close ( )
inline

Close the stream (causing all data to be flushed)

Definition at line 519 of file UT_JSONWriter.h.

UT_AutoJSONWriter::operator UT_JSONWriter & ( )
inline

Allow implicit casting between an auto-writer and the underlying writer.

Definition at line 516 of file UT_JSONWriter.h.

UT_JSONWriter& UT_AutoJSONWriter::operator* ( void  ) const
inline

Access to the writer

Definition at line 511 of file UT_JSONWriter.h.

UT_JSONWriter* UT_AutoJSONWriter::operator-> ( void  ) const
inline

Access to the writer

Definition at line 512 of file UT_JSONWriter.h.

UT_JSONWriter& UT_AutoJSONWriter::writer ( ) const
inline

Access to the writer

Definition at line 510 of file UT_JSONWriter.h.


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