HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 545 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 549 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 554 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 561 of file UT_JSONWriter.h.

UT_AutoJSONWriter::UT_AutoJSONWriter ( UT_JSONValue value)
inline

Write directly to the UT_JSONValue.

Definition at line 568 of file UT_JSONWriter.h.

UT_AutoJSONWriter::~UT_AutoJSONWriter ( )
inline

Definition at line 572 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 588 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 585 of file UT_JSONWriter.h.

UT_JSONWriter& UT_AutoJSONWriter::operator* ( ) const
inline

Access to the writer

Definition at line 580 of file UT_JSONWriter.h.

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

Access to the writer

Definition at line 581 of file UT_JSONWriter.h.

UT_JSONWriter& UT_AutoJSONWriter::writer ( ) const
inline

Access to the writer

Definition at line 579 of file UT_JSONWriter.h.


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