aboutsummaryrefslogtreecommitdiff
path: root/src/viewerplain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewerplain.cpp')
-rw-r--r--src/viewerplain.cpp87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/viewerplain.cpp b/src/viewerplain.cpp
deleted file mode 100644
index 3e65f21..0000000
--- a/src/viewerplain.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
1#include "viewerplain.h"
2#include "perform.h"
3#include "bu/plugger.h"
4
5PluginInterface2( plain, ViewerPlain, Viewer, "Mike Buland", 0, 1 );
6
7ViewerPlain::ViewerPlain() :
8 bRunClean( true )
9{
10}
11
12ViewerPlain::~ViewerPlain()
13{
14}
15
16void ViewerPlain::beginCommand( Action::eAction nAct, const std::string &sTarget )
17{
18 Cmd cmd;
19 if( sCmd.empty() )
20 cmd.nLevel = 0;
21 else
22 cmd.nLevel = sCmd.front().nLevel+1;
23
24 cmd.bCmdClean = true;
25 cmd.sTarget = sTarget;
26
27 sCmd.push_front( cmd );
28}
29
30void ViewerPlain::endCommand()
31{
32 if( sCmd.front().bCmdClean == false )
33 printf("\n");
34 sCmd.pop_front();
35}
36
37void ViewerPlain::indent()
38{
39 if( sCmd.empty() ) return;
40 int jmax = sCmd.front().nLevel;
41 for( int j = 0; j < jmax; j++ )
42 {
43 printf(" ");
44 }
45}
46
47void ViewerPlain::printHead()
48{
49 if( sCmd.front().bCmdClean == true )
50 {
51 bRunClean = false;
52 sCmd.front().bCmdClean = false;
53 indent();
54 printf("--- %s ---\n", sCmd.front().sTarget.c_str() );
55 }
56}
57
58void ViewerPlain::beginRequiresCheck( bool bCached, const std::string &sName )
59{
60 printHead();
61 indent();
62 printf(" deps: %s\n", sName.c_str() );
63}
64
65void ViewerPlain::endRequiresCheck()
66{
67}
68
69void ViewerPlain::beginPerform( Perform *pPerform )
70{
71 printHead();
72 indent();
73 printf(" %8s: %s\n", pPerform->getRule().c_str(), pPerform->getTarget().c_str() );
74}
75
76void ViewerPlain::endPerform()
77{
78}
79
80void ViewerPlain::endAction()
81{
82 if( bRunClean == true )
83 {
84 printf("Nothing to be done.\n\n");
85 }
86}
87