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
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 55 of file cmt_cvs.cxx.
|
? |
Definition at line 1946 of file cmt_cvs.cxx. References m_field. 01947 { 01948 m_field = field; 01949 } |
|
? |
Reimplemented from Awk. Definition at line 1951 of file cmt_cvs.cxx. References m_result. 01952 { 01953 //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Cut::begin" << endl; 01954 m_result = ""; 01955 } |
|
? |
Reimplemented from Awk. Definition at line 1957 of file cmt_cvs.cxx. References m_field, m_result, cmt_vector< cmt_string >::size(), and CmtSystem::split(). 01958 { 01959 //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Cut::filter" << endl; 01960 01961 static CmtSystem::cmt_string_vector words; 01962 01963 CmtSystem::split (line, " \t", words); 01964 01965 if (words.size () <= m_field) return; 01966 01967 if (m_result != "") m_result += " "; 01968 m_result += words[m_field]; 01969 } |
|
? |
Definition at line 1971 of file cmt_cvs.cxx. Referenced by CvsImplementation::do_checkout(). 01972 {
01973 return (m_result);
01974 }
|
|
? |
Definition at line 65 of file cmt_cvs.cxx. |
|
? |
Definition at line 64 of file cmt_cvs.cxx. |