diff options
Diffstat (limited to '')
-rw-r--r-- | src/view.h | 46 |
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 | */ | ||
14 | class View | ||
15 | { | ||
16 | public: | ||
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 | |||
43 | private: | ||
44 | }; | ||
45 | |||
46 | #endif | ||