Rudiments: /home/dmuse/src/rudiments/include/rudiments/stringbuffer.h Source File

Rudiments

- Main Page
- Classes

stringbuffer.h
1 // Copyright (c) 2002 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_STRINGBUFFER_H
5 #define RUDIMENTS_STRINGBUFFER_H
6
7 #include <rudiments/private/stringbufferincludes.h>
8
9 class stringbufferprivate;
10
22 class RUDIMENTS_DLLSPEC stringbuffer : public bytebuffer {
23 public:
24
27 stringbuffer();
28
31 stringbuffer(size_t initialsize, size_t increment);
32
39 stringbuffer(char *initialcontents,
40 size_t initialsize, size_t increment);
41
44 stringbuffer(const stringbuffer &s);
45
48 stringbuffer &operator=(const stringbuffer &s);
49
51 ~stringbuffer();
52
58 void setPosition(size_t pos);
59
62 size_t getPosition();
63
71 stringbuffer *write(const unsigned char *string);
72
81 stringbuffer *write(const unsigned char *string,
82 size_t size);
83
91 stringbuffer *write(const char *string);
92
101 stringbuffer *write(const char *string, size_t size);
102
110 stringbuffer *write(char character);
111
120 stringbuffer *write(int16_t number);
121
130 stringbuffer *write(int32_t number);
131
140 stringbuffer *write(int64_t number);
141
149 stringbuffer *write(unsigned char character);
150
159 stringbuffer *write(uint16_t number);
160
169 stringbuffer *write(uint32_t number);
170
179 stringbuffer *write(uint64_t number);
180
189 stringbuffer *write(float number);
190
199 stringbuffer *write(float number, uint16_t scale);
200
210 stringbuffer *write(float number, uint16_t precision,
211 uint16_t scale);
212
221 stringbuffer *write(double number);
222
231 stringbuffer *write(double number, uint16_t scale);
232
242 stringbuffer *write(double number, uint16_t precision,
243 uint16_t scale);
244
245
251 stringbuffer *append(const unsigned char *string);
252
259 stringbuffer *append(const unsigned char *string,
260 size_t size);
261
267 stringbuffer *append(const char *string);
268
275 stringbuffer *append(const char *string, size_t size);
276
282 stringbuffer *append(char character);
283
290 stringbuffer *append(int16_t number);
291
298 stringbuffer *append(int32_t number);
299
306 stringbuffer *append(int64_t number);
307
313 stringbuffer *append(unsigned char character);
314
321 stringbuffer *append(uint16_t number);
322
329 stringbuffer *append(uint32_t number);
330
337 stringbuffer *append(uint64_t number);
338
345 stringbuffer *append(int16_t number, uint16_t zeropadding);
346
353 stringbuffer *append(int32_t number, uint16_t zeropadding);
354
361 stringbuffer *append(int64_t number, uint16_t zeropadding);
362
369 stringbuffer *append(uint16_t number, uint16_t zeropadding);
370
377 stringbuffer *append(uint32_t number, uint16_t zeropadding);
378
385 stringbuffer *append(uint64_t number, uint16_t zeropadding);
386
393 stringbuffer *append(float number);
394
401 stringbuffer *append(float number, uint16_t scale);
402
410 stringbuffer *append(float number, uint16_t precision,
411 uint16_t scale);
412
419 stringbuffer *append(double number);
420
427 stringbuffer *append(double number, uint16_t scale);
428
436 stringbuffer *append(double number, uint16_t precision,
437 uint16_t scale);
438
440 void truncate(size_t pos);
441
443 void truncate();
444
446 void clear();
447
449 const char *getString();
450
457 char *detachString();
458
461 size_t getStringLength();
462
463 #include <rudiments/private/stringbuffer.h>
464 };
465
466 #endif
bytebuffer::setPosition
void setPosition(size_t pos)
bytebuffer::truncate
virtual void truncate()
bytebuffer::append
bytebuffer * append(const unsigned char *data, size_t size)
character
Definition: character.h:11
stringbuffer
Definition: stringbuffer.h:22
bytebuffer
Definition: bytebuffer.h:21
bytebuffer::getPosition
size_t getPosition()
bytebuffer::clear
void clear()
bytebuffer::write
bytebuffer * write(const unsigned char *data, size_t size)
bytebuffer::operator=
bytebuffer & operator=(const bytebuffer &v)