mirror of
https://github.com/ksherlock/profuse.git
synced 2025-01-21 16:30:47 +00:00
37 lines
587 B
C
37 lines
587 B
C
|
|
||
|
#ifndef __PASCAL_TEXTWRITER_H__
|
||
|
#define __PASCAL_TEXTWRITER_H__
|
||
|
|
||
|
#include <vector>
|
||
|
#include <stdint.h>
|
||
|
|
||
|
namespace Pascal {
|
||
|
|
||
|
|
||
|
class TextWriter {
|
||
|
|
||
|
public:
|
||
|
|
||
|
TextWriter();
|
||
|
~TextWriter();
|
||
|
|
||
|
unsigned blocks() const;
|
||
|
|
||
|
void *data(unsigned block) const;
|
||
|
|
||
|
void writeLine(const char *);
|
||
|
void writeLine(const char *, unsigned length);
|
||
|
|
||
|
private:
|
||
|
|
||
|
std::vector<uint8_t *> _blocks;
|
||
|
unsigned _offset;
|
||
|
|
||
|
uint8_t *_current;
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
#endif
|