oasys::Regex Class Reference

#include <Regex.h>

Inheritance diagram for oasys::Regex:

oasys::Regsub

List of all members.


Detailed Description

Definition at line 27 of file Regex.h.


Public Member Functions

 Regex (const char *regex, int cflags=0)
virtual ~Regex ()
int match (const char *str, int flags=0)
bool valid ()
int num_matches ()
const regmatch_t & get_match (size_t i)
std::string regerror_str (int err)

Static Public Member Functions

static int match (const char *regex, const char *str, int cflags=0, int rflags=0)

Static Public Attributes

static const size_t MATCH_LIMIT = 8

Protected Attributes

int compilation_err_
regex_t regex_
regmatch_t matches_ [MATCH_LIMIT]

Constructor & Destructor Documentation

oasys::Regex::Regex ( const char *  regex,
int  cflags = 0 
)

Definition at line 23 of file Regex.cc.

References compilation_err_, and regex_.

oasys::Regex::~Regex (  )  [virtual]

Definition at line 28 of file Regex.cc.

References compilation_err_, and regex_.


Member Function Documentation

int oasys::Regex::match ( const char *  regex,
const char *  str,
int  cflags = 0,
int  rflags = 0 
) [static]

Definition at line 45 of file Regex.cc.

References match().

Referenced by oasys::SMTPUtils::extract_address(), match(), and oasys::Regsub::subst().

int oasys::Regex::match ( const char *  str,
int  flags = 0 
)

Definition at line 35 of file Regex.cc.

References compilation_err_, MATCH_LIMIT, matches_, and regex_.

bool oasys::Regex::valid (  )  [inline]

Definition at line 39 of file Regex.h.

References compilation_err_.

int oasys::Regex::num_matches (  ) 

Definition at line 52 of file Regex.cc.

References MATCH_LIMIT, and matches_.

Referenced by oasys::SMTPUtils::extract_address(), and oasys::Regsub::subst().

const regmatch_t & oasys::Regex::get_match ( size_t  i  ) 

Definition at line 64 of file Regex.cc.

References ASSERT, MATCH_LIMIT, and matches_.

Referenced by oasys::SMTPUtils::extract_address().

std::string oasys::Regex::regerror_str ( int  err  ) 

Definition at line 71 of file Regex.cc.

References regex_.

Referenced by oasys::SMTPUtils::extract_address().


Member Data Documentation

const size_t oasys::Regex::MATCH_LIMIT = 8 [static]

Definition at line 29 of file Regex.h.

Referenced by get_match(), match(), and num_matches().

int oasys::Regex::compilation_err_ [protected]

Definition at line 47 of file Regex.h.

Referenced by match(), Regex(), valid(), and ~Regex().

regex_t oasys::Regex::regex_ [protected]

Definition at line 49 of file Regex.h.

Referenced by match(), regerror_str(), Regex(), and ~Regex().

regmatch_t oasys::Regex::matches_[MATCH_LIMIT] [protected]

Definition at line 50 of file Regex.h.

Referenced by get_match(), match(), num_matches(), and oasys::Regsub::subst().


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:36:26 2007 for DTN Reference Implementation by  doxygen 1.5.3