#include
Collaboration diagram for CmtPathPattern:
Public Types |
|
typedef cmt_vector |
CmtPathPatternVector |
typedef cmt_vector |
CmtPathPatternPtrVector |
Public Methods |
|
? | CmtPathPattern () |
? | ~CmtPathPattern () |
void? | clear () |
void? | apply () const |
? |
Applies a pattern to all CMTPATH entries. More... |
void? | expand (cmt_string& line, const cmt_string& path) const |
Public Attributes |
|
CmtSystem::cmt_string_vector? | words |
Use*? | use |
Static Public Methods |
|
void? | action (const CmtSystem::cmt_string_vector& words, Use* use) |
void? | add (const CmtSystem::cmt_string_vector& words, Use* use) |
int? | pattern_number () |
? |
Get the number of registered patterns. More... |
CmtPathPattern&? | pattern (int index) |
? |
Get the index'th pattern in the database. More... |
void? | clear_all () |
CmtPathPatternVector&? | patterns () |
void? | apply_all () |
? |
Applies all patterns to all CMTPATH item. More... |
void? | show_all () |
? |
this is the cmt show cmtpath_patterns command It just shows the cmtpath_pattern declarations. More... |
|
? |
Definition at line 10 of file cmt_cmtpath_pattern.h. |
|
? |
Definition at line 9 of file cmt_cmtpath_pattern.h. |
|
? |
Definition at line 141 of file cmt_cmtpath_pattern.cxx. 00142 { 00143 } |
|
? |
Definition at line 146 of file cmt_cmtpath_pattern.cxx. 00148 { 00149 } |
|
? |
Definition at line 12 of file cmt_cmtpath_pattern.cxx. Referenced by KwdCmtPathPattern::action(). 00013 { 00014 if (words.size () < 1) return; 00015 00016 // 00017 // expected syntax is: 00018 // 00019 // cmtpath_pattern any-cmt-statement 00020 // 00021 // where any-cmt-statement may contain the "template" 00022 // 00023 // |
|
? |
Definition at line 34 of file cmt_cmtpath_pattern.cxx. Referenced by action(). 00035 { 00036 static CmtPathPatternVector& CmtPathPatterns = patterns (); 00037 00038 CmtPathPattern& p = CmtPathPatterns.add (); 00039 00040 p.clear (); 00041 00042 p.use = use; 00043 00044 // 00045 // Install the cmt-statement as a vector of words. 00046 // 00047 for (int i = 1; i < words.size (); i++) 00048 { 00049 cmt_string& s = p.words.add (); 00050 s = words[i]; 00051 } 00052 } |
|
? |
Applies a pattern to all CMTPATH entries. Definition at line 161 of file cmt_cmtpath_pattern.cxx. Referenced by apply_all(). 00162 { 00163 if (Cmt::get_debug ()) 00164 { 00165 cout << "CmtPathPattern::apply> cmtpath_pattern defined in " << use->get_package_name () << endl; 00166 } 00167 00168 Use& current_use = Use::current (); 00169 00170 const CmtSystem::cmt_string_vector& paths = Cmt::get_cmt_path (); 00171 const CmtSystem::cmt_string_vector& path_sources = Cmt::get_cmt_path_sources (); 00172 00173 cmt_string buffer; 00174 00175 bool is_constant = true; 00176 00177 int i; 00178 00179 for (i = 0; i < words.size (); i++) 00180 { 00181 const cmt_string& w = words[i]; 00182 00183 int pos = w.find (" |
|
? |
Applies all patterns to all CMTPATH item. Definition at line 98 of file cmt_cmtpath_pattern.cxx. Referenced by CmtInstallAreaMgr::config(), and CmtInstallAreaMgr::setup(). 00099 { 00100 static CmtPathPatternVector& CmtPathPatterns = patterns (); 00101 00102 int i; 00103 00104 for (i = 0; i < CmtPathPatterns.size (); i++) 00105 { 00106 CmtPathPattern& p = CmtPathPatterns[i]; 00107 00108 p.apply (); 00109 } 00110 } |
|
? |
Definition at line 152 of file cmt_cmtpath_pattern.cxx. Referenced by add(), and clear_all(). 00153 { 00154 use = 0; 00155 words.clear (); 00156 } |
|
? |
Definition at line 74 of file cmt_cmtpath_pattern.cxx. Referenced by Database::clear(). 00075 { 00076 static CmtPathPatternVector& CmtPathPatterns = patterns (); 00077 00078 for (int i = 0; i < CmtPathPatterns.size (); i++) 00079 { 00080 CmtPathPattern& p = CmtPathPatterns[i]; 00081 p.clear (); 00082 } 00083 00084 CmtPathPatterns.clear (); 00085 } |
|
? |
Definition at line 215 of file cmt_cmtpath_pattern.cxx. Referenced by apply(). 00216 { 00217 line = ""; 00218 00219 // First re-create the cmt statement as one line. 00220 for (int i = 0; i < words.size (); i++) 00221 { 00222 const cmt_string& w = words[i]; 00223 00224 if (i > 0) line += " "; 00225 00226 if ((w == "\n") | (w == ";")) 00227 { 00228 line += "\n"; 00229 } 00230 else 00231 { 00232 line += "\""; 00233 line += w; 00234 line += "\""; 00235 } 00236 } 00237 00238 if (line != "") 00239 { 00240 // Substitute |
|
? |
Get the index'th pattern in the database. Definition at line 67 of file cmt_cmtpath_pattern.cxx. 00068 { 00069 static CmtPathPatternVector& CmtPathPatterns = patterns (); 00070 00071 return (CmtPathPatterns[index]); 00072 } |
|
? |
Get the number of registered patterns. Definition at line 57 of file cmt_cmtpath_pattern.cxx. 00058 { 00059 static CmtPathPatternVector& CmtPathPatterns = patterns (); 00060 00061 return (CmtPathPatterns.size ()); 00062 } |
|
? |
Definition at line 87 of file cmt_cmtpath_pattern.cxx. Referenced by add(), apply_all(), clear_all(), pattern(), pattern_number(), and show_all(). 00088 { 00089 static Database& db = Database::instance (); 00090 static CmtPathPatternVector& CmtPathPatterns = db.cmtpath_patterns (); 00091 00092 return (CmtPathPatterns); 00093 } |
|
? |
this is the cmt show cmtpath_patterns command It just shows the cmtpath_pattern declarations. Definition at line 116 of file cmt_cmtpath_pattern.cxx. Referenced by Cmt::do_show_cmtpath_patterns(). 00117 { 00118 static CmtPathPatternVector& CmtPathPatterns = patterns (); 00119 00120 int i; 00121 00122 for (i = 0; i < CmtPathPatterns.size (); i++) 00123 { 00124 CmtPathPattern& p = CmtPathPatterns[i]; 00125 00126 cout << "# " << p.use->get_package_name () << " " << p.use->version << " defines "; 00127 cout << "cmtpath_pattern " << " as ["; 00128 00129 for (int wi = 0; wi < p.words.size (); wi++) 00130 { 00131 const cmt_string& s = p.words[wi]; 00132 if (wi > 0) cout << " "; 00133 cout << s; 00134 } 00135 00136 cout << "]" << endl; 00137 } 00138 } |
|
? |
Definition at line 33 of file cmt_cmtpath_pattern.h. |
|
? |
Definition at line 32 of file cmt_cmtpath_pattern.h. |