#include <cmt_symbol.h>
Collaboration diagram for SymbolValueList:
Public Types | |
typedef cmt_vector<SymbolValueList> | SymbolValueListVector |
Public Methods | |
int | select_first (const cmt_string& tag_name = "") const |
int | select_last () const |
Public Attributes | |
CommandType | command_type |
Use* | use |
SymbolValue::SymbolValueVector | values |
bool | is_reflexive |
bool | discarded |
|
Definition at line 24 of file cmt_symbol.h. |
|
Definition at line 2068 of file cmt_symbol.cxx. Referenced by MacroBuilder::build(), PathBuilder::build(), SetBuilder::build(), and PathBuilder::clean(). 02069 { 02070 int priority = 0; 02071 int value_number; 02072 int selected = -1; 02073 02074 Tag* the_tag = 0; 02075 02076 if (tag_name != "") the_tag = Tag::find (tag_name); 02077 02078 for (value_number = 0; 02079 value_number < values.size (); 02080 value_number++) 02081 { 02082 const SymbolValue& value = values[value_number]; 02083 02084 const Tag* tag = value.tag; 02085 02086 if (the_tag == 0) 02087 { 02088 if (!tag->selected) continue; 02089 } 02090 else 02091 { 02092 if (tag != the_tag) continue; 02093 selected = value_number; 02094 } 02095 02096 // 02097 // Only the first value at a given priority is 02098 // selected (which implies the '>' test instead 02099 // of '>=') 02100 // 02101 02102 if (tag->priority > priority) 02103 { 02104 priority = tag->priority; 02105 selected = value_number; 02106 } 02107 } 02108 02109 return (selected); 02110 } |
|
Definition at line 2113 of file cmt_symbol.cxx. 02114 { 02115 int priority = 0; 02116 int value_number; 02117 int selected = -1; 02118 02119 for (value_number = 0; 02120 value_number < values.size (); 02121 value_number++) 02122 { 02123 SymbolValue& value = values[value_number]; 02124 02125 const Tag* tag = value.tag; 02126 02127 if (tag->selected) 02128 { 02129 // 02130 // The last value at a given priority is 02131 // selected (which implies the '>=' test instead 02132 // of '>') 02133 // 02134 02135 if (tag->priority >= priority) 02136 { 02137 priority = tag->priority; 02138 selected = value_number; 02139 } 02140 } 02141 } 02142 02143 return (selected); 02144 } |
|
Definition at line 29 of file cmt_symbol.h. |
|
Definition at line 33 of file cmt_symbol.h. |
|
Definition at line 32 of file cmt_symbol.h. |
|
Definition at line 30 of file cmt_symbol.h. |
|
Definition at line 31 of file cmt_symbol.h. |