doc/AutoC/HashMap.html in autoc-1.2 vs doc/AutoC/HashMap.html in autoc-1.3

- old
+ new

@@ -168,11 +168,11 @@ <td class="tableblock halign-left valign-top"><p class="tableblock">Return non-zero value if map self contains no entries and zero value otherwise.</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>E</em></strong> <sub>type</sub>Get(<strong><em>Type</em></strong> * self, <strong><em>K</em></strong> key)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Return a <em>copy</em> of the element in self bound to a key which is considered equal to the key key. -</p><p class="tableblock">WARNING: self <strong>must</strong> contain such key otherwise the behavior is undefined. See <sub>type</sub>Contains().</p></td> +</p><p class="tableblock">WARNING: self <strong>must</strong> contain such key otherwise the behavior is undefined. See <sub>type</sub>ContainsKey().</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>void</em></strong> <sub>type</sub>Purge(<strong><em>Type</em></strong> * self)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Remove and destroy all keys and elements stored in self.</p></td> </tr> @@ -184,11 +184,11 @@ <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Replace(<strong><em>Type</em></strong> * self, <strong><em>K</em></strong> key, <strong><em>E</em></strong> value)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">If self contains a key which is considered equal to the key key, remove and destroy that key along with an element bound to it and put a new pair built of the <em>copies</em> of key and value, -otherwise simply put a new key/element pair into self in the way of <sub>type</sub>Put(). +otherwise no nothing. </p><p class="tableblock">Return non-zero value if the replacement was actually performed and zero value otherwise.</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>int</em></strong> <sub>type</sub>Remove(<strong><em>Type</em></strong> * self, <strong><em>K</em></strong> key)</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Remove and destroy a key which is considered equal to the key key. @@ -543,18 +543,24 @@ + <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Collection.html" title="AutoC::Collection (class)">Collection</a></span></h3> + <p class="inherited"><span class='object_link'><a href="Collection.html#constructible%3F-instance_method" title="AutoC::Collection#constructible? (method)">#constructible?</a></span>, <span class='object_link'><a href="Collection.html#destructible%3F-instance_method" title="AutoC::Collection#destructible? (method)">#destructible?</a></span>, <span class='object_link'><a href="Collection.html#initializable%3F-instance_method" title="AutoC::Collection#initializable? (method)">#initializable?</a></span></p> + + + + <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Type.html" title="AutoC::Type (class)">Type</a></span></h3> - <p class="inherited"><span class='object_link'><a href="Type.html#abort-instance_method" title="AutoC::Type#abort (method)">#abort</a></span>, <span class='object_link'><a href="Type.html#assert-instance_method" title="AutoC::Type#assert (method)">#assert</a></span>, <span class='object_link'><a href="Type.html#calloc-instance_method" title="AutoC::Type#calloc (method)">#calloc</a></span>, <span class='object_link'><a href="Type.html#coerce-class_method" title="AutoC::Type.coerce (method)">coerce</a></span>, <span class='object_link'><a href="Type.html#constructible%3F-instance_method" title="AutoC::Type#constructible? (method)">#constructible?</a></span>, <span class='object_link'><a href="Type.html#destructible%3F-instance_method" title="AutoC::Type#destructible? (method)">#destructible?</a></span>, <span class='object_link'><a href="Type.html#extern-instance_method" title="AutoC::Type#extern (method)">#extern</a></span>, <span class='object_link'><a href="Type.html#free-instance_method" title="AutoC::Type#free (method)">#free</a></span>, <span class='object_link'><a href="Type.html#inline-instance_method" title="AutoC::Type#inline (method)">#inline</a></span>, <span class='object_link'><a href="Type.html#malloc-instance_method" title="AutoC::Type#malloc (method)">#malloc</a></span>, <span class='object_link'><a href="Type.html#method_missing-instance_method" title="AutoC::Type#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Type.html#orderable%3F-instance_method" title="AutoC::Type#orderable? (method)">#orderable?</a></span>, <span class='object_link'><a href="Type.html#prefix-instance_method" title="AutoC::Type#prefix (method)">#prefix</a></span>, <span class='object_link'><a href="Type.html#private%3F-instance_method" title="AutoC::Type#private? (method)">#private?</a></span>, <span class='object_link'><a href="Type.html#public%3F-instance_method" title="AutoC::Type#public? (method)">#public?</a></span>, <span class='object_link'><a href="Type.html#static-instance_method" title="AutoC::Type#static (method)">#static</a></span>, <span class='object_link'><a href="Type.html#static%3F-instance_method" title="AutoC::Type#static? (method)">#static?</a></span>, <span class='object_link'><a href="Type.html#write_decls-instance_method" title="AutoC::Type#write_decls (method)">#write_decls</a></span>, <span class='object_link'><a href="Type.html#write_defs-instance_method" title="AutoC::Type#write_defs (method)">#write_defs</a></span>, <span class='object_link'><a href="Type.html#write_intf-instance_method" title="AutoC::Type#write_intf (method)">#write_intf</a></span></p> + <p class="inherited"><span class='object_link'><a href="Type.html#abort-instance_method" title="AutoC::Type#abort (method)">#abort</a></span>, <span class='object_link'><a href="Type.html#assert-instance_method" title="AutoC::Type#assert (method)">#assert</a></span>, <span class='object_link'><a href="Type.html#calloc-instance_method" title="AutoC::Type#calloc (method)">#calloc</a></span>, <span class='object_link'><a href="Type.html#coerce-class_method" title="AutoC::Type.coerce (method)">coerce</a></span>, <span class='object_link'><a href="Type.html#constructible%3F-instance_method" title="AutoC::Type#constructible? (method)">#constructible?</a></span>, <span class='object_link'><a href="Type.html#destructible%3F-instance_method" title="AutoC::Type#destructible? (method)">#destructible?</a></span>, <span class='object_link'><a href="Type.html#extern-instance_method" title="AutoC::Type#extern (method)">#extern</a></span>, <span class='object_link'><a href="Type.html#free-instance_method" title="AutoC::Type#free (method)">#free</a></span>, <span class='object_link'><a href="Type.html#initializable%3F-instance_method" title="AutoC::Type#initializable? (method)">#initializable?</a></span>, <span class='object_link'><a href="Type.html#inline-instance_method" title="AutoC::Type#inline (method)">#inline</a></span>, <span class='object_link'><a href="Type.html#malloc-instance_method" title="AutoC::Type#malloc (method)">#malloc</a></span>, <span class='object_link'><a href="Type.html#method_missing-instance_method" title="AutoC::Type#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Type.html#orderable%3F-instance_method" title="AutoC::Type#orderable? (method)">#orderable?</a></span>, <span class='object_link'><a href="Type.html#prefix-instance_method" title="AutoC::Type#prefix (method)">#prefix</a></span>, <span class='object_link'><a href="Type.html#private%3F-instance_method" title="AutoC::Type#private? (method)">#private?</a></span>, <span class='object_link'><a href="Type.html#public%3F-instance_method" title="AutoC::Type#public? (method)">#public?</a></span>, <span class='object_link'><a href="Type.html#static-instance_method" title="AutoC::Type#static (method)">#static</a></span>, <span class='object_link'><a href="Type.html#static%3F-instance_method" title="AutoC::Type#static? (method)">#static?</a></span>, <span class='object_link'><a href="Type.html#write_decls-instance_method" title="AutoC::Type#write_decls (method)">#write_decls</a></span>, <span class='object_link'><a href="Type.html#write_defs-instance_method" title="AutoC::Type#write_defs (method)">#write_defs</a></span>, <span class='object_link'><a href="Type.html#write_intf-instance_method" title="AutoC::Type#write_intf (method)">#write_intf</a></span></p> @@ -598,24 +604,22 @@ 146 147 148 149 150 -151 -152</pre> +151</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 144</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_key_type'>key_type</span><span class='comma'>,</span> <span class='id identifier rubyid_value_type'>value_type</span><span class='comma'>,</span> <span class='id identifier rubyid_visibility'>visibility</span> <span class='op'>=</span> <span class='symbol'>:public</span><span class='rparen'>)</span> <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_value_type'>value_type</span><span class='comma'>,</span> <span class='id identifier rubyid_visibility'>visibility</span><span class='rparen'>)</span> <span class='ivar'>@key</span> <span class='op'>=</span> <span class='const'>Type</span><span class='period'>.</span><span class='id identifier rubyid_coerce'>coerce</span><span class='lparen'>(</span><span class='id identifier rubyid_key_type'>key_type</span><span class='rparen'>)</span> <span class='ivar'>@entry</span> <span class='op'>=</span> <span class='const'>UserDefinedType</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:type</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entry'>entry</span><span class='comma'>,</span> <span class='symbol'>:identify</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entryIdentify'>entryIdentify</span><span class='comma'>,</span> <span class='symbol'>:equal</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entryEqual'>entryEqual</span><span class='comma'>,</span> <span class='symbol'>:copy</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entryCopy'>entryCopy</span><span class='comma'>,</span> <span class='symbol'>:dtor</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entryDtor'>entryDtor</span><span class='rparen'>)</span> <span class='ivar'>@set</span> <span class='op'>=</span> <span class='const'>HashSet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_set'>set</span><span class='comma'>,</span> <span class='ivar'>@entry</span><span class='comma'>,</span> <span class='symbol'>:static</span><span class='rparen'>)</span> - <span class='ivar'>@capability</span><span class='period'>.</span><span class='id identifier rubyid_subtract'>subtract</span> <span class='lbracket'>[</span><span class='symbol'>:orderable</span><span class='rbracket'>]</span> - <span class='id identifier rubyid_element_type_check'>element_type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> - <span class='id identifier rubyid_key_type_check'>key_type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> + <span class='id identifier rubyid_element_requirement'>element_requirement</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> + <span class='id identifier rubyid_key_requirement'>key_requirement</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -750,14 +754,14 @@ <tr> <td> <pre class="lines"> -156</pre> +155</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 156</span> + <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 155</span> <span class='kw'>def</span> <span class='id identifier rubyid_comparable?'>comparable?</span><span class='semicolon'>;</span> <span class='kw'>super</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_comparable?'>comparable?</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -798,14 +802,14 @@ <tr> <td> <pre class="lines"> -154</pre> +153</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 154</span> + <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 153</span> <span class='kw'>def</span> <span class='id identifier rubyid_copyable?'>copyable?</span><span class='semicolon'>;</span> <span class='kw'>super</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_copyable?'>copyable?</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -898,24 +902,16 @@ <tr> <td> <pre class="lines"> -158 -159 -160 -161 -162</pre> +157</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 158</span> + <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 157</span> -<span class='kw'>def</span> <span class='id identifier rubyid_hashable?'>hashable?</span> - <span class='comment'># NOTE : must be in sync with Type#hashable? -</span> <span class='comment'># No super call here because the map&#39;s element need not to be hashable,- only the key must be -</span> <span class='ivar'>@capability</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:hashable</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_comparable?'>comparable?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_hashable?'>hashable?</span> -<span class='kw'>end</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_hashable?'>hashable?</span><span class='semicolon'>;</span> <span class='kw'>super</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_hashable?'>hashable?</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -932,10 +928,14 @@ <tr> <td> <pre class="lines"> +211 +212 +213 +214 215 216 217 218 219 @@ -1116,20 +1116,17 @@ 394 395 396 397 398 -399 -400 -401 -402 -403</pre> +399</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 215</span> + <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 211</span> <span class='kw'>def</span> <span class='id identifier rubyid_write_impls'>write_impls</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='comma'>,</span> <span class='id identifier rubyid_define'>define</span><span class='rparen'>)</span> + <span class='kw'>super</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'> #define AUTOC_VALID_VALUE 1 #define AUTOC_VALID_KEY 2 #define AUTOC_OWNED_VALUE 4 #define AUTOC_OWNED_KEY 8 @@ -1200,13 +1197,12 @@ } static int </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_putEntryRef'>putEntryRef</span><span class='embexpr_end'>}</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type_ref'>type_ref</span><span class='embexpr_end'>}</span><span class='tstring_content'> self, </span><span class='embexpr_beg'>#{</span><span class='ivar'>@entry</span><span class='period'>.</span><span class='id identifier rubyid_type_ref'>type_ref</span><span class='embexpr_end'>}</span><span class='tstring_content'> entry) { int absent; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self); </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(entry); - if((absent = !</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_containsKey'>containsKey</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, entry-&gt;key))) { - </span><span class='embexpr_beg'>#{</span><span class='ivar'>@set</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;self-&gt;entries, *entry); - } + absent = !</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_containsKey'>containsKey</span><span class='embexpr_end'>}</span><span class='tstring_content'>(self, entry-&gt;key); + if(absent) </span><span class='embexpr_beg'>#{</span><span class='ivar'>@set</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='embexpr_end'>}</span><span class='tstring_content'>(&amp;self-&gt;entries, *entry); return absent; } </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_define'>define</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_copy'>copy</span><span class='period'>.</span><span class='id identifier rubyid_definition'>definition</span><span class='embexpr_end'>}</span><span class='tstring_content'> { </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_it'>it</span><span class='embexpr_end'>}</span><span class='tstring_content'> it; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_assert'>assert</span><span class='embexpr_end'>}</span><span class='tstring_content'>(src); @@ -1334,10 +1330,14 @@ <tr> <td> <pre class="lines"> +187 +188 +189 +190 191 192 193 194 195 @@ -1352,18 +1352,14 @@ 204 205 206 207 208 -209 -210 -211 -212 -213</pre> +209</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 191</span> + <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 187</span> <span class='kw'>def</span> <span class='id identifier rubyid_write_intf_decls'>write_intf_decls</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='comma'>,</span> <span class='id identifier rubyid_declare'>declare</span><span class='comma'>,</span> <span class='id identifier rubyid_define'>define</span><span class='rparen'>)</span> <span class='kw'>super</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_declare'>declare</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ctor'>ctor</span><span class='period'>.</span><span class='id identifier rubyid_declaration'>declaration</span><span class='embexpr_end'>}</span><span class='tstring_content'>; @@ -1404,10 +1400,15 @@ <tr> <td> <pre class="lines"> +159 +160 +161 +162 +163 164 165 166 167 168 @@ -1425,20 +1426,17 @@ 180 181 182 183 184 -185 -186 -187 -188 -189</pre> +185</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 164</span> + <pre class="code"><span class="info file"># File 'lib/autoc/collection/hash_map.rb', line 159</span> <span class='kw'>def</span> <span class='id identifier rubyid_write_intf_types'>write_intf_types</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> + <span class='kw'>super</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>%$</span><span class='tstring_content'> /*** **** </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>,</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt; (</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>) ***/ </span><span class='tstring_end'>$</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_public?'>public?</span> @@ -1470,12 +1468,12 @@ </div> </div> <div id="footer"> - Generated on Sat Nov 22 16:58:04 2014 by + Generated on Thu Mar 17 13:32:51 2016 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.7.6 (ruby-2.1.5). + 0.8.7.6 (ruby-2.2.4). </div> </body> </html> \ No newline at end of file