aboutsummaryrefslogtreecommitdiff
path: root/src/view.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
commitfb28f6800864176be2ffca29e8e664b641f33170 (patch)
treeba9180ac442939edc4eacbe1fdae93c5a7f87cee /src/view.h
parent51e21a316be6e052251b3dfc7d671061ebd67cee (diff)
downloadbuild-fb28f6800864176be2ffca29e8e664b641f33170.tar.gz
build-fb28f6800864176be2ffca29e8e664b641f33170.tar.bz2
build-fb28f6800864176be2ffca29e8e664b641f33170.tar.xz
build-fb28f6800864176be2ffca29e8e664b641f33170.zip
m3 is copied into trunk, we should be good to go, now.
Diffstat (limited to 'src/view.h')
-rw-r--r--src/view.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/view.h b/src/view.h
new file mode 100644
index 0000000..fb172aa
--- /dev/null
+++ b/src/view.h
@@ -0,0 +1,46 @@
1#ifndef VIEW_H
2#define VIEW_H
3
4#include <bu/fstring.h>
5#include "types.h"
6
7/**
8 * Base class for all views. A view is the only way that build is allowed to
9 * communicate with the user during the processing of a buildfile, the main
10 * executable may output some things for command line arguments and whatnot on
11 * it's own, or debugging info, but all reports of everything happening during
12 * the process is sent through a view, so it can be made pretty and usable.
13 */
14class View
15{
16public:
17 View();
18 virtual ~View();
19
20 virtual void beginAction( const Bu::FString &sAction )=0;
21 virtual void endAction()=0;
22
23 virtual void skipTarget( const Bu::FString &sProfile,
24 const Target &rTarget )=0;
25 virtual void beginTarget( const Bu::FString &sProfile,
26 const Target &rTarget )=0;
27 virtual void processTarget( const Bu::FString &sProfile,
28 const Target &rTarget )=0;
29 virtual void endTarget()=0;
30
31 virtual void buildRequires( const Target &rTarget )=0;
32 virtual void cmdStarted( const Bu::FString &sCmd )=0;
33 virtual void cmdFinished( const Bu::FString &sStdOut,
34 const Bu::FString &sStdErr, long iExit )=0;
35
36 virtual void userError( const Bu::FString &sMsg )=0;
37 virtual void userWarning( const Bu::FString &sMsg )=0;
38 virtual void userNotice( const Bu::FString &sMsg )=0;
39
40 virtual void sysError( const Bu::FString &sMsg )=0;
41 virtual void sysWarning( const Bu::FString &sMsg )=0;
42
43private:
44};
45
46#endif