Trippin Cyril
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
trippingcyril::StringWriter Class Reference

Simple in memory writer that just writes everything to a string. More...

#include <Writer.h>

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

Public Member Functions

virtual ~StringWriter ()
 
int Write (const char *data, size_t len) override
 
bool shouldDelete () const override
 
StringGetBuffer ()
 
- Public Member Functions inherited from trippingcyril::Writer
int WriteString (const String &data)
 

Additional Inherited Members

- Static Public Attributes inherited from trippingcyril::Writer
static const int BUFFER_SIZE
 

Detailed Description

Simple in memory writer that just writes everything to a string.

Note
This will clean itself up if the other end respects ShouldDelete

Constructor & Destructor Documentation

virtual trippingcyril::StringWriter::~StringWriter ( )
inlinevirtual

Member Function Documentation

String& trippingcyril::StringWriter::GetBuffer ( )
inline
bool trippingcyril::StringWriter::shouldDelete ( ) const
inlineoverridevirtual

Return true from this method if the object should be deleted

Returns
True by default

Reimplemented from trippingcyril::Writer.

int trippingcyril::StringWriter::Write ( const char *  data,
size_t  len 
)
overridevirtual

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

Implements trippingcyril::Writer.


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