aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-01-05 00:01:56 +0000
committerMike Buland <eichlan@xagasoft.com>2010-01-05 00:01:56 +0000
commitcbd66288c6f64a5532c93df29740342edc82075a (patch)
tree10bf9d1acfb7031e424c348474e7f271264a7b99
parent8c23a24f76814ab10006491be0e1cadaefb06fa1 (diff)
downloadbuild-cbd66288c6f64a5532c93df29740342edc82075a.tar.gz
build-cbd66288c6f64a5532c93df29740342edc82075a.tar.bz2
build-cbd66288c6f64a5532c93df29740342edc82075a.tar.xz
build-cbd66288c6f64a5532c93df29740342edc82075a.zip
More view tweaks, it's nice.
-rw-r--r--src/viewdefault.cpp24
-rw-r--r--src/viewdefault.h3
2 files changed, 20 insertions, 7 deletions
diff --git a/src/viewdefault.cpp b/src/viewdefault.cpp
index 25082ac..df7be13 100644
--- a/src/viewdefault.cpp
+++ b/src/viewdefault.cpp
@@ -61,7 +61,7 @@ void ViewDefault::skipTarget( const Bu::FString &/*sProfile*/,
61 iCurrent++; 61 iCurrent++;
62} 62}
63 63
64void ViewDefault::beginTarget( const Bu::FString &/*sProfile*/, 64void ViewDefault::beginTarget( const Bu::FString &sProfile,
65 const Target &rTarget ) 65 const Target &rTarget )
66{ 66{
67 if( iDepth == 0 ) 67 if( iDepth == 0 )
@@ -69,25 +69,33 @@ void ViewDefault::beginTarget( const Bu::FString &/*sProfile*/,
69 bDispedTrg = false; 69 bDispedTrg = false;
70 iTotal = rTarget.getDepCount(); 70 iTotal = rTarget.getDepCount();
71 iCurrent = 0; 71 iCurrent = 0;
72 if( bFirst == false )
73 {
74 sio << sio.nl;
75 }
76 bFirst = false;
77 } 72 }
78 iDepth++; 73 iDepth++;
74
75 sCurProfile = sProfile;
79} 76}
80 77
81void ViewDefault::processTarget( const Bu::FString &sProfile, 78void ViewDefault::drawTargetHdr( const Bu::FString &sProfile,
82 const Target &rTarget ) 79 const Target &rTarget )
83{ 80{
84 if( bDispedTrg == false ) 81 if( bDispedTrg == false )
85 { 82 {
86 bDispedTrg = true; 83 bDispedTrg = true;
84 if( bFirst == false )
85 {
86 sio << sio.nl;
87 }
88 bFirst = false;
87 sio << C_BR_WHITE << " --- " << C_BR_CYAN << sProfile << " " 89 sio << C_BR_WHITE << " --- " << C_BR_CYAN << sProfile << " "
88 << rTarget.getOutputList().first() << C_BR_WHITE << " --- " 90 << rTarget.getOutputList().first() << C_BR_WHITE << " --- "
89 << C_RESET << sio.nl; 91 << C_RESET << sio.nl;
90 } 92 }
93}
94
95void ViewDefault::processTarget( const Bu::FString &sProfile,
96 const Target &rTarget )
97{
98 drawTargetHdr( sProfile, rTarget );
91 iCurrent++; 99 iCurrent++;
92 100
93 int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100); 101 int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100);
@@ -106,6 +114,8 @@ void ViewDefault::endTarget()
106 114
107void ViewDefault::buildRequires( const Target &rTarget ) 115void ViewDefault::buildRequires( const Target &rTarget )
108{ 116{
117 drawTargetHdr( sCurProfile, rTarget );
118
109 int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100); 119 int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100);
110 sio << C_BR_WHITE << "[" << C_BR_GREEN << Fmt(3) << iPct 120 sio << C_BR_WHITE << "[" << C_BR_GREEN << Fmt(3) << iPct
111 << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA 121 << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA
diff --git a/src/viewdefault.h b/src/viewdefault.h
index b8d65e9..263b9d7 100644
--- a/src/viewdefault.h
+++ b/src/viewdefault.h
@@ -32,6 +32,8 @@ public:
32 virtual void sysError( const Bu::FString &sMsg ); 32 virtual void sysError( const Bu::FString &sMsg );
33 virtual void sysWarning( const Bu::FString &sMsg ); 33 virtual void sysWarning( const Bu::FString &sMsg );
34 34
35 void drawTargetHdr( const Bu::FString &sProfile, const Target &rTarget );
36
35private: 37private:
36 bool bFirst; 38 bool bFirst;
37 bool bDisped; 39 bool bDisped;
@@ -39,6 +41,7 @@ private:
39 int iDepth; 41 int iDepth;
40 int iTotal; 42 int iTotal;
41 int iCurrent; 43 int iCurrent;
44 Bu::FString sCurProfile;
42}; 45};
43 46
44#endif 47#endif