Public Member Functions | |
bool | decode (const cmt_string &w, cmt_string &strategy, cmt_string &value) |
void | action (const CmtSystem::cmt_string_vector &words, Use *use, const cmt_string &file_name, int line_number) |
void | action (const CmtSystem::cmt_string_vector &words, Project *project, const cmt_string &file_name, int line_number) |
|
Reimplemented from Kwd. Definition at line 186 of file cmt_syntax.cxx. References CmtSystem::cmt_string_vector, decode(), CmtError::set(), Project::set_strategy(), and cmt_vector< T >::size().
00190 { 00191 for (int i = 1; i < words.size (); i++) 00192 { 00193 const cmt_string& w = words[i]; 00194 00195 cmt_string strategy; 00196 cmt_string value; 00197 00198 bool in_error = false; 00199 00200 if (decode (w, strategy, value)) 00201 { 00202 if (project != 0) project->set_strategy (strategy, value, ""); 00203 } 00204 else 00205 { 00206 in_error = true; 00207 00208 CmtError::set (CmtError::syntax_error, "ParseRequirements> bad strategy keyword"); 00209 } 00210 } 00211 } |
|
Implements Kwd. Definition at line 152 of file cmt_syntax.cxx. References CmtSystem::cmt_string_vector, decode(), Project::find_by_cmtpath(), Use::get_cmtpath_and_offset(), Use::get_package_name(), CmtError::set(), Project::set_strategy(), and cmt_vector< T >::size().
00156 { 00157 cmt_string cmtpath; 00158 cmt_string offset; 00159 00160 use->get_cmtpath_and_offset (cmtpath, offset); 00161 00162 Project* p = Project::find_by_cmtpath (cmtpath); 00163 00164 for (int i = 1; i < words.size (); i++) 00165 { 00166 const cmt_string& w = words[i]; 00167 00168 cmt_string strategy; 00169 cmt_string value; 00170 00171 bool in_error = false; 00172 00173 if (decode (w, strategy, value)) 00174 { 00175 if (p != 0) p->set_strategy (strategy, value, use->get_package_name ()); 00176 } 00177 else 00178 { 00179 in_error = true; 00180 00181 CmtError::set (CmtError::syntax_error, "ParseRequirements> bad strategy keyword"); 00182 } 00183 } 00184 } |
|
Definition at line 120 of file cmt_syntax.cxx. Referenced by action().
00121 { 00122 bool result = true; 00123 00124 value = w; 00125 00126 if (w == "prototypes") 00127 { 00128 strategy = "BuildPrototypes"; 00129 } 00130 else if (w == "no_prototypes") 00131 { 00132 strategy = "BuildPrototypes"; 00133 } 00134 else if ((w == "with_installarea") || (w == "with_install_area")) 00135 { 00136 value = "with_installarea"; 00137 strategy = "InstallArea"; 00138 } 00139 else if ((w == "without_installarea") || (w == "without_install_area")) 00140 { 00141 value = "without_installarea"; 00142 strategy = "InstallArea"; 00143 } 00144 else 00145 { 00146 result = false; 00147 } 00148 00149 return (result); 00150 } |