aboutsummaryrefslogtreecommitdiff
path: root/src/profile.h
blob: e175ef06b65964e837dc84746d56af218b1669cd (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
/*
 * Copyright (C) 2007-2012 Xagasoft, All rights reserved.
 *
 * This file is part of the Xagasoft Build and is released under the
 * terms of the license contained in the file LICENSE.
 */

#ifndef PROFILE_H
#define PROFILE_H

#include <bu/string.h>

class Profile
{
public:
    Profile( const class AstBranch *pRoot );
    Profile( const Profile &rSrc );
    virtual ~Profile();

    const Bu::String &getName() const;
    const class AstBranch *getRoot() const;
    const class Condition *getCond() const;
    bool shouldExec( class Runner &r, class Target &rTarget ) const;

    static Profile *genDefaultClean();

private:
    void setCondition();

private:
    Bu::String sName;
    const class AstBranch *pRoot;
    class Condition *pCond;
    class Ast *pAst;
};

#endif