Red-Black Trees are now used for duplicate detection, and planned

to be used for unordered map storage. This is because AAs still
don't work correctly and even if they did, require the user to
define both toHash and opCmp/opEquals for every YAML
struct/class. Now only opCmp needs to be defined.
Documentation/tutorials/examples have been updated accordingly.
This commit is contained in:
Ferdinand Majerech 2012-01-23 15:57:26 +01:00
parent 07eadc9403
commit 9596806644
34 changed files with 623 additions and 250 deletions

View file

@ -400,7 +400,7 @@
</dd>
<dt class="d_decl">int <a name="opApply"></a><span class="ddoc_psymbol">opApply</span>(T)(int delegate(ref T) <b>dg</b>);
</dt>
<dd><p>Iterate over a sequence, getting each element as T.
<dd><p>Foreach over a sequence, getting each element as T.
</p>
<p>If T is Node, simply iterate over the nodes in the sequence.
Otherwise, convert each node to T during iteration.
@ -412,7 +412,7 @@
</dd>
<dt class="d_decl">int <a name="opApply"></a><span class="ddoc_psymbol">opApply</span>(K, V)(int delegate(ref K, ref V) <b>dg</b>);
</dt>
<dd><p>Iterate over a mapping, getting each key/value as K/V.
<dd><p>Foreach over a mapping, getting each key/value as K/V.
</p>
<p>If the K and/or V is Node, simply iterate over the nodes in the mapping.
Otherwise, convert each key/value to T during iteration.
@ -512,6 +512,11 @@
<b>Throws:</b><div class="pbr">NodeException if the node is not a collection, index is out
of range or if a non-integral index is used on a sequence node.</div>
</dd>
<dt class="d_decl">const const int <a name="opCmp"></a><span class="ddoc_psymbol">opCmp</span>(ref const Node <b>node</b>);
</dt>
<dd><p>Compare with another node.</p>
</dd>
</dl>
</dd>
@ -521,7 +526,7 @@
<div id="copyright">
Copyright &copy; Ferdinand Majerech 2011. Based on <a href="http://www.pyyaml.org">PyYAML</a> by Kirill Simonov. |
Page generated by Autodoc and <a href="http://www.digitalmars.com/d/2.0/ddoc.html">Ddoc</a>.
Page generated by AutoDDoc and <a href="http://www.digitalmars.com/d/2.0/ddoc.html">Ddoc</a>.
</div>
</body>