diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-27 08:02:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-27 08:02:29 -0700 |
commit | 4698dc0002c671b15eb0cb7d52d2a0fa470c5fde (patch) | |
tree | 358b412fc862a649c1c21fa0e01f1fd2f356680b /html/042name.cc.html | |
parent | a791c04264433696635d598471f3004c97f9ad50 (diff) | |
download | mu-4698dc0002c671b15eb0cb7d52d2a0fa470c5fde.tar.gz |
3021
Diffstat (limited to 'html/042name.cc.html')
-rw-r--r-- | html/042name.cc.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/html/042name.cc.html b/html/042name.cc.html index 6067e28c..5b8dc773 100644 --- a/html/042name.cc.html +++ b/html/042name.cc.html @@ -96,6 +96,12 @@ Name = Name_snapshot<span class="Delimiter">;</span> <span class="Normal">int</span> v = lookup_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">),</span> r<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>v >= <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>set_value<span class="Delimiter">(</span>v<span class="Delimiter">);</span> + <span class="Comment">// HACK: belongs in a later layer, either in the scenario layer which</span> + <span class="Comment">// introduces the 'run' pseudo-instruction which is translated to</span> + <span class="Comment">// run_* recipes, or later when we start using screens and consoles in</span> + <span class="Comment">// scenarios.</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_special_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>name<span class="Delimiter">)</span> && caller<span class="Delimiter">.</span>name<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">4</span><span class="Delimiter">)</span> == <span class="Constant">"run_"</span><span class="Delimiter">)</span> + inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span><span class="Constant">"raw"</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"can't find a place to store '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> @@ -115,6 +121,12 @@ Name = Name_snapshot<span class="Delimiter">;</span> <span class="Normal">int</span> v = lookup_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">),</span> r<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>v >= <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>set_value<span class="Delimiter">(</span>v<span class="Delimiter">);</span> + <span class="Comment">// HACK: belongs in a later layer, either in the scenario layer which</span> + <span class="Comment">// introduces the 'run' pseudo-instruction which is translated to</span> + <span class="Comment">// run_* recipes, or later when we start using screens and consoles in</span> + <span class="Comment">// scenarios.</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_special_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>name<span class="Delimiter">)</span> && caller<span class="Delimiter">.</span>name<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">4</span><span class="Delimiter">)</span> == <span class="Constant">"run_"</span><span class="Delimiter">)</span> + inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span><span class="Constant">"raw"</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"can't find a place to store '"</span> << inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> |