Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

lfc::RegexpMatch Class Reference

Inheritance diagram for lfc::RegexpMatch::

lfc::Object List of all members.

Public Methods

 RegexpMatch () throw ()
 \brief Constructor. More...

string getMatch () const throw ()
 \brief Method access to the public match member. More...

long getOffset () const throw ()
RegexpMatch * getSavedSubmatch (unsigned int index) const
int getSavedSubmatchCount () const throw ()
 \brief Returns a count of the saved submatches. More...

bool getEOLAnchorMatch () const throw ()
 \brief Indicates whether a newline was eaten up by a '$' match. More...


Public Attributes

string match
 \brief The string that matched. More...

long offset
 \brief The offset from the original position. More...

bool eolAnchorMatch
 \brief Indicates whether a newline was eaten up by a '$' anchor. More...

std::vector< RegexpMatch *> savedMatches
 \brief Saved submatches of this match. More...


Detailed Description

A class which represents the data about a match by a regular expression. This is basically a struct which contains offset information and the string that matched.

The members have remained public


Constructor & Destructor Documentation

lfc::RegexpMatch::RegexpMatch   throw () [inline]
 

\brief Constructor.


Member Function Documentation

string lfc::RegexpMatch::getMatch   const throw () [inline]
 

\brief Method access to the public match member.

long lfc::RegexpMatch::getOffset   const throw () [inline]
 

Gets the offset for this match. The offset value indicates one of two things: If this is a top-level match (i.e., not a saved match), the offset indicates how many characters were eaten up before this match began. If this is a saved match, it indicates how many characters preceded this in the match string of the parent.

RegexpMatch* lfc::RegexpMatch::getSavedSubmatch unsigned int    index const [inline]
 

Gets the given saved submatch. Only the top-level match (the match returned to the user) will have any saved submatches. The saved submatches are indexed by the order in which the left parens which starts their group appears. That is, the pattern '(out(inner)er)' will have as its first saved submatch the string 'outinnerer' and as its second 'inner'. The reason for this is so that backreferences word correctly, once they are implemented.

Exceptions:
RegexpMatchException  If no such saved submatch exists.

int lfc::RegexpMatch::getSavedSubmatchCount   const throw () [inline]
 

\brief Returns a count of the saved submatches.

bool lfc::RegexpMatch::getEOLAnchorMatch   const throw () [inline]
 

\brief Indicates whether a newline was eaten up by a '$' match.


Member Data Documentation

string lfc::RegexpMatch::match
 

\brief The string that matched.

long lfc::RegexpMatch::offset
 

\brief The offset from the original position.

bool lfc::RegexpMatch::eolAnchorMatch
 

\brief Indicates whether a newline was eaten up by a '$' anchor.

std::vector<RegexpMatch *> lfc::RegexpMatch::savedMatches
 

\brief Saved submatches of this match.


The documentation for this class was generated from the following file:
Generated on Fri Jan 25 03:13:32 2002 for LFC2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001