Added relationship of {SPECIAL}.count to {SPECIAL}.capacity

Author:halw
Date:2010-08-14T15:00:01.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@654 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2010-08-14 15:00:01 +00:00
parent cda0cf03a1
commit fd3d1eb1f0

View File

@@ -76,6 +76,16 @@ The availability of <code>{TO_SPECIAL}.make_filled_area</code> and <code>{TO_SPE
<code>{TO_SPECIAL}.make_empty_area</code> is available only in ''default'' mode.
====Relationship of feature <code>{SPECIAL}.count</code> to <code>{SPECIAL}.capacity</code>====
In previous versions, for a particular instance of <code>SPECIAL</code> the queries <code>count</code> and <code>capacity</code> yielded the same value.
This is no longer always true. If an instance of <code>SPECIAL</code> is created with, for example, <code>make_empty (10)</code>, although the <code>capacity</code> will be 10, the <code>count</code> will be zero.
However creating a <code>SPECIAL</code> using <code>make_filled</code> will produce an instance in which <code>count</code> and <code>capacity</code> are equal upon creation. So the behavior is similar to that of previous versions. Also, <code>make_filled</code> is available in both ''default'' and ''compatible'' modes.
If you are depending upon <code>count</code> and <code>capacity</code> having the same value, then use <code>make_filled</code> for creation. And then if you need resizing, use the "with_default" versions of the "resized" queries, specifically <code>resized_area_with_default</code> and <code>aliased_resized_area_with_default</code>.