#include
Collaboration diagram for ApplyPattern:
Public Types |
|
typedef cmt_vector |
ApplyPatternVector |
Public Methods |
|
? | ApplyPattern () |
? | ~ApplyPattern () |
void? | show () const |
void? | apply_globals () const |
void? | apply () const |
Public Attributes |
|
cmt_string? | name |
Use*? | use |
cmt_vector? | replacements |
Static Public Methods |
|
void? | action (const CmtSystem::cmt_string_vector& words, Use* use) |
ApplyPattern*? | add (const cmt_string& name, Use* use) |
|
? |
Definition at line 100 of file cmt_pattern.h. |
|
? |
Definition at line 713 of file cmt_pattern.cxx. 00714 { 00715 } |
|
? |
Definition at line 718 of file cmt_pattern.cxx. 00719 { 00720 } |
|
? |
Definition at line 654 of file cmt_pattern.cxx. Referenced by KwdApplyPattern::action(). 00655 { 00656 // 00657 // Expected syntax is 00658 // 00659 // apply_pattern |
|
? |
Definition at line 702 of file cmt_pattern.cxx. Referenced by action(). 00703 { 00704 ApplyPattern& a = use->apply_patterns.add (); 00705 00706 a.name = name; 00707 a.use = use; 00708 00709 return (&a); 00710 } |
|
? |
Definition at line 744 of file cmt_pattern.cxx. Referenced by action(). 00745 { 00746 cmt_string line; 00747 00748 if (CmtSystem::testenv ("CMTTESTPATTERN")) 00749 { 00750 cout << "ApplyPattern::apply> " << name << endl; 00751 } 00752 00753 line = ""; 00754 Pattern* p = Pattern::find (name); 00755 if (p == 0) 00756 { 00757 if (CmtSystem::testenv ("CMTTESTPATTERN")) 00758 { 00759 cout << "ApplyPattern::apply> " << name << " not found" << endl; 00760 } 00761 00762 return; 00763 } 00764 00765 if (p->global) return; 00766 00767 Use* u = use; 00768 if (u == 0) u = &(Use::current ()); 00769 00770 p->apply (u, replacements); 00771 } |
|
? |
|
? |
Definition at line 723 of file cmt_pattern.cxx. Referenced by Pattern::show(), Pattern::show_all(), and Pattern::show_all_applied_patterns(). 00724 { 00725 cmt_string line; 00726 00727 line = ""; 00728 Pattern* p = Pattern::find (name); 00729 if (p == 0) return; 00730 00731 Use* u = use; 00732 if (u == 0) u = &(Use::current ()); 00733 00734 p->expand (u, replacements, line); 00735 00736 if (line != "") 00737 { 00738 line.replace_all ("\"", ""); 00739 cout << line; 00740 } 00741 } |
|
? |
Definition at line 115 of file cmt_pattern.h. |
|
? |
Definition at line 117 of file cmt_pattern.h. |
|
? |
Definition at line 116 of file cmt_pattern.h. |