OSDN Git Service

Don't use variable argument functions for error and warning messages
[tjqt4port/tj2qt4.git] / taskjuggler / FileInfo.h
1 /*
2  * FileInfo.h - TaskJuggler
3  *
4  * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * $Id$
11  */
12 #ifndef _FileInfo_h_
13 #define _FileInfo_h_
14
15 #include "FileToken.h"
16
17 class ProjectFile;
18
19 /**
20  * @short Stores much information about a project file.
21  * @author Chris Schlaeger <cs@kde.org>
22  */
23 class FileInfo : public FileToken
24 {
25 public:
26     FileInfo(ProjectFile* p, const QString& file, const QString& tp);
27
28     virtual ~FileInfo() { }
29
30     bool open();
31     bool close();
32
33     virtual QChar getC(bool expandMacros = true);
34     void ungetC(QChar c);
35
36     virtual TokenType nextToken(QString& buf);
37
38     virtual void setLocation(const QString& df, int dl);
39     virtual QString resolve(const QStringList* argList);
40     virtual Macro* getMacro(const QString& name) const;
41
42     virtual void errorMessage(const QString& msg);
43
44 private:
45     /**
46      * A pointer to the ProjectFile class that stores all read-in
47      * data.
48      */
49     ProjectFile* pf;
50
51     /**
52      * In case of a returned token, we also have to save the current line
53      * buffer and the current line number, in case an error has occured before
54      * the pushed back token.
55      */
56     QString oldLineBuf;
57     int oldLine;
58 };
59
60 #endif
61