renamed MatchSet to Matches
This commit is contained in:
parent
b100c035a0
commit
55b1e1494a
@ -140,12 +140,12 @@ void Token::process()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchSet::MatchSet(pcre * re, const char * data, int * ovector, int ovec_size)
|
Matches::Matches(pcre * re, const char * data, int * ovector, int ovec_size)
|
||||||
: m_re(re), m_data(data), m_ovector(ovector), m_ovec_size(ovec_size)
|
: m_re(re), m_data(data), m_ovector(ovector), m_ovec_size(ovec_size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string MatchSet::operator[](int index)
|
std::string Matches::operator[](int index)
|
||||||
{
|
{
|
||||||
if (0 <= index && index < (m_ovec_size / 3))
|
if (0 <= index && index < (m_ovec_size / 3))
|
||||||
{
|
{
|
||||||
@ -159,7 +159,7 @@ std::string MatchSet::operator[](int index)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string MatchSet::operator[](const std::string & index)
|
std::string Matches::operator[](const std::string & index)
|
||||||
{
|
{
|
||||||
int idx = pcre_get_stringnumber(m_re, index.c_str());
|
int idx = pcre_get_stringnumber(m_re, index.c_str());
|
||||||
if (idx > 0 && idx < (m_ovec_size / 3))
|
if (idx > 0 && idx < (m_ovec_size / 3))
|
||||||
|
@ -123,10 +123,10 @@ class I_CLASSNAME
|
|||||||
const char * m_errstr;
|
const char * m_errstr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MatchSet
|
class Matches
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MatchSet(pcre * re, const char * data, int * ovector, int ovec_size);
|
Matches(pcre * re, const char * data, int * ovector, int ovec_size);
|
||||||
std::string operator[](int index);
|
std::string operator[](int index);
|
||||||
std::string operator[](const std::string & index);
|
std::string operator[](const std::string & index);
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class MatchSet
|
|||||||
int * m_ovector;
|
int * m_ovector;
|
||||||
int m_ovec_size;
|
int m_ovec_size;
|
||||||
};
|
};
|
||||||
typedef refptr<MatchSet> MatchSetRef;
|
typedef refptr<Matches> MatchesRef;
|
||||||
|
|
||||||
class Node
|
class Node
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user