Rudiments
wstringbuffer.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_WSTRINGBUFFER_H
5#define RUDIMENTS_WSTRINGBUFFER_H
6
7#include <rudiments/private/wstringbufferincludes.h>
8
14class RUDIMENTS_DLLSPEC wstringbuffer : public bytebuffer {
15 public:
16
20
24
31
35
39
42
48 off64_t setPositionRelativeToBeginning(off64_t pos);
49
55 off64_t setPositionRelativeToCurrent(off64_t pos);
56
63 off64_t setPositionRelativeToEnd(off64_t pos);
64
67 off64_t getPosition();
68
76 ssize_t write(const wchar_t *string);
77
86 ssize_t write(const wchar_t *string, size_t length);
87
95 ssize_t write(wchar_t character);
96
105 ssize_t write(int16_t number);
106
115 ssize_t write(int32_t number);
116
125 ssize_t write(int64_t number);
126
135 ssize_t write(uint16_t number);
136
145 ssize_t write(uint32_t number);
146
155 ssize_t write(uint64_t number);
156
165 ssize_t write(float number);
166
175 ssize_t write(float number, uint16_t scale);
176
186 ssize_t write(float number, uint16_t precision,
187 uint16_t scale);
188
197 ssize_t write(double number);
198
207 ssize_t write(double number, uint16_t scale);
208
218 ssize_t write(double number, uint16_t precision,
219 uint16_t scale);
220
221
227 wstringbuffer *append(const wchar_t *string);
228
235 wstringbuffer *append(const wchar_t *string, size_t length);
236
243
250 wstringbuffer *append(int16_t number);
251
258 wstringbuffer *append(int32_t number);
259
266 wstringbuffer *append(int64_t number);
267
274 wstringbuffer *append(uint16_t number);
275
282 wstringbuffer *append(uint32_t number);
283
290 wstringbuffer *append(uint64_t number);
291
298 wstringbuffer *append(int16_t number, uint16_t zeropadding);
299
306 wstringbuffer *append(int32_t number, uint16_t zeropadding);
307
314 wstringbuffer *append(int64_t number, uint16_t zeropadding);
315
322 wstringbuffer *append(uint16_t number, uint16_t zeropadding);
323
330 wstringbuffer *append(uint32_t number, uint16_t zeropadding);
331
338 wstringbuffer *append(uint64_t number, uint16_t zeropadding);
339
347
354 wstringbuffer *append(float number, uint16_t scale);
355
363 wstringbuffer *append(float number, uint16_t precision,
364 uint16_t scale);
365
372 wstringbuffer *append(double number);
373
380 wstringbuffer *append(double number, uint16_t scale);
381
389 wstringbuffer *append(double number, uint16_t precision,
390 uint16_t scale);
391
393 void truncate(size_t pos);
394
396 void truncate();
397
401 bool clear();
402
407 bool clear(size_t initialsize);
408
415 bool clear(wchar_t *initialcontents, size_t initialsize);
416
418 const wchar_t *getString();
419
426 wchar_t *detachString();
427
430 size_t getStringLength();
431};
432
433#include <rudiments/private/wstringbufferinlines.h>
434
435#endif
Definition avltree.h:11
Definition bytebuffer.h:13
bytebuffer & operator=(bytebuffer &v)
bool clear()
off64_t setPositionRelativeToCurrent(off64_t offset)
ssize_t write(const byte_t *data, size_t size)
off64_t getPosition()
virtual void truncate()
off64_t setPositionRelativeToBeginning(off64_t offset)
off64_t setPositionRelativeToEnd(off64_t offset)
bytebuffer * append(const byte_t *data, size_t size)
Definition character.h:11
Definition wstringbuffer.h:14