From 71c3c523aacb0f6986d50f4a7a2e5d604728a4c4 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 6 Aug 2006 19:42:22 +0000 Subject: A load of updates, most of these made me realize that I probably could do this whole thing a lot better. We'll see how that works out later, once I figure out how to do it better. --- src/action.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/action.cpp') diff --git a/src/action.cpp b/src/action.cpp index 8907816..51868eb 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -23,6 +23,11 @@ void Action::add( Command *pCmd ) lCommand.push_back( pCmd ); } +void Action::add( int nType, const char *sCmd ) +{ + lRegExCommand.push_back( std::pair( nType, sCmd ) ); +} + void Action::debug() { if( bDefault ) @@ -39,6 +44,16 @@ void Action::debug() void Action::execute( Builder &bld ) { + for( std::list >::iterator i = + lRegExCommand.begin(); i != lRegExCommand.end(); i++ ) + { + std::list lTmp = bld.findTargets( (*i).second.c_str() ); + for( std::list::iterator j = lTmp.begin(); + j != lTmp.end(); j++ ) + { + add( new Command( (Command::CmdType)(*i).first, (*j).c_str() ) ); + } + } for( std::list::iterator i = lCommand.begin(); i != lCommand.end(); i++ ) { -- cgit v1.2.3