diff options
Diffstat (limited to '')
-rw-r--r-- | src/action.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 ) | |||
23 | lCommand.push_back( pCmd ); | 23 | lCommand.push_back( pCmd ); |
24 | } | 24 | } |
25 | 25 | ||
26 | void Action::add( int nType, const char *sCmd ) | ||
27 | { | ||
28 | lRegExCommand.push_back( std::pair<int,std::string>( nType, sCmd ) ); | ||
29 | } | ||
30 | |||
26 | void Action::debug() | 31 | void Action::debug() |
27 | { | 32 | { |
28 | if( bDefault ) | 33 | if( bDefault ) |
@@ -39,6 +44,16 @@ void Action::debug() | |||
39 | 44 | ||
40 | void Action::execute( Builder &bld ) | 45 | void Action::execute( Builder &bld ) |
41 | { | 46 | { |
47 | for( std::list<std::pair<int,std::string> >::iterator i = | ||
48 | lRegExCommand.begin(); i != lRegExCommand.end(); i++ ) | ||
49 | { | ||
50 | std::list<std::string> lTmp = bld.findTargets( (*i).second.c_str() ); | ||
51 | for( std::list<std::string>::iterator j = lTmp.begin(); | ||
52 | j != lTmp.end(); j++ ) | ||
53 | { | ||
54 | add( new Command( (Command::CmdType)(*i).first, (*j).c_str() ) ); | ||
55 | } | ||
56 | } | ||
42 | for( std::list<Command *>::iterator i = lCommand.begin(); | 57 | for( std::list<Command *>::iterator i = lCommand.begin(); |
43 | i != lCommand.end(); i++ ) | 58 | i != lCommand.end(); i++ ) |
44 | { | 59 | { |