libzypp  10.5.0
zypp::str::regex Class Reference

Regular expression. More...

#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)

Related Functions

(Note that these are not member functions.)

bool regex_match (const char *s, smatch &matches, const regex &regex)
 Regular expression matching.
bool regex_match (const std::string &s, smatch &matches, const regex &regex)
bool regex_match (const char *s, const regex &regex)
bool regex_match (const std::string &s, const regex &regex)
std::ostream & operator<< (std::ostream &str, const regex &obj)

Detailed Description

Regular expression.

Definition at line 86 of file Regex.h.


Member Enumeration Documentation

Enumerator:
optimize 
Deprecated:
legacy, obsolete
match_extra 
Deprecated:
legacy, obsolete
icase 

Do not differentiate case.

nosubs 

Support for substring addressing of matches is not required.

match_extended 

Use POSIX Extended Regular Expression syntax when interpreting regex.

normal 
Deprecated:
legacy, use match_extended

Definition at line 90 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.

regex::~regex ( ) throw ()

Definition at line 53 of file Regex.cc.

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

Definition at line 103 of file Regex.h.


Member Function Documentation

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

Definition at line 106 of file Regex.h.

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

string representation of the regular expression

Definition at line 112 of file Regex.h.

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

Expert backdoor.

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

Definition at line 117 of file Regex.h.

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

Definition at line 29 of file Regex.cc.


Friends And Related Function Documentation

friend class smatch [friend]

Definition at line 124 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]
std::ostream & operator<< ( std::ostream &  str,
const regex obj 
) [related]

Stream output

Definition at line 134 of file Regex.h.


Member Data Documentation

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

Definition at line 127 of file Regex.h.

Definition at line 128 of file Regex.h.

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

Definition at line 129 of file Regex.h.

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

Definition at line 130 of file Regex.h.


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