[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting AccountRe
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-09-03 23:58:39
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11555/b4_Business/a1_Financial/a2_Accounting/h5_Reporting Modified Files: AccountReport.cs Log Message: SetEquityLine method has been added: it creates the equity line in a faster way than if it is created by the Create method Index: AccountReport.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/AccountReport.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AccountReport.cs 26 May 2005 23:32:23 -0000 1.14 --- AccountReport.cs 3 Sep 2005 23:58:31 -0000 1.15 *************** *** 253,263 **** this.benchmarkEquityLine.Interpolate( this.EquityHistory.Keys , new PreviousInterpolator() ); } ! public AccountReport Create( string reportName , long numDaysForInterval , ! EndOfDayDateTime endDateTime , string benchmark ) ! { ! this.reportName = reportName; ! this.endDateTime = endDateTime; this.benchmark = benchmark; ! detailedDataTable = getDetailedDataTable( numDaysForInterval ); this.transactionTable = new Tables.Transactions( reportName , detailedDataTable ); // this.transactionTable = getTransactionTable( reportName , detailedDataTable ); --- 253,284 ---- this.benchmarkEquityLine.Interpolate( this.EquityHistory.Keys , new PreviousInterpolator() ); } ! private void setDetailedDataTable( long numDaysForInterval ) ! { ! if ( this.detailedDataTable == null ) ! // the detailedDataTable has not been computed yet ! this.detailedDataTable = ! this.getDetailedDataTable( numDaysForInterval ); ! } ! /// <summary> ! /// Creates the equity line in a faster way than if it is created ! /// by the Create method ! /// </summary> ! /// <param name="numDaysForInterval"></param> ! /// <param name="endDateTime"></param> ! /// <returns></returns> ! public void SetEquityLine( long numDaysForInterval , ! EndOfDayDateTime endDateTime ) ! { ! this.endDateTime = endDateTime; ! this.setDetailedDataTable( numDaysForInterval ); ! this.equity = new Tables.Equity( reportName , detailedDataTable ); ! } ! public AccountReport Create( string reportName , long numDaysForInterval , ! EndOfDayDateTime endDateTime , string benchmark ) ! { ! this.reportName = reportName; ! this.endDateTime = endDateTime; this.benchmark = benchmark; ! this.setDetailedDataTable( numDaysForInterval ); this.transactionTable = new Tables.Transactions( reportName , detailedDataTable ); // this.transactionTable = getTransactionTable( reportName , detailedDataTable ); |