#ifndef BUFFER_H #define BUFFER_H #include #include #include "Text.h" #include "FileLoader.h" class Buffer { public: bool load_from_file(const char * filename); typedef std::shared_ptr LineType; typedef std::list LinesType; auto begin() { return m_lines.begin(); } auto end() { return m_lines.end(); } auto cbegin() const { return m_lines.cbegin(); } auto cend() const { return m_lines.cend(); } auto rbegin() { return m_lines.rbegin(); } auto rend() { return m_lines.rend(); } auto crbegin() const { return m_lines.crbegin(); } auto crend() const { return m_lines.crend(); } int get_num_lines() { return m_lines.size(); } protected: LinesType m_lines; /* TODO: delete this */ FileLoader m_fl; }; #endif