summaryrefslogtreecommitdiffstats
path: root/src/kile/outputfilter.h
blob: 8a0d38fc845d4360741b4bd4748299c10d966658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/***************************************************************************
    begin                : Die Sep 16 2003
    copyright            : (C) 2003 by Jeroen Wijnhout
    email                : wijnhout@science.uva.nl
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef OUTPUTFILTER_H
#define OUTPUTFILTER_H

#include <tqvaluestack.h>
#include <tqstring.h>
#include <tqwidget.h>

#include "outputinfo.h"

/**An object of this class is used to parse the output messages
of any third-party tool.
 
@author Thorsten Lck
  *@author Jeroen Wijnhout
  */

class KTextEdit;

class OutputFilter : public TQObject
{
    TQ_OBJECT
  

public:
    OutputFilter();
    virtual ~OutputFilter();

protected:

public:
    virtual bool Run(const TQString & logfile);

    //void setLog(const TQString &log) { m_log = log; }
    const TQString & log() const { return m_log; }

    void setSource(const TQString &src);
    const TQString & source() const  { return m_source; }
    const TQString & path() const { return m_srcPath; }

signals:
    void problem(int, const TQString &);
    void output(const TQString &);

protected:
    virtual short parseLine(const TQString & strLine, short dwCookie);
    virtual bool OnTerminate();
    /**
    Returns the zero based index of the currently parsed line in the
    output file.
    */
    int GetCurrentOutputLine() const;

private:
    /** Number of current line in output file */
    unsigned int		m_nOutputLines;
    TQString		m_log, m_source, m_srcPath;
};
#endif