From 9d9f75e6da9885e256097a2eabd0ccb951a40651 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 12 Sep 2006 18:19:05 +0000 Subject: Fixed the viewers, and some other good goo. --- src/build.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/build.cpp') diff --git a/src/build.cpp b/src/build.cpp index 13a2aee..88d1207 100644 --- a/src/build.cpp +++ b/src/build.cpp @@ -10,7 +10,6 @@ Build::Build() : pView( NULL ), bCacheUpdated( false ) { - pView = ViewerFactory::getInstance().instantiate("plain"); } Build::~Build() @@ -29,6 +28,11 @@ Build::~Build() } } +void Build::setView( const std::string &sView ) +{ + pView = ViewerFactory::getInstance().instantiate( sView.c_str() ); +} + void Build::setCache( const std::string &sFileName ) { sCacheName = sFileName; @@ -70,6 +74,8 @@ void Build::execAction( const std::string &sWhat ) Action *pAct = mAction[sWhat]; + pView->beginAction( sWhat, pAct->size() ); + for( pAct->begin(); !pAct->isEnded(); pAct->next() ) { if( mTarget.find( pAct->getWhat() ) == mTarget.end() ) @@ -79,7 +85,7 @@ void Build::execAction( const std::string &sWhat ) sWhat.c_str() ); Target *pTarget = mTarget[pAct->getWhat()]; - pView->beginCommand( pAct->getAct(), pAct->getWhat(), 0 ); + pView->beginCommand( pAct->getAct(), pAct->getWhat() ); switch( pAct->getAct() ) { case Action::actCheck: @@ -93,6 +99,8 @@ void Build::execAction( const std::string &sWhat ) pView->endCommand(); } + pView->endAction(); + return; } -- cgit v1.2.3