Inheritance diagram for Cut:
Public Member Functions | |
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 '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 57 of file cmt_cvs.cxx.
|
Definition at line 2222 of file cmt_cvs.cxx. References m_field.
02223 { 02224 m_field = field; 02225 } |
|
Reimplemented from Awk. Definition at line 2227 of file cmt_cvs.cxx. References m_result.
02228 { 02229 //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Cut::begin" << endl; 02230 m_result = ""; 02231 } |
|
Reimplemented from Awk. Definition at line 2233 of file cmt_cvs.cxx. References CmtSystem::cmt_string_vector, m_field, m_result, cmt_vector< T >::size(), and CmtSystem::split().
02234 { 02235 //if (CmtSystem::testenv ("CMTTESTAWK")) cout << "Cut::filter" << endl; 02236 02237 static CmtSystem::cmt_string_vector words; 02238 02239 CmtSystem::split (line, " \t", words); 02240 02241 if (words.size () <= m_field) return; 02242 02243 if (m_result != "") m_result += " "; 02244 m_result += words[m_field]; 02245 } |
|
Definition at line 2247 of file cmt_cvs.cxx. References m_result. Referenced by CvsImplementation::do_checkout_phase1().
02248 { 02249 return (m_result); 02250 } |
|
Definition at line 67 of file cmt_cvs.cxx. |
|
Definition at line 66 of file cmt_cvs.cxx. |