diff options
Diffstat (limited to 'src/viewerplain.cpp')
| -rw-r--r-- | src/viewerplain.cpp | 87 |
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 | |||
| 5 | PluginInterface2( plain, ViewerPlain, Viewer, "Mike Buland", 0, 1 ); | ||
| 6 | |||
| 7 | ViewerPlain::ViewerPlain() : | ||
| 8 | bRunClean( true ) | ||
| 9 | { | ||
| 10 | } | ||
| 11 | |||
| 12 | ViewerPlain::~ViewerPlain() | ||
| 13 | { | ||
| 14 | } | ||
| 15 | |||
| 16 | void 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 | |||
| 30 | void ViewerPlain::endCommand() | ||
| 31 | { | ||
| 32 | if( sCmd.front().bCmdClean == false ) | ||
| 33 | printf("\n"); | ||
| 34 | sCmd.pop_front(); | ||
| 35 | } | ||
| 36 | |||
| 37 | void 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 | |||
| 47 | void 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 | |||
| 58 | void ViewerPlain::beginRequiresCheck( bool bCached, const std::string &sName ) | ||
| 59 | { | ||
| 60 | printHead(); | ||
| 61 | indent(); | ||
| 62 | printf(" deps: %s\n", sName.c_str() ); | ||
| 63 | } | ||
| 64 | |||
| 65 | void ViewerPlain::endRequiresCheck() | ||
| 66 | { | ||
| 67 | } | ||
| 68 | |||
| 69 | void ViewerPlain::beginPerform( Perform *pPerform ) | ||
| 70 | { | ||
| 71 | printHead(); | ||
| 72 | indent(); | ||
| 73 | printf(" %8s: %s\n", pPerform->getRule().c_str(), pPerform->getTarget().c_str() ); | ||
| 74 | } | ||
| 75 | |||
| 76 | void ViewerPlain::endPerform() | ||
| 77 | { | ||
| 78 | } | ||
| 79 | |||
| 80 | void ViewerPlain::endAction() | ||
| 81 | { | ||
| 82 | if( bRunClean == true ) | ||
| 83 | { | ||
| 84 | printf("Nothing to be done.\n\n"); | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
