Inheritance diagram for Cut
Public Methods | |
Cut (int field) | |
void | begin () |
void | filter (const cmt_string& line) |
const cmt_string& | result () const |
Private Attributes | |
cmt_string | m_result |
int | m_field |
o collect the <field>'th field of every line into the m_result internal variable
o the field number is given in the constructor and starts at zero.
o selected fields are accumulated with a space as separator.
Definition at line 48 of file cmt_cvs.cxx.
|
Definition at line 1566 of file cmt_cvs.cxx. 01567 { 01568 m_field = field; 01569 } |
|
Reimplemented from Awk. Definition at line 1571 of file cmt_cvs.cxx. 01572 { 01573 //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Cut::begin" << endl; 01574 m_result = ""; 01575 } |
|
Reimplemented from Awk. Definition at line 1577 of file cmt_cvs.cxx. 01578 { 01579 //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Cut::filter" << endl; 01580 01581 static CmtSystem::cmt_string_vector words; 01582 01583 CmtSystem::split (line, " \t", words); 01584 01585 if (words.size () <= m_field) return; 01586 01587 if (m_result != "") m_result += " "; 01588 m_result += words[m_field]; 01589 } |
|
Definition at line 1591 of file cmt_cvs.cxx. Referenced by CvsImplementation::do_checkout(). 01592 { 01593 return (m_result); 01594 } |
|
Definition at line 58 of file cmt_cvs.cxx. |
|
Definition at line 57 of file cmt_cvs.cxx. |