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 ()
 
 UT_AutoJSONWriter (const UT_AutoJSONWriter &)=delete
 
UT_AutoJSONWriteroperator= (const UT_AutoJSONWriter &)=delete
 
 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 576 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 580 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 585 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 592 of file UT_JSONWriter.h.

UT_AutoJSONWriter::UT_AutoJSONWriter ( UT_JSONValue value)
inline

Write directly to the UT_JSONValue.

Definition at line 599 of file UT_JSONWriter.h.

UT_AutoJSONWriter::~UT_AutoJSONWriter ( )
inline

Definition at line 603 of file UT_JSONWriter.h.

UT_AutoJSONWriter::UT_AutoJSONWriter ( const UT_AutoJSONWriter )
delete

Member Function Documentation

void UT_AutoJSONWriter::close ( )
inline

Close the stream (causing all data to be flushed)

Definition at line 622 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 619 of file UT_JSONWriter.h.

UT_JSONWriter& UT_AutoJSONWriter::operator* ( ) const
inline

Access to the writer

Definition at line 614 of file UT_JSONWriter.h.

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

Access to the writer

Definition at line 615 of file UT_JSONWriter.h.

UT_AutoJSONWriter& UT_AutoJSONWriter::operator= ( const UT_AutoJSONWriter )
delete
UT_JSONWriter& UT_AutoJSONWriter::writer ( ) const
inline

Access to the writer

Definition at line 613 of file UT_JSONWriter.h.


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