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

Grep Class Reference

Grep : perform a grep like operation onto a cmt_string. More...

Inheritance diagram for Grep:

[legend]
Collaboration diagram for Grep:

[legend]
List of all members.

Public Methods

void? begin ()
void? filter (const cmt_string &line)
const cmt_string &? result () const

Private Attributes

cmt_string? m_result

Detailed Description

Grep : perform a grep like operation onto a cmt_string.

o All lines of the input string are collected when they contain the specified pattern. o The input string and the selector pattern are specified in the constructor:

Grep (input_string, pattern)

o All selected lines are accumulated (appended) into the internal variable m_result . 'space' is the separator.

o The accumulator is retrieved by the result () method.

Definition at line 31 of file cmt_cvs.cxx.


Member Function Documentation

void Grep::begin (? ? )? [virtual]
?

Reimplemented from Awk.

Definition at line 1926 of file cmt_cvs.cxx.

References m_result.

01927 {
01928   m_result = "";
01929 }

void Grep::filter (? const cmt_string &? ? line )? [virtual]
?

Reimplemented from Awk.

Definition at line 1931 of file cmt_cvs.cxx.

References m_result.

01932 {
01933     //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Grep::filter" << endl;
01934 
01935   if (m_result != "") m_result += " ";
01936   m_result += line;
01937 }

const cmt_string & Grep::result (? ? )?
?

Definition at line 1939 of file cmt_cvs.cxx.

Referenced by CvsImplementation::show_cvs_infos().

01940 {
01941   return (m_result);
01942 }

Member Data Documentation

cmt_string Grep::m_result [private]
?

Definition at line 40 of file cmt_cvs.cxx.

Referenced by begin(), and filter().


The documentation for this class was generated from the following file:
Generated on Wed Sep 1 11:00:22 2004 for CMT by 1.2.18