aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_japan/textures/advtrains_engine_japan.png
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_train_japan/textures/advtrains_engine_japan.png')
0 files changed, 0 insertions, 0 deletions
ULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef LOGOUTPUTBUFFER_HEADER #define LOGOUTPUTBUFFER_HEADER #include "log.h" #include <queue> class LogOutputBuffer : public ILogOutput { public: LogOutputBuffer(LogMessageLevel maxlev) { log_add_output(this, maxlev); } ~LogOutputBuffer() { log_remove_output(this); } virtual void printLog(const std::string &line) { m_buf.push(line); } std::string get() { if(empty()) return ""; std::string s = m_buf.front(); m_buf.pop(); return s; } bool empty() { return m_buf.empty(); } private: std::queue<std::string> m_buf; }; #endif