Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Pairs Class Reference

class handling text that should be ignored within a string. More...

#include <pairs.h>

List of all members.

Public Methods

 Pairs (std::string line, std::string::size_type startpos=0)
 extract all pairs found in line. More...

void add (std::string::size_type first, std::string::size_type second)
 add a pair to the list. More...

void clear ()
 clears the list. More...

bool is_in_pair (std::string::size_type pos)
 checks if the position is between two pairs. More...

void extract (std::string line, std::string::size_type startpos=0)
 extracts all pairs by itsself. More...


Private Types

typedef std::list< PairPair_list
typedef std::list< Pair
>::iterator 
Pair_list_it

Private Methods

bool is_in_pair (std::string::size_type pos, std::string::size_type pair1, std::string::size_type pair2) const
 checks if the position is between the two pairs. More...


Private Attributes

Pair_list pairs


Detailed Description

class handling text that should be ignored within a string.


Member Typedef Documentation

typedef std::list<Pair> Pairs::Pair_list [private]
 

typedef std::list<Pair>::iterator Pairs::Pair_list_it [private]
 


Constructor & Destructor Documentation

Pairs::Pairs std::string    line,
std::string::size_type    startpos = 0
 

extract all pairs found in line.


Member Function Documentation

void Pairs::add std::string::size_type    first,
std::string::size_type    second
 

add a pair to the list.

void Pairs::clear  
 

clears the list.

void Pairs::extract std::string    line,
std::string::size_type    startpos = 0
 

extracts all pairs by itsself.

bool Pairs::is_in_pair std::string::size_type    pos,
std::string::size_type    pair1,
std::string::size_type    pair2
const [private]
 

checks if the position is between the two pairs.

returns false if pos or one of the pairs == std::string::npos

Parameters:
pos  the current position

bool Pairs::is_in_pair std::string::size_type    pos
 

checks if the position is between two pairs.

returns false if pos == std::string::npos


Member Data Documentation

Pair_list Pairs::pairs [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Nov 20 02:19:54 2001 for Leo<HTML> by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001