|
smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
|
Wrapper class for regex(3). Supports copy & assignment and is compatible with STL containers. More...
#include <utility.h>

Public Member Functions | |
| regular_expression () | |
| regular_expression (const char *pattern, int flags, bool throw_on_error=true) | |
| ~regular_expression () | |
| regular_expression (const regular_expression &x) | |
| regular_expression & | operator= (const regular_expression &x) |
| bool | compile (const char *pattern, int flags) |
| Set and compile new pattern, return false on error. | |
| const char * | get_pattern () const |
| const char * | get_errmsg () const |
| Get error message from last compile(). | |
| bool | empty () const |
| bool | match (const char *str, int flags=0) const |
| Return true if substring matches pattern. | |
| bool | full_match (const char *str, int flags=0) const |
| Return true if full string matches pattern. | |
| bool | execute (const char *str, unsigned nmatch, regmatch_t *pmatch, int flags=0) const |
| Return true if substring matches pattern, fill regmatch_t array. | |
Private Member Functions | |
| void | free_buf () |
| void | copy (const regular_expression &x) |
| bool | compile () |
Private Attributes | |
| std::string | m_pattern |
| int | m_flags |
| regex_t | m_regex_buf |
| std::string | m_errmsg |
Wrapper class for regex(3). Supports copy & assignment and is compatible with STL containers.
| regular_expression::regular_expression | ( | ) |
Definition at line 392 of file utility.cpp.
| regular_expression::regular_expression | ( | const char * | pattern, |
| int | flags, | ||
| bool | throw_on_error = true |
||
| ) |
Definition at line 398 of file utility.cpp.
| regular_expression::~regular_expression | ( | ) |
Definition at line 408 of file utility.cpp.
| regular_expression::regular_expression | ( | const regular_expression & | x | ) |
Definition at line 413 of file utility.cpp.
| bool regular_expression::compile | ( | const char * | pattern, |
| int | flags | ||
| ) |
Set and compile new pattern, return false on error.
Definition at line 449 of file utility.cpp.
| bool regular_expression::compile | ( | ) | [private] |
Definition at line 457 of file utility.cpp.
| void regular_expression::copy | ( | const regular_expression & | x | ) | [private] |
Definition at line 434 of file utility.cpp.
| bool regular_expression::execute | ( | const char * | str, |
| unsigned | nmatch, | ||
| regmatch_t * | pmatch, | ||
| int | flags = 0 |
||
| ) | const [inline] |
| void regular_expression::free_buf | ( | ) | [private] |
Definition at line 426 of file utility.cpp.
| bool regular_expression::full_match | ( | const char * | str, |
| int | flags = 0 |
||
| ) | const [inline] |
| const char* regular_expression::get_errmsg | ( | ) | const [inline] |
| const char* regular_expression::get_pattern | ( | ) | const [inline] |
| bool regular_expression::match | ( | const char * | str, |
| int | flags = 0 |
||
| ) | const [inline] |
| regular_expression & regular_expression::operator= | ( | const regular_expression & | x | ) |
Definition at line 419 of file utility.cpp.
std::string regular_expression::m_errmsg [private] |
int regular_expression::m_flags [private] |
std::string regular_expression::m_pattern [private] |
regex_t regular_expression::m_regex_buf [private] |
1.7.4