Rudiments: /home/dmuse/temp/rudiments/include/rudiments/bytebuffer.h Source File

Rudiments

bytebuffer.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_BYTEBUFFER_H
5 #define RUDIMENTS_BYTEBUFFER_H
6
7 #include <rudiments/private/bytebufferincludes.h>
8
13 class RUDIMENTS_DLLSPEC bytebuffer : public output {
14 public:
15
18 bytebuffer();
19
22 bytebuffer(size_t initialsize);
23
28 bytebuffer(unsigned char *initialcontents, size_t initialsize);
29
32 bytebuffer(const bytebuffer &v);
33
36 bytebuffer &operator=(const bytebuffer &v);
37
39 virtual ~bytebuffer();
40
46 void setPosition(size_t pos);
47
50 size_t getPosition();
51
59 ssize_t write(const unsigned char *data, size_t size);
60
68 ssize_t write(const char *string, size_t length);
69
76 ssize_t write(const char *string);
77
85 ssize_t write(const wchar_t *string, size_t length);
86
93 ssize_t write(const wchar_t *string);
94
101 ssize_t write(char character);
102
109 ssize_t write(wchar_t character);
110
117 ssize_t write(int16_t number);
118
125 ssize_t write(int32_t number);
126
133 ssize_t write(int64_t number);
134
141 ssize_t write(unsigned char character);
142
149 ssize_t write(uint16_t number);
150
157 ssize_t write(uint32_t number);
158
165 ssize_t write(uint64_t number);
166
173 ssize_t write(float number);
174
181 ssize_t write(double number);
182
188 ssize_t writeFormatted(const char *format, ...);
189
198 ssize_t writeFormatted(const char *format, va_list *argp);
199
205 ssize_t writeFormatted(const wchar_t *format, ...);
206
215 ssize_t writeFormatted(const wchar_t *format, va_list *argp);
216
217
224 bytebuffer *append(const unsigned char *data, size_t size);
225
232 bytebuffer *append(const char *string, size_t length);
233
239 bytebuffer *append(const char *string);
240
247 bytebuffer *append(const wchar_t *string, size_t length);
248
254 bytebuffer *append(const wchar_t *string);
255
261 bytebuffer *append(char character);
262
268 bytebuffer *append(wchar_t character);
269
275 bytebuffer *append(int16_t number);
276
282 bytebuffer *append(int32_t number);
283
289 bytebuffer *append(int64_t number);
290
296 bytebuffer *append(unsigned char character);
297
303 bytebuffer *append(uint16_t number);
304
310 bytebuffer *append(uint32_t number);
311
317 bytebuffer *append(uint64_t number);
318
324 bytebuffer *append(float number);
325
331 bytebuffer *append(double number);
332
336 bytebuffer *appendFormatted(const char *format, ...);
337
344 bytebuffer *appendFormatted(const char *format,
345 va_list *argp);
346
350 bytebuffer *appendFormatted(const wchar_t *format, ...);
351
358 bytebuffer *appendFormatted(const wchar_t *format,
359 va_list *argp);
360
362 virtual void truncate(size_t pos);
363
365 virtual void truncate();
366
367
372 ssize_t read(unsigned char *data, size_t size);
373
375 void clear();
376
379 void clear(size_t initialsize);
380
385 void clear(unsigned char *initialcontents,
386 size_t initialsize);
387
389 const unsigned char *getBuffer();
390
393 size_t getSize();
394
398 size_t getActualSize();
399
402 size_t getInitialSize();
403
411 unsigned char *detachBuffer();
412
413 #include <rudiments/private/bytebuffer.h>
414 };
415
416 #endif
bytebuffer
Definition: bytebuffer.h:13
bytebuffer::write
ssize_t write(uint16_t number)
bytebuffer::writeFormatted
ssize_t writeFormatted(const char *format, va_list *argp)
bytebuffer::write
ssize_t write(const wchar_t *string, size_t length)
bytebuffer::read
ssize_t read(unsigned char *data, size_t size)
bytebuffer::append
bytebuffer * append(const wchar_t *string, size_t length)
bytebuffer::append
bytebuffer * append(uint64_t number)
bytebuffer::append
bytebuffer * append(const char *string)
bytebuffer::~bytebuffer
virtual ~bytebuffer()
bytebuffer::append
bytebuffer * append(wchar_t character)
bytebuffer::detachBuffer
unsigned char * detachBuffer()
bytebuffer::write
ssize_t write(const char *string)
bytebuffer::append
bytebuffer * append(const char *string, size_t length)
bytebuffer::append
bytebuffer * append(const unsigned char *data, size_t size)
bytebuffer::append
bytebuffer * append(uint16_t number)
bytebuffer::append
bytebuffer * append(double number)
bytebuffer::setPosition
void setPosition(size_t pos)
bytebuffer::append
bytebuffer * append(int64_t number)
bytebuffer::clear
void clear(unsigned char *initialcontents, size_t initialsize)
bytebuffer::write
ssize_t write(int64_t number)
bytebuffer::clear
void clear()
bytebuffer::write
ssize_t write(int16_t number)
bytebuffer::append
bytebuffer * append(float number)
bytebuffer::append
bytebuffer * append(char character)
bytebuffer::write
ssize_t write(float number)
bytebuffer::write
ssize_t write(double number)
bytebuffer::append
bytebuffer * append(int32_t number)
bytebuffer::append
bytebuffer * append(int16_t number)
bytebuffer::truncate
virtual void truncate()
bytebuffer::appendFormatted
bytebuffer * appendFormatted(const char *format,...)
bytebuffer::bytebuffer
bytebuffer(unsigned char *initialcontents, size_t initialsize)
bytebuffer::write
ssize_t write(char character)
bytebuffer::append
bytebuffer * append(const wchar_t *string)
bytebuffer::writeFormatted
ssize_t writeFormatted(const wchar_t *format, va_list *argp)
bytebuffer::appendFormatted
bytebuffer * appendFormatted(const wchar_t *format,...)
bytebuffer::append
bytebuffer * append(uint32_t number)
bytebuffer::write
ssize_t write(const wchar_t *string)
bytebuffer::truncate
virtual void truncate(size_t pos)
bytebuffer::getInitialSize
size_t getInitialSize()
bytebuffer::bytebuffer
bytebuffer(size_t initialsize)
bytebuffer::appendFormatted
bytebuffer * appendFormatted(const wchar_t *format, va_list *argp)
bytebuffer::write
ssize_t write(const char *string, size_t length)
bytebuffer::write
ssize_t write(uint32_t number)
bytebuffer::write
ssize_t write(const unsigned char *data, size_t size)
bytebuffer::write
ssize_t write(uint64_t number)
bytebuffer::write
ssize_t write(int32_t number)
bytebuffer::write
ssize_t write(wchar_t character)
bytebuffer::writeFormatted
ssize_t writeFormatted(const wchar_t *format,...)
bytebuffer::bytebuffer
bytebuffer(const bytebuffer &v)
bytebuffer::bytebuffer
bytebuffer()
bytebuffer::append
bytebuffer * append(unsigned char character)
bytebuffer::getActualSize
size_t getActualSize()
bytebuffer::operator=
bytebuffer & operator=(const bytebuffer &v)
bytebuffer::getBuffer
const unsigned char * getBuffer()
bytebuffer::writeFormatted
ssize_t writeFormatted(const char *format,...)
bytebuffer::appendFormatted
bytebuffer * appendFormatted(const char *format, va_list *argp)
bytebuffer::clear
void clear(size_t initialsize)
bytebuffer::write
ssize_t write(unsigned char character)
bytebuffer::getSize
size_t getSize()
bytebuffer::getPosition
size_t getPosition()
character
Definition: character.h:11
output
Definition: output.h:9