lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 0b921c0 2/3: Use DBO rules


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0b921c0 2/3: Use DBO rules
Date: Tue, 17 Dec 2019 13:02:13 -0500 (EST)

branch: master
commit 0b921c0bf417c82d7cca33567288d68559a3596e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Use DBO rules
    
    For now, only one set of hardcoded rules is actually used.
---
 Makefile.am           | 2 ++
 input_realization.cpp | 9 ++++++++-
 objects.make          | 2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index b470bba..bdec38e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -312,6 +312,7 @@ liblmi_common_sources = \
     datum_string.cpp \
     dbdict.cpp \
     dbnames.cpp \
+    dbo_rules.cpp \
     dbvalue.cpp \
     death_benefits.cpp \
     emit_ledger.cpp \
@@ -791,6 +792,7 @@ test_input_SOURCES = \
   datum_string.cpp \
   dbdict.cpp \
   dbnames.cpp \
+  dbo_rules.cpp \
   dbvalue.cpp \
   facets.cpp \
   global_settings.cpp \
diff --git a/input_realization.cpp b/input_realization.cpp
index 2a6be38..bd37a52 100644
--- a/input_realization.cpp
+++ b/input_realization.cpp
@@ -28,6 +28,7 @@
 #include "contains.hpp"
 #include "database.hpp"
 #include "dbnames.hpp"
+#include "dbo_rules.hpp"
 #include "global_settings.hpp"
 #include "handle_exceptions.hpp"
 #include "input_sequence_aux.hpp"       // convert_vector()
@@ -594,7 +595,13 @@ std::string Input::RealizeDeathBenefitOption()
             );
         }
 
-    // DBO3 !! Need rules for changes to and from MDB as well.
+    // DBO3 !! Eventually validate all DBO sequences this way
+    // (but using DBO rules from the product database):
+    if(database_->query<bool>(DB_AllowDboMdb) && 
!contains(ProductName.value(), "sample"))
+        {
+        dbo_sequence_is_allowed(DeathBenefitOptionRealized_);
+        }
+
     return "";
 }
 
diff --git a/objects.make b/objects.make
index 46d0d2c..0a5e63b 100644
--- a/objects.make
+++ b/objects.make
@@ -194,6 +194,7 @@ common_common_objects := \
   datum_string.o \
   dbdict.o \
   dbnames.o \
+  dbo_rules.o \
   dbvalue.o \
   death_benefits.o \
   emit_ledger.o \
@@ -704,6 +705,7 @@ input_test$(EXEEXT): \
   datum_string.o \
   dbdict.o \
   dbnames.o \
+  dbo_rules.o \
   dbvalue.o \
   facets.o \
   global_settings.o \



reply via email to

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