~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to formatters/lib/astyle_stringiterator.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of KDevelop
 
2
*  Copyright (C) 2008 Cédric Pasteur <cedric.pasteur@free.fr>
 
3
Copyright (C) 2001 Matthias Hölzer-Klüpfel <mhk@caldera.de>
 
4
 
 
5
This program is free software; you can redistribute it and/or
 
6
modify it under the terms of the GNU General Public
 
7
License as published by the Free Software Foundation; either
 
8
version 2 of the License, or (at your option) any later version.
 
9
 
 
10
This program is distributed in the hope that it will be useful,
 
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
General Public License for more details.
 
14
 
 
15
You should have received a copy of the GNU General Public License
 
16
along with this program; see the file COPYING.  If not, write to
 
17
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
Boston, MA 02110-1301, USA.
 
19
 
 
20
*/
 
21
 
 
22
#ifndef ASTYLESTRINGITERATOR_H
 
23
#define ASTYLESTRINGITERATOR_H
 
24
 
 
25
#include <QString>
 
26
#include <QTextStream>
 
27
 
 
28
#include "astyle.h"
 
29
 
 
30
class AStyleStringIterator : public astyle::ASSourceIterator
 
31
{
 
32
    public:
 
33
 
 
34
        AStyleStringIterator(const QString &string);
 
35
        virtual ~AStyleStringIterator();
 
36
 
 
37
        virtual bool hasMoreLines() const;
 
38
        virtual string nextLine();
 
39
        virtual string peekNextLine();
 
40
        virtual void peekReset();
 
41
 
 
42
    private:
 
43
        QString m_content;
 
44
        QTextStream *m_is;
 
45
        qint64 m_peekStart;
 
46
};
 
47
 
 
48
#endif // ASTYLESTRINGITERATOR_H