<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/5404/">http://svn.reviewboard.kde.org/r/5404/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 22nd, 2010, 10:41 a.m., <b>Alvaro Soliverez</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">How do you propose to link this to the current code? There are several options.
You can either load the cache on the prefetch, or load that when a new balance is requested, etc.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The plan is to load when each balance is requested. We may also want to prefetch certain balances such as "today for all open accounts"</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 22nd, 2010, 10:41 a.m., <b>Alvaro Soliverez</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="/r/5404/diff/1/?file=36726#file36726line71" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneybalancecache.h</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class KMM_MYMONEY_EXPORT MyMoneyBalanceCacheItem {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">71</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="n">QDate</span> <span class="n">date</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What's the purpose of this date? The BalanceCacheType already has a date, and the less data we store here, the faster it will go.
I would drop this class and only store a MyMoneyMoney object instead of a MyMoneyBalanceCacheItem.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I agree with only storing the MyMoneyMoney object. I will update the code in the cache to do so. At this point, the class mostly serves to indicate that a balance was not found for a call to either balance() or mostRecentBalance().
MyMoneyMoney has no way to indicate an invalid object, and I do not want to throw an exception for a cache miss. Another option is to have the balance cache itself fetch the balance on a miss, but I was trying to avoid that.</pre>
<br />
<p>- Fernando</p>
<br />
<p>On September 22nd, 2010, 3:08 a.m., Fernando Vilas wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kmymoney.</div>
<div>By Fernando Vilas.</div>
<p style="color: grey;"><i>Updated 2010-09-22 03:08:01</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Initial cut at the balance cache for the MyMoneyFile layer. Nothing uses it other than the test driver yet, but that will change once this is committed. Does it have a reasonable interface? Does it need something else added, like a model interface?
This interface is subject to change for now, but should be stable enough to start the next phase if it does not need revision first.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Built test driver, and the object passes all tests. Hooray, test-driven-development</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/extragear/office/kmymoney/kmymoney/mymoney/CMakeLists.txt <span style="color: grey">(1178028)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneybalancecache.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneybalancecache.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneybalancecachetest.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneybalancecachetest.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/5404/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>