lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 7cf8204 02/25: Add a 7702 interest-rate class


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 7cf8204 02/25: Add a 7702 interest-rate class
Date: Wed, 24 Feb 2021 19:00:50 -0500 (EST)

branch: master
commit 7cf8204af8d899d155eff505fff9ba81b665b84e
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Add a 7702 interest-rate class
---
 irc7702_interest.cpp | 15 +++++++++++++--
 irc7702_interest.hpp | 31 +++++++++++++++++++++++++++++--
 2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/irc7702_interest.cpp b/irc7702_interest.cpp
index 4595dde..59d322c 100644
--- a/irc7702_interest.cpp
+++ b/irc7702_interest.cpp
@@ -23,8 +23,10 @@
 
 #include "irc7702_interest.hpp"
 
-#include "contains.hpp"
-#include "global_settings.hpp"
+#include "contains.hpp"                 // 7702 !! obsolescent
+#include "database.hpp"
+#include "global_settings.hpp"          // 7702 !! obsolescent
+#include "stratified_charges.hpp"
 
 /// Statutory interest rate for 7702 and 7702A (except GSP).
 ///
@@ -48,3 +50,12 @@ double igsp()
 {
     return 0.02 + iglp();
 }
+
+i7702::i7702
+    (product_database   const& database
+    ,stratified_charges const& stratified
+    )
+    :database_   {database}
+    ,stratified_ {stratified}
+{
+}
diff --git a/irc7702_interest.hpp b/irc7702_interest.hpp
index e59e553..0a5a892 100644
--- a/irc7702_interest.hpp
+++ b/irc7702_interest.hpp
@@ -26,7 +26,34 @@
 
 #include "so_attributes.hpp"
 
-LMI_SO double iglp();
-LMI_SO double igsp();
+#include <vector>
+
+class LMI_SO_FWD_DECL product_database;
+class LMI_SO_FWD_DECL stratified_charges;
+
+LMI_SO double iglp(); // 7702 !! obsolescent
+LMI_SO double igsp(); // 7702 !! obsolescent
+
+class LMI_SO i7702 final
+{
+  public:
+    i7702
+        (product_database   const&
+        ,stratified_charges const&
+        );
+    i7702(i7702 const&) = delete;
+    i7702& operator=(i7702 const&) = delete;
+    ~i7702() = default;
+
+  private:
+    product_database   const& database_;
+    stratified_charges const& stratified_;
+
+    std::vector<double> spread_;
+
+    std::vector<double> gross_;
+    std::vector<double> net_glp_;
+    std::vector<double> net_gsp_;
+};
 
 #endif // irc7702_interest_hpp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]