Inheritance diagram for CmtMountFilterParser:
Public Methods |
|
? | 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 |
This has a meaning when the specified path already contains an absolute path.
Definition at line 671 of file cmt_parser.cxx.
|
? |
Definition at line 675 of file cmt_parser.cxx. References reset(). 00676 { 00677 reset (); 00678 } |
|
? |
Reimplemented from Awk. Definition at line 702 of file cmt_parser.cxx. References cmt_string::find(), m_current_dir, m_done, m_prefix, cmt_string::npos, cmt_string::replace(), cmt_vector< cmt_string >::size(), CmtSystem::split(), and Awk::stop(). 00703 { 00704 //cout << "line=" << line << endl; 00705 00706 if (m_done) 00707 { 00708 stop (); 00709 return; 00710 } 00711 00712 CmtSystem::cmt_string_vector words; 00713 00714 CmtSystem::split (line, " \t", words); 00715 00716 int requested = 2; 00717 00718 if (m_prefix != "") 00719 { 00720 requested++; 00721 } 00722 00723 if (words.size () < requested) return; 00724 00725 int n = 0; 00726 00727 if (m_prefix != "") 00728 { 00729 if (words[n] != m_prefix) return; 00730 n++; 00731 } 00732 00733 cmt_string& path_name = words[n]; 00734 cmt_string& replacement = words[n+1]; 00735 00736 if (m_current_dir.find (path_name) != cmt_string::npos) 00737 { 00738 m_current_dir.replace (path_name, replacement); 00739 m_done = true; 00740 stop (); 00741 } 00742 } |
|
? |
Definition at line 692 of file cmt_parser.cxx. Referenced by Cmt::configure_current_dir(). 00693 {
00694 return (m_current_dir);
00695 }
|
|
? |
Definition at line 687 of file cmt_parser.cxx. 00688 {
00689 return (m_done);
00690 }
|
|
? |
Definition at line 680 of file cmt_parser.cxx. References m_current_dir, m_done, m_prefix, and CmtSystem::pwd(). Referenced by CmtMountFilterParser(). 00681 { 00682 m_current_dir = CmtSystem::pwd (); 00683 m_done = false; 00684 m_prefix = ""; 00685 } |
|
? |
Definition at line 697 of file cmt_parser.cxx. References m_prefix. Referenced by Cmt::configure_current_dir(). 00698 { 00699 m_prefix = prefix; 00700 } |
|
? |
Definition at line 747 of file cmt_parser.cxx. Referenced by filter(), and reset(). |
|
? |
Definition at line 745 of file cmt_parser.cxx. Referenced by filter(), and reset(). |
|
? |
Definition at line 746 of file cmt_parser.cxx. Referenced by filter(), reset(), and set_prefix(). |