/[lmi]/lmi/ledger_base.cpp
ViewVC logotype

Diff of /lmi/ledger_base.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by chicares, Mon Sep 12 01:32:19 2005 UTC revision 1.6 by chicares, Sun Oct 9 22:47:27 2005 UTC
# Line 525  void LedgerBase::Spew(std::ostream& os) Line 525  void LedgerBase::Spew(std::ostream& os)
525  {  {
526      static int const prec = max_stream_precision();      static int const prec = max_stream_precision();
527    
528        // These changes are intended to facilitate regression testing.
529        // Changing only this function, only in this file, causes '.test'
530        // output to reflect the following modifications.
531        //
532        // Copy:
533        //   "AcctValLoadAMD"     --> "SepAcctLoad"
534        //   "ExpRatRsvCash"      --> "ExperienceReserve"
535        //   "Loan"               --> "NewCashLoan"
536        //   "PolFee"             --> "PolicyFee"
537        //   "ExpRatRsvCash"      --> "KFactor"
538        //   "ExpRatRsvCash"      --> "ProjectedCoiCharge"
539        //   "PremiumTaxIsTiered" --> "PremiumTaxLoadIsTiered"
540        //
541        // Then expunge:
542        //   "AcctValLoadAMD"
543        //   "AcctValLoadBOM"
544        //   "AnnPolFee"
545        //   "BOYPrefLoan"
546        //   "ExpRatRsvCash"
547        //   "ExpRatRsvForborne"
548        //   "ExpRsvInt"
549        //   "Loan"
550        //   "MlyPolFee"
551        //   "PolFee"
552        //   "PremiumTaxIsTiered"
553        //   "PolicyShortName"
554        //
555        // New fields "KFactor" and "ProjectedCoiCharge" are initialized
556        // with the value in old field "ExpRatRsvCash". That value is, of
557        // course, wrong unless it happens to be zero; but it happens to
558        // be correct for almost all present test cases.
559    
560        double_vector_map vectors(AllVectors);
561        if(vectors.count("AcctValLoadAMD")) vectors["SepAcctLoad"       ] = vectors["AcctValLoadAMD"];
562        if(vectors.count("ExpRatRsvCash" )) vectors["ExperienceReserve" ] = vectors["ExpRatRsvCash" ];
563        if(vectors.count("Loan"          )) vectors["NewCashLoan"       ] = vectors["Loan"          ];
564        if(vectors.count("PolFee"        )) vectors["PolicyFee"         ] = vectors["PolFee"        ];
565        if(vectors.count("ExpRatRsvCash" )) vectors["KFactor"           ] = vectors["ExpRatRsvCash" ];
566        if(vectors.count("ExpRatRsvCash" )) vectors["ProjectedCoiCharge"] = vectors["ExpRatRsvCash" ];
567    
568        if(vectors.count("AcctValLoadAMD"   )) vectors.erase("AcctValLoadAMD"   );
569        if(vectors.count("AcctValLoadBOM"   )) vectors.erase("AcctValLoadBOM"   );
570        if(vectors.count("AnnPolFee"        )) vectors.erase("AnnPolFee"        );
571        if(vectors.count("BOYPrefLoan"      )) vectors.erase("BOYPrefLoan"      );
572        if(vectors.count("ExpRatRsvCash"    )) vectors.erase("ExpRatRsvCash"    );
573        if(vectors.count("ExpRatRsvForborne")) vectors.erase("ExpRatRsvForborne");
574        if(vectors.count("ExpRsvInt"        )) vectors.erase("ExpRsvInt"        );
575        if(vectors.count("Loan"             )) vectors.erase("Loan"             );
576        if(vectors.count("MlyPolFee"        )) vectors.erase("MlyPolFee"        );
577        if(vectors.count("PolFee"           )) vectors.erase("PolFee"           );
578    
579        scalar_map scalars(AllScalars);
580        if(scalars.count("PremiumTaxIsTiered")) scalars["PremiumTaxLoadIsTiered"] = scalars["PremiumTaxIsTiered"];
581        if(scalars.count("PremiumTaxIsTiered")) scalars.erase("PremiumTaxIsTiered");
582    
583        string_map strings(Strings);
584        if(strings.count("PolicyShortName"   )) strings.erase("PolicyShortName"   );
585    
586      for      for
587          (double_vector_map::const_iterator vmi = AllVectors.begin()          (double_vector_map::const_iterator vmi = vectors.begin()
588          ;vmi != AllVectors.end()          ;vmi != vectors.end()
589          ;vmi++          ;vmi++
590          )          )
591          {          {
# Line 535  void LedgerBase::Spew(std::ostream& os) Line 593  void LedgerBase::Spew(std::ostream& os)
593          }          }
594    
595      for      for
596          (scalar_map::const_iterator sci = AllScalars.begin()          (scalar_map::const_iterator sci = scalars.begin()
597          ;sci != AllScalars.end()          ;sci != scalars.end()
598          ;sci++          ;sci++
599          )          )
600          {          {
# Line 549  void LedgerBase::Spew(std::ostream& os) Line 607  void LedgerBase::Spew(std::ostream& os)
607          }          }
608    
609      for      for
610          (string_map::const_iterator sti = Strings.begin()          (string_map::const_iterator sti = strings.begin()
611          ;sti != Strings.end()          ;sti != strings.end()
612          ;sti++          ;sti++
613          )          )
614          {          {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26