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

cmt_not_char_list_node Class Reference

Inheritance diagram for cmt_not_char_list_node:

Inheritance graph
[legend]
Collaboration diagram for cmt_not_char_list_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 cmt_not_char_list_node (cmt_string list)
const cmt_regexp::iterator match (const cmt_string &text, int pos) const
void dump () const

Constructor & Destructor Documentation

cmt_not_char_list_node::cmt_not_char_list_node cmt_string  list  ) 
 

Definition at line 479 of file cmt_regexp.cxx.

00479                                                                : 
00480         cmt_char_list_node (list)
00481 {
00482 }


Member Function Documentation

void cmt_not_char_list_node::dump  )  const [virtual]
 

Reimplemented from cmt_char_list_node.

Definition at line 504 of file cmt_regexp.cxx.

References tab().

00505 {
00506   tab (); cout << "not_char_list (" << this << ") list=[" << _list << "] choices=[" << _choices << "]" << endl;
00507 }

const cmt_regexp::iterator cmt_not_char_list_node::match const cmt_string text,
int  pos
const [virtual]
 

Reimplemented from cmt_char_list_node.

Definition at line 484 of file cmt_regexp.cxx.

References cmt_regexp::iterator::null(), and cmt_string::size().

00486 {
00487   if ((pos < 0) || (pos > text.size ())) 
00488     {
00489       return (cmt_regexp::iterator::null ());
00490     }
00491 
00492   char c = text[pos];
00493 
00494   int i;
00495 
00496   for (i = 0; i < _choices.size (); i++)
00497     {
00498       if (c == _choices[i]) return (cmt_regexp::iterator::null ());
00499     }
00500   
00501   return (cmt_regexp::iterator (pos, 1));
00502 }


The documentation for this class was generated from the following file:
Generated on Mon May 2 10:25:30 2005 for CMT by doxygen 1.3.5