Rudiments
output.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_OUTPUT_H
5#define RUDIMENTS_OUTPUT_H
6
7#include <rudiments/private/outputincludes.h>
8
11class RUDIMENTS_DLLSPEC output : virtual public object {
12 public:
13
16
18 virtual ~output();
19
20
28 virtual off64_t setPositionRelativeToBeginning(off64_t offset);
29
37 virtual off64_t setPositionRelativeToCurrent(off64_t offset);
38
47 virtual off64_t setPositionRelativeToEnd(off64_t offset);
48
55 virtual off64_t getPosition();
56
57
61 virtual ssize_t write(const byte_t *string, size_t size)=0;
62
66 virtual ssize_t write(const char *string)=0;
67
73 virtual ssize_t write(const char *string, size_t length)=0;
74
78 virtual ssize_t write(char character)=0;
79
83 virtual ssize_t write(const wchar_t *string)=0;
84
90 virtual ssize_t write(const wchar_t *string, size_t length)=0;
91
95 virtual ssize_t write(wchar_t character)=0;
96
100 virtual ssize_t writeUcs2(const ucs2_t *string)=0;
101
107 virtual ssize_t writeUcs2(const ucs2_t *string,
108 size_t length)=0;
109
113 virtual ssize_t writeUcs2(ucs2_t character)=0;
114
118 virtual ssize_t write(int16_t number)=0;
119
123 virtual ssize_t write(int32_t number)=0;
124
128 virtual ssize_t write(int64_t number)=0;
129
133 virtual ssize_t write(byte_t character)=0;
134
138 virtual ssize_t write(uint16_t number)=0;
139
143 virtual ssize_t write(uint32_t number)=0;
144
148 virtual ssize_t write(uint64_t number)=0;
149
153 virtual ssize_t write(float number)=0;
154
158 virtual ssize_t write(double number)=0;
159
160
169 virtual ssize_t write(const byte_t *string, size_t size,
170 int32_t sec, int32_t usec);
171
180 virtual ssize_t write(const char *string,
181 int32_t sec, int32_t usec);
182
193 virtual ssize_t write(const char *string, size_t length,
194 int32_t sec, int32_t usec);
195
204 virtual ssize_t write(char character,
205 int32_t sec, int32_t usec);
206
215 virtual ssize_t write(const wchar_t *string,
216 int32_t sec, int32_t usec);
217
228 virtual ssize_t write(const wchar_t *string, size_t length,
229 int32_t sec, int32_t usec);
230
239 virtual ssize_t write(wchar_t character,
240 int32_t sec, int32_t usec);
241
250 virtual ssize_t writeUcs2(const ucs2_t *string,
251 int32_t sec, int32_t usec);
252
263 virtual ssize_t writeUcs2(const ucs2_t *string, size_t length,
264 int32_t sec, int32_t usec);
265
274 virtual ssize_t writeUcs2(ucs2_t character,
275 int32_t sec, int32_t usec);
276
285 virtual ssize_t write(int16_t number,
286 int32_t sec, int32_t usec);
287
296 virtual ssize_t write(int32_t number,
297 int32_t sec, int32_t usec);
298
307 virtual ssize_t write(int64_t number,
308 int32_t sec, int32_t usec);
309
318 virtual ssize_t write(byte_t character,
319 int32_t sec, int32_t usec);
320
329 virtual ssize_t write(uint16_t number,
330 int32_t sec, int32_t usec);
331
340 virtual ssize_t write(uint32_t number,
341 int32_t sec, int32_t usec);
342
351 virtual ssize_t write(uint64_t number,
352 int32_t sec, int32_t usec);
353
362 virtual ssize_t write(float number,
363 int32_t sec, int32_t usec);
364
373 virtual ssize_t write(double number,
374 int32_t sec, int32_t usec);
375
390 virtual ssize_t printf(const char *format, ...);
391
408 virtual ssize_t printf(const char *format, va_list *argp);
409
424 virtual ssize_t printf(const wchar_t *format, ...);
425
442 virtual ssize_t printf(const wchar_t *format, va_list *argp);
443
458 virtual ssize_t printfUcs2(const ucs2_t *format, ...);
459
476 virtual ssize_t printfUcs2(const ucs2_t *format, va_list *argp);
477
482 void safePrint(byte_t c);
483
488 void safePrint(const byte_t *str);
489
494 void safePrint(const byte_t *str, int32_t length);
495
500 void safePrint(char c);
501
506 void safePrint(const char *str);
507
512 void safePrint(const char *str, int32_t length);
513
516 void printBits(byte_t value);
517
520 void printBits(uint16_t value);
521
524 void printBits(uint32_t value);
525
528 void printBits(uint64_t value);
529
532 void printBits(char value);
533
536 void printBits(int16_t value);
537
540 void printBits(int32_t value);
541
544 void printBits(int64_t value);
545
548 void printBits(const byte_t *bits, uint64_t size);
549
552 void printHex(const byte_t *data, uint64_t size);
553
556 void printHex(const byte_t *data,
557 uint64_t size, uint16_t indent);
558
559 #include <rudiments/private/output.h>
560};
561
562#include <rudiments/private/outputinlines.h>
563
564#endif
Definition character.h:11
Definition object.h:10
Definition output.h:11
void printBits(byte_t value)
virtual ssize_t write(const char *string)=0
virtual ssize_t writeUcs2(const ucs2_t *string, int32_t sec, int32_t usec)
virtual ssize_t write(wchar_t character)=0
void safePrint(const byte_t *str)
virtual ssize_t write(byte_t character)=0
virtual ssize_t write(const char *string, int32_t sec, int32_t usec)
void printBits(char value)
virtual ssize_t write(float number, int32_t sec, int32_t usec)
void safePrint(const byte_t *str, int32_t length)
void printBits(uint16_t value)
virtual ssize_t write(uint16_t number)=0
virtual ssize_t write(wchar_t character, int32_t sec, int32_t usec)
virtual ssize_t writeUcs2(const ucs2_t *string)=0
virtual ssize_t write(char character, int32_t sec, int32_t usec)
void safePrint(const char *str, int32_t length)
virtual ssize_t write(byte_t character, int32_t sec, int32_t usec)
void printHex(const byte_t *data, uint64_t size, uint16_t indent)
void printBits(int16_t value)
void printHex(const byte_t *data, uint64_t size)
virtual ssize_t write(int64_t number)=0
virtual ssize_t write(int64_t number, int32_t sec, int32_t usec)
void printBits(uint64_t value)
virtual ssize_t write(double number, int32_t sec, int32_t usec)
virtual ssize_t write(int32_t number, int32_t sec, int32_t usec)
virtual ~output()
virtual ssize_t write(uint64_t number, int32_t sec, int32_t usec)
virtual ssize_t write(int32_t number)=0
void safePrint(const char *str)
virtual ssize_t write(const wchar_t *string, size_t length, int32_t sec, int32_t usec)
virtual ssize_t write(double number)=0
virtual ssize_t write(uint32_t number, int32_t sec, int32_t usec)
virtual ssize_t write(const wchar_t *string)=0
virtual ssize_t write(const wchar_t *string, int32_t sec, int32_t usec)
void printBits(uint32_t value)
virtual ssize_t write(const byte_t *string, size_t size)=0
virtual ssize_t writeUcs2(ucs2_t character, int32_t sec, int32_t usec)
void printBits(const byte_t *bits, uint64_t size)
virtual ssize_t write(const char *string, size_t length)=0
virtual ssize_t write(uint16_t number, int32_t sec, int32_t usec)
virtual ssize_t write(char character)=0
void printBits(int32_t value)
void printBits(int64_t value)
virtual ssize_t writeUcs2(const ucs2_t *string, size_t length)=0
void safePrint(char c)
virtual ssize_t write(uint32_t number)=0
virtual ssize_t writeUcs2(ucs2_t character)=0
virtual ssize_t write(int16_t number)=0
void safePrint(byte_t c)
virtual ssize_t write(float number)=0
virtual ssize_t write(int16_t number, int32_t sec, int32_t usec)
virtual ssize_t write(const byte_t *string, size_t size, int32_t sec, int32_t usec)
virtual ssize_t write(const char *string, size_t length, int32_t sec, int32_t usec)
virtual ssize_t write(const wchar_t *string, size_t length)=0
virtual ssize_t writeUcs2(const ucs2_t *string, size_t length, int32_t sec, int32_t usec)
virtual ssize_t write(uint64_t number)=0