aboutsummaryrefslogtreecommitdiff
path: root/src/functionregexp.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-23 22:09:30 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-23 22:09:30 +0000
commitd2fe7edb2bfea20987a1f69935179fa5fc9f3b37 (patch)
treeee35479f264788bf43b7904f31a528699b53e955 /src/functionregexp.cpp
parent7a7390337e04d0163b97c1da7bdaa198bacaff72 (diff)
downloadbuild-d2fe7edb2bfea20987a1f69935179fa5fc9f3b37.tar.gz
build-d2fe7edb2bfea20987a1f69935179fa5fc9f3b37.tar.bz2
build-d2fe7edb2bfea20987a1f69935179fa5fc9f3b37.tar.xz
build-d2fe7edb2bfea20987a1f69935179fa5fc9f3b37.zip
Really close...functions are doing their stuff, we have inputs, almost have rules.
Diffstat (limited to '')
-rw-r--r--src/functionregexp.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/functionregexp.cpp b/src/functionregexp.cpp
index 462e93c..d1491e6 100644
--- a/src/functionregexp.cpp
+++ b/src/functionregexp.cpp
@@ -1,5 +1,6 @@
1#include "functionregexp.h" 1#include "functionregexp.h"
2#include "plugger.h" 2#include "plugger.h"
3#include "regexp.h"
3 4
4PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 ); 5PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 );
5 6
@@ -13,5 +14,21 @@ FunctionRegexp::~FunctionRegexp()
13 14
14void FunctionRegexp::execute( const StringList &lInput, StringList &lOutput ) 15void FunctionRegexp::execute( const StringList &lInput, StringList &lOutput )
15{ 16{
17 if( lParams.size() == 1 )
18 {
19 RegExp re( lParams.front().c_str() );
20
21 for( StringList::const_iterator i = lInput.begin();
22 i != lInput.end(); i++ )
23 {
24 if( re.execute( (*i).c_str() ) )
25 {
26 lOutput.push_back( *i );
27 }
28 }
29 }
30 else
31 {
32 }
16} 33}
17 34