Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

Regexp Class Reference

A regexp matching class. More...

#include <yateclass.h>

Inheritance diagram for Regexp:

String GenObject List of all members.

Public Member Functions

 Regexp ()
 Regexp (const char *value, bool extended=false, bool insensitive=false)
 Regexp (const Regexp &value)
virtual ~Regexp ()
Regexpoperator= (const char *value)
bool compile ()
bool matches (const char *value) const
virtual bool matches (const String &value) const
void setFlags (bool extended, bool insensitive)
bool isExtended () const
bool isCaseInsensitive () const

Protected Member Functions

virtual void changed ()

Friends

class String

Detailed Description

A regexp matching class.

A regular expression matching class.


Constructor & Destructor Documentation

Regexp  ) 
 

Creates a new, empty regexp.

Regexp const char *  value,
bool  extended = false,
bool  insensitive = false
 

Creates a new initialized regexp.

Parameters:
value Initial value of the regexp.
extended True to use POSIX Extended Regular Expression syntax
insensitive True to not differentiate case

Regexp const Regexp value  ) 
 

Copy constructor.

Parameters:
value Initial value of the regexp.

virtual ~Regexp  )  [virtual]
 

Destroys the regexp, disposes the memory.


Member Function Documentation

virtual void changed  )  [protected, virtual]
 

Called whenever the value changed (except in constructors) to recompile.

Reimplemented from String.

bool compile  ) 
 

Makes sure the regular expression is compiled

Returns:
True if successfully compiled, false on error

bool isCaseInsensitive  )  const
 

Return the Case Insensitive flag

Returns:
True if not differentiating case

bool isExtended  )  const
 

Return the POSIX Extended syntax flag

Returns:
True if using POSIX Extended Regular Expression syntax

virtual bool matches const String value  )  const [inline, virtual]
 

Checks if the pattern matches a string

Parameters:
value String to check for match
Returns:
True if matches, false otherwise

Reimplemented from String.

bool matches const char *  value  )  const
 

Checks if the pattern matches a given value

Parameters:
value String to check for match
Returns:
True if matches, false otherwise

Regexp& operator= const char *  value  )  [inline]
 

Assignment from char* operator.

Reimplemented from String.

void setFlags bool  extended,
bool  insensitive
 

Change the expression matching flags

Parameters:
extended True to use POSIX Extended Regular Expression syntax
insensitive True to not differentiate case


The documentation for this class was generated from the following file:
Generated on Fri Jul 7 03:11:38 2006 for Yate by  doxygen 1.4.4