- Timestamp:
- Oct 24, 2006, 3:03:22 PM (18 years ago)
- Location:
- CMT/HEAD/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_cmtpath_pattern.cxx
r11 r283 15 15 //---------------------------------------------------------- 16 16 17 void CmtPathPattern::action (const CmtSystem::cmt_string_vector& words, Use* use )17 void CmtPathPattern::action (const CmtSystem::cmt_string_vector& words, Use* use, bool revert) 18 18 { 19 19 if (words.size () < 1) return; … … 30 30 // 31 31 32 add (words, use );32 add (words, use, revert); 33 33 34 34 if (Cmt::get_debug ()) … … 38 38 } 39 39 40 void CmtPathPattern::add (const CmtSystem::cmt_string_vector& words, Use* use )40 void CmtPathPattern::add (const CmtSystem::cmt_string_vector& words, Use* use, bool revert) 41 41 { 42 42 static CmtPathPatternVector& CmtPathPatterns = patterns (); … … 47 47 48 48 p.use = use; 49 p.revert = revert; 49 50 50 51 int first_word = 1; … … 252 253 CmtPathPatternProjectAction pa (*this, current_use); 253 254 254 Project::reverse_broadcast (pa); 255 if (revert) 256 { 257 Project::broadcast (pa); 258 } 259 else 260 { 261 Project::reverse_broadcast (pa); 262 } 255 263 } 256 264 } -
CMT/HEAD/source/cmt_cmtpath_pattern.h
r11 r283 16 16 typedef cmt_vector<CmtPathPattern*> CmtPathPatternPtrVector; 17 17 18 static void action (const CmtSystem::cmt_string_vector& words, Use* use );18 static void action (const CmtSystem::cmt_string_vector& words, Use* use, bool revert = false); 19 19 20 static void add (const CmtSystem::cmt_string_vector& words, Use* use );20 static void add (const CmtSystem::cmt_string_vector& words, Use* use, bool revert); 21 21 22 22 static int pattern_number (); … … 38 38 cmt_string line; 39 39 Use* use; 40 bool revert; 40 41 }; 41 42 -
CMT/HEAD/source/cmt_parser.cxx
r282 r283 6991 6991 buffer += "\" "; 6992 6992 } 6993 6993 6994 6994 for (int include_number = 0; 6995 6995 include_number < use.includes.size (); -
CMT/HEAD/source/cmt_syntax.cxx
r280 r283 289 289 {} 290 290 291 }; 292 293 class KwdCmtPathPatternRevert : public Kwd 294 { 295 public: 296 void action (const CmtSystem::cmt_string_vector& words, 297 Use* use, 298 const cmt_string& /*file_name*/, 299 int /*line_number*/) 300 { 301 CmtPathPattern::action (words, use, true); 302 } 303 304 void action (const CmtSystem::cmt_string_vector& words, 305 Project* project, 306 const cmt_string& file_name, 307 int line_number) 308 {} 291 309 }; 292 310 … … 1375 1393 m_keywords.add ("cleanup_script", new KwdCleanupScript ()); 1376 1394 m_keywords.add ("cmtpath_pattern", new KwdCmtPathPattern ()); 1395 m_keywords.add ("cmtpath_pattern_revert", new KwdCmtPathPatternRevert ()); 1377 1396 m_keywords.add ("document", new KwdDocument ()); 1378 1397 m_keywords.add ("end_private", new KwdEndPrivate ());
Note: See TracChangeset
for help on using the changeset viewer.