ARC SDK
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
svn-area
arc1-clean
src
hed
libs
common
ArcRegex.h
1
// -*- indent-tabs-mode: nil -*-
2
3
#ifndef __ARC_REGEX_H__
4
#define __ARC_REGEX_H__
5
6
#include <list>
7
#include <string>
8
#include <regex.h>
9
10
namespace
Arc {
11
13
16
class
RegularExpression
{
17
public
:
18
20
RegularExpression
() : status(-1) {}
21
23
RegularExpression
(std::string pattern);
24
26
RegularExpression
(
const
RegularExpression
& regex);
27
29
~RegularExpression
();
30
32
RegularExpression
&
operator=
(
const
RegularExpression
& regex);
33
35
bool
isOk
();
36
38
bool
hasPattern
(std::string str);
39
41
bool
match
(
const
std::string& str)
const
;
42
44
50
bool
match
(
const
std::string& str, std::list<std::string>& unmatched, std::list<std::string>& matched)
const
;
51
53
std::string
getPattern
()
const
;
54
55
private
:
56
std::string pattern;
57
regex_t preg;
58
int
status;
59
};
60
}
61
62
#endif
Generated on Fri Jul 5 2013 14:37:45 for ARC SDK by
1.8.3.1-20130209