Public Member Functions | |
CmtMountFilterParser () | |
void | reset () |
bool | is_done () const |
const cmt_string & | get_current_dir () const |
void | set_prefix (const cmt_string &prefix) |
void | filter (const cmt_string &line) |
Private Attributes | |
bool | m_done |
cmt_string | m_prefix |
cmt_string | m_current_dir |
|
Definition at line 660 of file cmt_parser.cxx. References reset().
00661 { 00662 reset (); 00663 } |
|
Reimplemented from Awk. Definition at line 687 of file cmt_parser.cxx. References CmtSystem::cmt_string_vector, cmt_string::find(), m_current_dir, m_done, m_prefix, cmt_string::replace(), cmt_vector< T >::size(), CmtSystem::split(), and Awk::stop().
00688 { 00689 //cout << "line=" << line << endl; 00690 00691 if (m_done) 00692 { 00693 stop (); 00694 return; 00695 } 00696 00697 CmtSystem::cmt_string_vector words; 00698 00699 CmtSystem::split (line, " \t", words); 00700 00701 int requested = 2; 00702 00703 if (m_prefix != "") 00704 { 00705 requested++; 00706 } 00707 00708 if (words.size () < requested) return; 00709 00710 int n = 0; 00711 00712 if (m_prefix != "") 00713 { 00714 if (words[n] != m_prefix) return; 00715 n++; 00716 } 00717 00718 cmt_string& path_name = words[n]; 00719 cmt_string& replacement = words[n+1]; 00720 00721 if (m_current_dir.find (path_name) != cmt_string::npos) 00722 { 00723 m_current_dir.replace (path_name, replacement); 00724 m_done = true; 00725 stop (); 00726 } 00727 } |
|
Definition at line 677 of file cmt_parser.cxx. References m_current_dir. Referenced by Cmt::configure_current_dir().
00678 { 00679 return (m_current_dir); 00680 } |
|
Definition at line 672 of file cmt_parser.cxx. References m_done.
00673 { 00674 return (m_done); 00675 } |
|
Definition at line 665 of file cmt_parser.cxx. References m_current_dir, m_done, m_prefix, and CmtSystem::pwd(). Referenced by CmtMountFilterParser().
00666 { 00667 m_current_dir = CmtSystem::pwd (); 00668 m_done = false; 00669 m_prefix = ""; 00670 } |
|
Definition at line 682 of file cmt_parser.cxx. References m_prefix. Referenced by Cmt::configure_current_dir().
00683 { 00684 m_prefix = prefix; 00685 } |
|
Definition at line 732 of file cmt_parser.cxx. Referenced by filter(), get_current_dir(), and reset(). |
|
Definition at line 730 of file cmt_parser.cxx. |
|
Definition at line 731 of file cmt_parser.cxx. Referenced by filter(), reset(), and set_prefix(). |