Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EmailExtractor Class Reference
[Utilities]

Extract all email addresses from a string. More...

#include <Utils.h>

List of all members.

Public Member Functions

 EmailExtractor (const std::string &what, size_t pos=0)
 Constructor, takes as args the string to be scanned and an offset to start search.
virtual ~EmailExtractor ()
 Destructor.
bool more () const
 indicates if there are more e-mail addresses to be found
std::string next () const
 returns the next e-mail address in the string

Private Member Functions

void setNext () const

Private Attributes

std::string m_what
size_t m_pos
std::string m_next
RegEx m_regex


Detailed Description

Extract all email addresses from a string.

This class recursively find any string that could be a valid e-mail address into a string


Constructor & Destructor Documentation

EmailExtractor::EmailExtractor const std::string &  what,
size_t  pos = 0
 

Constructor, takes as args the string to be scanned and an offset to start search.

Parameters:
what is the string to be scanned for e-mail addresses
pos (defaults to 0) is the offset from where to start the search

EmailExtractor::~EmailExtractor  )  [virtual]
 

Destructor.


Member Function Documentation

bool EmailExtractor::more  )  const
 

indicates if there are more e-mail addresses to be found

Returns:
true if there are more e-mail addresses to be extracted, false otherwise

std::string EmailExtractor::next  )  const
 

returns the next e-mail address in the string

Returns:
returns the next e-mail address in the string

void EmailExtractor::setNext  )  const [private]
 

For internal use only.


Member Data Documentation

std::string EmailExtractor::m_next [mutable, private]
 

For internal use only.

size_t EmailExtractor::m_pos [mutable, private]
 

For internal use only.

RegEx EmailExtractor::m_regex [private]
 

For internal use only.

std::string EmailExtractor::m_what [private]
 

For internal use only.


The documentation for this class was generated from the following files:
Generated on Thu Jun 16 00:13:15 2005 for Netlib for Abuse! by  doxygen 1.4.3