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

« back to all changes in this revision

Viewing changes to buildtools/projectmanager/importers/automake/automakeprojectmodel.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of KDevelop
 
2
    Copyright (C) 2004 Roberto Raggi <roberto@kdevelop.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Library General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 2 of the License, or (at your option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
    Library General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to
 
16
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
    Boston, MA 02111-1307, USA.
 
18
*/
 
19
#ifndef AUTOMAKEPROJECTMODEL_H
 
20
#define AUTOMAKEPROJECTMODEL_H
 
21
 
 
22
#include <kdevprojectmodel.h>
 
23
 
 
24
class AutomakeFolderModel;
 
25
class AutomakeTargetModel;
 
26
class AutomakeFileModel;
 
27
 
 
28
typedef KSharedPtr<AutomakeFolderModel> AutomakeFolderDom;
 
29
typedef KSharedPtr<AutomakeTargetModel> AutomakeTargetDom;
 
30
typedef KSharedPtr<AutomakeFileModel> AutomakeFileDom;
 
31
 
 
32
typedef QValueList<AutomakeFolderDom> AutomakeFolderList;
 
33
typedef QValueList<AutomakeTargetDom> AutomakeTargetList;
 
34
typedef QValueList<AutomakeFileDom> AutomakeFileList;
 
35
 
 
36
class AutomakeTargetModel: public ProjectTargetModel
 
37
{
 
38
public:
 
39
    typedef AutomakeTargetDom Ptr;
 
40
    
 
41
protected:
 
42
    AutomakeTargetModel(ProjectModel *projectModel)
 
43
        : ProjectTargetModel(projectModel) {}
 
44
        
 
45
public: 
 
46
    static AutomakeTargetDom from(ProjectTargetDom dom)
 
47
    { return AutomakeTargetDom(dynamic_cast<AutomakeTargetModel*>(dom.data())); }
 
48
 
 
49
// ### use attribute/setAttribute    
 
50
    QString path;
 
51
    QString primary;
 
52
    QString prefix;
 
53
    
 
54
    QString ldflags;
 
55
    QString ldadd;
 
56
    QString libadd;
 
57
    QString dependencies;
 
58
    
 
59
private:
 
60
    friend class ProjectModel;
 
61
};
 
62
 
 
63
class AutomakeFileModel: public ProjectFileModel
 
64
{
 
65
public:
 
66
    typedef AutomakeFileDom Ptr;
 
67
    
 
68
protected:
 
69
    AutomakeFileModel(ProjectModel *projectModel)
 
70
        : ProjectFileModel(projectModel) {}
 
71
 
 
72
public:
 
73
    static AutomakeFileDom from(ProjectFileDom dom)
 
74
    { return AutomakeFileDom(dynamic_cast<AutomakeFileModel*>(dom.data())); }
 
75
    
 
76
private:
 
77
    friend class ProjectModel;
 
78
};
 
79
 
 
80
class AutomakeFolderModel: public ProjectFolderModel
 
81
{
 
82
public:
 
83
    typedef AutomakeFolderDom Ptr;
 
84
    
 
85
protected:
 
86
    AutomakeFolderModel(ProjectModel *projectModel)
 
87
        : ProjectFolderModel(projectModel) {}
 
88
            
 
89
public:
 
90
    static AutomakeFolderDom from(ProjectFolderDom dom)
 
91
    { return AutomakeFolderDom(dynamic_cast<AutomakeFolderModel*>(dom.data())); }
 
92
    
 
93
    QStringList subdirs() const;
 
94
    void addSubdir(const QString &path);
 
95
 
 
96
    QMap<QString, QString> prefixes;
 
97
    
 
98
private:
 
99
    friend class ProjectModel;
 
100
};
 
101
 
 
102
#endif // AUTOMAKEPROJECTMODEL_H