DDraceNetwork Docs
linereader.h
Go to the documentation of this file.
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
9{
10 char *m_pBuffer;
11 unsigned m_BufferPos;
13
14public:
17
18 bool OpenFile(IOHANDLE File);
19 void OpenBuffer(char *pBuffer); // Buffer must have been allocated with malloc, will be freed by the line reader
20
21 const char *Get(); // Returned string is valid until the line reader is destroyed
22};
23#endif
Definition: linereader.h:9
~CLineReader()
Definition: linereader.cpp:12
void OpenBuffer(char *pBuffer)
Definition: linereader.cpp:33
unsigned m_BufferPos
Definition: linereader.h:11
const char * Get()
Definition: linereader.cpp:48
CLineReader()
Definition: linereader.cpp:7
char * m_pBuffer
Definition: linereader.h:10
bool m_ReadLastLine
Definition: linereader.h:12
bool OpenFile(IOHANDLE File)
Definition: linereader.cpp:17
void * IOHANDLE
Definition: logger.h:11