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

cmt_char_node Class Reference

Inheritance diagram for cmt_char_node

Inheritance graph
[legend]
Collaboration diagram for cmt_char_node:

Collaboration graph
[legend]
List of all members.

Public Methods

 cmt_char_node (char c)
const cmt_regexp::iterator match (const cmt_string& text, int pos) const
bool is_char () const
 operator char ()

Private Attributes

char _c

Constructor & Destructor Documentation

cmt_char_node::cmt_char_node ( char c )
 

Definition at line 261 of file cmt_regexp.cxx.

00262 {
00263   _c = c;
00264 }


Member Function Documentation

bool cmt_char_node::is_char ( ) const [virtual]
 

Reimplemented from cmt_node.

Definition at line 284 of file cmt_regexp.cxx.

00285 {
00286   return (true);
00287 }

const cmt_regexp::iterator cmt_char_node::match ( const cmt_string & text,
int pos ) const [virtual]
 

Reimplemented from cmt_node.

Definition at line 266 of file cmt_regexp.cxx.

00268 {
00269   if ((pos < 0) || (pos > text.size ())) 
00270     {
00271       return (cmt_regexp::iterator::null ());
00272     }
00273 
00274   char c = text[pos];
00275 
00276   if (c == _c)
00277     {
00278       return (cmt_regexp::iterator (pos, 1));
00279     }
00280   
00281   return (cmt_regexp::iterator::null ());
00282 }

cmt_char_node::operator char ( )
 

Definition at line 289 of file cmt_regexp.cxx.

00290 {
00291   return (_c);
00292 }


Member Data Documentation

char cmt_char_node::_c [private]
 

Definition at line 44 of file cmt_regexp.cxx.


The documentation for this class was generated from the following file:
Generated at Thu Apr 11 16:50:32 2002 for CMT by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000