Update of /cvsroot/cpptool/rfta/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv28486/doc
Modified Files:
RenameLocaleVariable.html
Log Message:
* added example
Index: RenameLocaleVariable.html
===================================================================
RCS file: /cvsroot/cpptool/rfta/doc/RenameLocaleVariable.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RenameLocaleVariable.html 26 May 2003 07:26:03 -0000 1.1
--- RenameLocaleVariable.html 26 May 2003 20:13:21 -0000 1.2
***************
*** 7,16 ****
</head>
<body>
! Rename Locale Variable Refactoring<br>
<br>
This refactoring is used to rename a single locale variable with a free
or a member function body.<br>
! <br>
! KNOWN ISSUES: <br>
<ul>
<li>For scope is handled as defined by the C++ standard (variable
--- 7,15 ----
</head>
<body>
! <h1> Rename Locale Variable Refactoring</h1>
<br>
This refactoring is used to rename a single locale variable with a free
or a member function body.<br>
! <h2> KNOWN ISSUES: </h2>
<ul>
<li>For scope is handled as defined by the C++ standard (variable
***************
*** 26,30 ****
declaration. </li>
</ul>
! EXAMPLES:<br>
<br>
<br>
--- 25,76 ----
declaration. </li>
</ul>
! <h2> EXAMPLE:</h2>
! Rename locale variable 'x' to 'linePrice':<br>
! <br>
! <table cellpadding="2" cellspacing="0" border="1"
! style="text-align: left; width: 100%;">
! <tbody>
! <tr>
! <td style="vertical-align: top;">Original text:<br>
! </td>
! <td style="vertical-align: top;">Refactored text:<br>
! </td>
! </tr>
! <tr>
! <td style="vertical-align: top; font-family: monospace;">void
! OrderLine::computePrice( double )<br>
! {<br>
! double x = getPrice();<br>
! <span style="font-weight: bold; color: rgb(255, 0, 0);">x</span>
! += x * rate;<br>
! <br>
! if ( isSummer() )<br>
! {<br>
! double x = summerRate * summerDays;<br>
! addTaxes( x );<br>
! }<br>
! <br>
! return x * getQuantity();<br>
! }</td>
! <td style="vertical-align: top; font-family: monospace;">void
! OrderLine::computePrice( double )<br>
! {<br>
! double <span style="color: rgb(255, 0, 0);">linePrice </span>=
! getPrice();<br>
! <span style="color: rgb(255, 0, 0);">linePrice </span>+= <span
! style="color: rgb(255, 0, 0);">linePrice </span>* rate;<br>
! <br>
! if ( isSummer() )<br>
! {<br>
! double x = summerRate * summerDays;<br>
! addTaxes( x );<br>
! }<br>
! <br>
! return <span style="color: rgb(255, 0, 0);">linePrice </span>*
! getQuantity();<br>
! }</td>
! </tr>
! </tbody>
! </table>
<br>
<br>
|