blob: 3eb7697805f1966d919ef0d07ea6889d961f3c09 (
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
|
/*
* Copyright (C) 2007-2014 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 VIEW_H
#define VIEW_H
#include <bu/string.h>
#include "types.h"
/**
* Base class for all views. A view is the only way that build is allowed to
* communicate with the user during the processing of a buildfile, the main
* executable may output some things for command line arguments and whatnot on
* it's own, or debugging info, but all reports of everything happening during
* the process is sent through a view, so it can be made pretty and usable.
*/
class View
{
public:
View();
virtual ~View();
virtual void beginAction( const Bu::String &sAction )=0;
virtual void endAction()=0;
virtual void skipTarget( const Bu::String &sProfile,
const Target &rTarget )=0;
virtual void beginTarget( const Bu::String &sProfile,
const Target &rTarget )=0;
virtual void processTarget( const Bu::String &sProfile,
const Target &rTarget )=0;
virtual void endTarget()=0;
virtual void buildRequires( const Target &rTarget )=0;
virtual void cmdStarted( const Bu::String &sCmd )=0;
virtual void cmdFinished( const Bu::String &sStdOut,
const Bu::String &sStdErr, long iExit )=0;
virtual void userError( const Bu::String &sMsg )=0;
virtual void userWarning( const Bu::String &sMsg )=0;
virtual void userNotice( const Bu::String &sMsg )=0;
virtual void sysError( const Bu::String &sMsg )=0;
virtual void sysWarning( const Bu::String &sMsg )=0;
private:
};
#endif
|