Trippin Cyril
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Attributes | List of all members
trippingcyril::Writer Class Referenceabstract

Writer class to provide a general writing operation so it's easier to write wrapper classes for write operations. More...

#include <Writer.h>

Inheritance diagram for trippingcyril::Writer:
[legend]
Collaboration diagram for trippingcyril::Writer:
[legend]

Public Member Functions

virtual int Write (const char *data, size_t len)=0
 
int WriteString (const String &data)
 
virtual bool shouldDelete () const override
 

Static Public Attributes

static const int BUFFER_SIZE
 

Detailed Description

Writer class to provide a general writing operation so it's easier to write wrapper classes for write operations.

Member Function Documentation

virtual bool trippingcyril::Writer::shouldDelete ( ) const
inlineoverridevirtual

Return true from this method if the object should be deleted

Returns
True by default

Reimplemented from trippingcyril::ShouldDelete.

Reimplemented in trippingcyril::StringWriter.

virtual int trippingcyril::Writer::Write ( const char *  data,
size_t  len 
)
pure virtual

Override this method with your actual write method

Parameters
dataThe actual data
lenThe length of the data
Returns
You should return the amount of bytes written, should be len or < 0 on error

Implemented in trippingcyril::File, trippingcyril::LZMACompressor, trippingcyril::net::Socket, trippingcyril::GZipCompressor, trippingcyril::GZipDecompressor, trippingcyril::StringWriter, trippingcyril::Pipe, trippingcyril::Compressor, and trippingcyril::Decompressor.

int trippingcyril::Writer::WriteString ( const String data)
inline

Lazy String writing

Member Data Documentation

const int trippingcyril::Writer::BUFFER_SIZE
static

Buffer size hint for any operations that require buffering


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