HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT::Format::Writer Struct Reference

#include <UT_Format.h>

+ Inheritance diagram for UT::Format::Writer:

Public Member Functions

 Writer (char *buffer, size_t buffer_size)
 
void setBuffer (char *buffer, size_t buffer_size)
 
size_t operator() (const char *begin, const char *end) override
 
size_t operator() (const char *begin, size_t length)
 
- Public Member Functions inherited from UT::Format::CustomWriter
size_t operator() (const char *begin, size_t length)
 pointer+length api More...
 
 CustomWriter ()=default
 
virtual ~CustomWriter ()=default
 

Protected Attributes

char * myBuffer
 
size_t myBufferSize
 

Detailed Description

A writer class that writes to a raw character buffer, truncating if it fills the buffer. Returns the number of bytes that it tried to write, to get actual number of bytes written min this with the buffer_size.

Definition at line 189 of file UT_Format.h.

Constructor & Destructor Documentation

UT::Format::Writer::Writer ( char *  buffer,
size_t  buffer_size 
)
inline

Definition at line 191 of file UT_Format.h.

Member Function Documentation

size_t UT::Format::Writer::operator() ( const char *  begin,
const char *  end 
)
overridevirtual

Write the range of bytes from begin to end, non-inclusive (i.e. don't write out the byte pointed to by end). Return the number of bytes written.

Implements UT::Format::CustomWriter.

size_t UT::Format::Writer::operator() ( const char *  begin,
size_t  length 
)
inline

Definition at line 203 of file UT_Format.h.

void UT::Format::Writer::setBuffer ( char *  buffer,
size_t  buffer_size 
)
inline

Definition at line 195 of file UT_Format.h.

Member Data Documentation

char* UT::Format::Writer::myBuffer
protected

Definition at line 206 of file UT_Format.h.

size_t UT::Format::Writer::myBufferSize
protected

Definition at line 207 of file UT_Format.h.


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