Rudiments
ucs2stringbuffer.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_UCS2STRINGBUFFER_H
5#define RUDIMENTS_UCS2STRINGBUFFER_H
6
7#include <rudiments/private/ucs2stringbufferincludes.h>
8
13class RUDIMENTS_DLLSPEC ucs2stringbuffer : public bytebuffer {
14 public:
15
19
23
30
34
38
41
47 off64_t setPositionRelativeToBeginning(off64_t pos);
48
54 off64_t setPositionRelativeToCurrent(off64_t pos);
55
62 off64_t setPositionRelativeToEnd(off64_t pos);
63
66 off64_t getPosition();
67
75 ssize_t write(const byte_t *string);
76
85 ssize_t write(const byte_t *string, size_t size);
86
94 ssize_t writeUcs2(const ucs2_t *string);
95
104 ssize_t writeUcs2(const ucs2_t *string, size_t length);
105
113 ssize_t writeUcs2(ucs2_t character);
114
123 ssize_t write(int16_t number);
124
133 ssize_t write(int32_t number);
134
143 ssize_t write(int64_t number);
144
152 ssize_t write(byte_t character);
153
162 ssize_t write(uint16_t number);
163
172 ssize_t write(uint32_t number);
173
182 ssize_t write(uint64_t number);
183
192 ssize_t write(float number);
193
202 ssize_t write(float number, uint16_t scale);
203
213 ssize_t write(float number, uint16_t precision,
214 uint16_t scale);
215
224 ssize_t write(double number);
225
234 ssize_t write(double number, uint16_t scale);
235
245 ssize_t write(double number, uint16_t precision,
246 uint16_t scale);
247
248
254 ucs2stringbuffer *append(const byte_t *string);
255
262 ucs2stringbuffer *append(const byte_t *string,
263 size_t size);
264
270 ucs2stringbuffer *appendUcs2(const ucs2_t *string);
271
278 ucs2stringbuffer *appendUcs2(const ucs2_t *string,
279 size_t length);
280
287
295
303
311
318
325 ucs2stringbuffer *append(uint16_t number);
326
333 ucs2stringbuffer *append(uint32_t number);
334
341 ucs2stringbuffer *append(uint64_t number);
342
351 uint16_t zeropadding);
352
361 uint16_t zeropadding);
362
371 uint16_t zeropadding);
372
381 uint16_t zeropadding);
382
391 uint16_t zeropadding);
392
401 uint16_t zeropadding);
402
410
417 ucs2stringbuffer *append(float number, uint16_t scale);
418
427 uint16_t precision,
428 uint16_t scale);
429
437
444 ucs2stringbuffer *append(double number, uint16_t scale);
445
454 uint16_t precision,
455 uint16_t scale);
456
458 void truncate(size_t pos);
459
461 void truncate();
462
466 bool clear();
467
472 bool clear(size_t initialsize);
473
480 bool clear(ucs2_t *initialcontents, size_t initialsize);
481
484 const ucs2_t *getString();
485
492 ucs2_t *detachString();
493
496 size_t getStringLength();
497};
498
499#include <rudiments/private/ucs2stringbufferinlines.h>
500
501#endif
Definition avltree.h:11
Definition bytebuffer.h:13
bytebuffer & operator=(bytebuffer &v)
bool clear()
ssize_t writeUcs2(const ucs2_t *string, size_t length)
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)
bytebuffer * appendUcs2(const ucs2_t *string, size_t length)
off64_t setPositionRelativeToEnd(off64_t offset)
bytebuffer * append(const byte_t *data, size_t size)
Definition character.h:11
Definition ucs2stringbuffer.h:13