zypp::str::regex Class Reference
[Regular expressions]

#include <Regex.h>

List of all members.

Public Types

enum  RegFlags {
  optimize = 0, match_extra = 0, icase = REG_ICASE, nosubs = REG_NOSUB,
  match_extended = REG_EXTENDED, normal = 1<<16
}

Public Member Functions

 regex ()
 regex (const std::string &s, int flags=match_extended)
 ~regex () throw ()
 regex (const regex &rhs)
regexoperator= (const regex &rhs)
std::string asString () const
 string representation of the regular expression
regex_t * get ()
 Expert backdoor.

Private Member Functions

void assign (const std::string &s, int flags=match_extended)

Private Attributes

std::string m_str
int m_flags
regex_t m_preg
bool m_valid

Friends

class smatch
bool regex_match (const char *s, str::smatch &matches, const regex &regex)
bool regex_match (const char *s, const regex &regex)


Detailed Description

See also:
sat::AttrMatcher string matcher supporing regex, globing, etc.

Definition at line 59 of file Regex.h.


Member Enumeration Documentation

Enumerator:
optimize 
match_extra 
icase 
nosubs 
match_extended 
normal 

Definition at line 62 of file Regex.h.


Constructor & Destructor Documentation

regex::regex (  ) 

Definition at line 22 of file Regex.cc.

regex::regex ( const std::string &  s,
int  flags = match_extended 
)

Definition at line 48 of file Regex.cc.

References assign().

regex::~regex (  )  throw ()

Definition at line 53 of file Regex.cc.

References m_preg, and m_valid.

zypp::str::regex::regex ( const regex rhs  )  [inline]

Definition at line 75 of file Regex.h.

References assign().


Member Function Documentation

regex& zypp::str::regex::operator= ( const regex rhs  )  [inline]

Definition at line 78 of file Regex.h.

References assign(), m_flags, and m_str.

std::string zypp::str::regex::asString (  )  const [inline]

string representation of the regular expression

Definition at line 84 of file Regex.h.

References m_str.

regex_t* zypp::str::regex::get (  )  [inline]

Expert backdoor.

Returns pointer to the compiled regex for direct use in regexec()

Definition at line 89 of file Regex.h.

References m_preg.

void regex::assign ( const std::string &  s,
int  flags = match_extended 
) [private]

Definition at line 29 of file Regex.cc.

References m_flags, m_preg, m_str, m_valid, match_extended, normal, and ZYPP_THROW.

Referenced by operator=(), and regex().


Friends And Related Function Documentation

friend class smatch [friend]

Definition at line 96 of file Regex.h.

bool regex_match ( const char *  s,
str::smatch matches,
const regex regex 
) [friend]

bool regex_match ( const char *  s,
const regex regex 
) [friend]


Member Data Documentation

std::string zypp::str::regex::m_str [private]

Definition at line 99 of file Regex.h.

Referenced by assign(), asString(), and operator=().

Definition at line 100 of file Regex.h.

Referenced by assign(), and operator=().

regex_t zypp::str::regex::m_preg [private]

Definition at line 101 of file Regex.h.

Referenced by assign(), get(), zypp::str::regex_match(), and ~regex().

bool zypp::str::regex::m_valid [private]

Definition at line 102 of file Regex.h.

Referenced by assign(), zypp::str::regex_match(), and ~regex().


The documentation for this class was generated from the following files:

doxygen