Changeset View
Changeset View
Standalone View
Standalone View
formatters/astyle/astyle_stringiterator.h
Show All 26 Lines | |||||
27 | 27 | | |||
28 | #include "astyle.h" | 28 | #include "astyle.h" | ||
29 | 29 | | |||
30 | #include <string> | 30 | #include <string> | ||
31 | 31 | | |||
32 | class AStyleStringIterator : public astyle::ASSourceIterator | 32 | class AStyleStringIterator : public astyle::ASSourceIterator | ||
33 | { | 33 | { | ||
34 | public: | 34 | public: | ||
35 | AStyleStringIterator(const QString &string); | 35 | explicit AStyleStringIterator(const QString &string); | ||
36 | virtual ~AStyleStringIterator(); | 36 | virtual ~AStyleStringIterator(); | ||
37 | 37 | | |||
38 | bool hasMoreLines() const override; | 38 | bool hasMoreLines() const override; | ||
39 | std::string nextLine(bool emptyLineWasDeleted = false) override; | 39 | std::string nextLine(bool emptyLineWasDeleted = false) override; | ||
40 | std::string peekNextLine() override; | 40 | std::string peekNextLine() override; | ||
41 | void peekReset() override; | 41 | void peekReset() override; | ||
42 | 42 | | |||
43 | private: | 43 | private: | ||
44 | QString m_content; | 44 | QString m_content; | ||
45 | QTextStream m_is; | 45 | QTextStream m_is; | ||
46 | qint64 m_peekStart; | 46 | qint64 m_peekStart; | ||
47 | }; | 47 | }; | ||
48 | 48 | | |||
49 | #endif // ASTYLESTRINGITERATOR_H | 49 | #endif // ASTYLESTRINGITERATOR_H |