1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef ENGINE_SHARED_LINEREADER_H
4#define ENGINE_SHARED_LINEREADER_H
5#include <base/types.h>
6
7// buffered stream for reading lines, should perhaps be something smaller
8class CLineReader
9{
10 char m_aBuffer[4 * 8192 + 1]; // 1 additional byte for null termination
11 unsigned m_BufferPos;
12 unsigned m_BufferSize;
13 unsigned m_BufferMaxSize;
14 IOHANDLE m_File;
15
16public:
17 void Init(IOHANDLE File);
18 char *Get(); // Returned string is only valid until next Get() call
19};
20#endif
21