26 lines
383 B
C++
26 lines
383 B
C++
#ifndef BUFFER_H
|
|
#define BUFFER_H
|
|
|
|
#include <list>
|
|
#include <memory>
|
|
#include "PieceTable.h"
|
|
|
|
class Buffer
|
|
{
|
|
public:
|
|
std::shared_ptr<PieceTable> piece_table;
|
|
|
|
Buffer();
|
|
~Buffer();
|
|
bool load_from_file(const char * filename);
|
|
|
|
protected:
|
|
uint8_t * m_file_buffer;
|
|
unsigned long m_file_buffer_size;
|
|
bool m_eol_at_eof;
|
|
|
|
void free_file_buffer();
|
|
};
|
|
|
|
#endif
|