From a2f15a6447ed9feacc550111d2641a7eda7f6ef3 Mon Sep 17 00:00:00 2001 From: leongor Date: Sun, 4 Jan 2015 19:26:17 +0200 Subject: [PATCH] Inlined all the header functions. --- .../RegexMatch/RegexMatch.xml | 2 +- com.ibm.streamsx.regex/impl/include/Regex.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/com.ibm.streamsx.regex/com.ibm.streamsx.regex.re2/RegexMatch/RegexMatch.xml b/com.ibm.streamsx.regex/com.ibm.streamsx.regex.re2/RegexMatch/RegexMatch.xml index 837c7e3..f2182a6 100644 --- a/com.ibm.streamsx.regex/com.ibm.streamsx.regex.re2/RegexMatch/RegexMatch.xml +++ b/com.ibm.streamsx.regex/com.ibm.streamsx.regex.re2/RegexMatch/RegexMatch.xml @@ -95,7 +95,7 @@ RegexMatch operator has three custom output functions: - The RegexMatch operator is configurable with one output port. The output port is mutating and their punctuation mode is Preserving. + The RegexMatch operator is configurable with one output port. The output port is mutating and its punctuation mode is Preserving. Expression true true diff --git a/com.ibm.streamsx.regex/impl/include/Regex.h b/com.ibm.streamsx.regex/impl/include/Regex.h index 0e71c16..de83e67 100644 --- a/com.ibm.streamsx.regex/impl/include/Regex.h +++ b/com.ibm.streamsx.regex/impl/include/Regex.h @@ -20,27 +20,27 @@ using namespace std; namespace regex { - RE2::Options& getRE2Options(int maxmem){ + inline RE2::Options& getRE2Options(int maxmem){ static RE2::Options options; options.set_log_errors(false); options.set_max_mem(maxmem); return options; } - RE2& getRE2(const string & pattern, int maxmem){ + inline RE2& getRE2(const string & pattern, int maxmem){ static RE2 regex(pattern, getRE2Options(maxmem)); return regex; } - bool regexFullMatch(const string & str, const string & pattern="", int maxmem=1000000){ + inline bool regexFullMatch(const string & str, const string & pattern="", int maxmem=1000000){ return RE2::FullMatch(str, getRE2(pattern, maxmem)) == 1; } - bool regexPartialMatch(const string & str, const string & pattern="", int maxmem=1000000){ + inline bool regexPartialMatch(const string & str, const string & pattern="", int maxmem=1000000){ return RE2::PartialMatch(str, getRE2(pattern, maxmem)) == 1; } - bool regexSimpleMatch(const string & str, const string & pattern){ + inline bool regexSimpleMatch(const string & str, const string & pattern){ return RE2::PartialMatch(str, pattern) == 1; } }