lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master e091934 3/5: Store a raw input filename as we


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e091934 3/5: Store a raw input filename as well as one for monthly traces
Date: Sun, 18 Jul 2021 08:13:54 -0400 (EDT)

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

    Store a raw input filename as well as one for monthly traces
    
    Monthly trace files are already saved with a filename based upon the
    input case and cell names, with a distinctive extension. Added a
    string that's generally the same without that extension, for writing
    diagnostic messages that identify the input source.
    
    The name of the trace file is distinct because it needs to be set OAOO.
---
 account_value.hpp | 1 +
 accountvalue.cpp  | 2 ++
 ihs_acctval.cpp   | 1 +
 ihs_avdebug.cpp   | 1 +
 4 files changed, 5 insertions(+)

diff --git a/account_value.hpp b/account_value.hpp
index c61daab..e2560ef 100644
--- a/account_value.hpp
+++ b/account_value.hpp
@@ -312,6 +312,7 @@ class LMI_SO AccountValue final
     void   CoordinateCounters();
 
     // Detailed monthly trace.
+    std::string     InputFilename;
     std::string     DebugFilename;
     std::ofstream   DebugStream;
     std::vector<std::string> DebugRecord;
diff --git a/accountvalue.cpp b/accountvalue.cpp
index f428db9..7d2c6d6 100644
--- a/accountvalue.cpp
+++ b/accountvalue.cpp
@@ -108,6 +108,7 @@ showing {accesses, modifies current year, modifies future 
years}
 //============================================================================
 AccountValue::AccountValue(Input const& input)
     :BasicValues       (Input::consummate(input))
+    ,InputFilename     {"anonymous"}
     ,DebugFilename     {"anonymous.monthly_trace"}
     ,ledger_{::new Ledger(BasicValues::GetLength(), 
BasicValues::ledger_type(), BasicValues::nonillustrated(), 
BasicValues::no_can_issue(), false)}
     ,ledger_invariant_ {::new LedgerInvariant(BasicValues::GetLength())}
@@ -1033,6 +1034,7 @@ void AccountValue::TxDebug()
 //============================================================================
 void AccountValue::SetDebugFilename(std::string const& s)
 {
+    InputFilename = s;
     DebugFilename = s;
 }
 
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index eca925e..7559bf2 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -89,6 +89,7 @@ showing {accesses, modifies current year, modifies future 
years}
 //============================================================================
 AccountValue::AccountValue(Input const& input)
     :BasicValues           (Input::consummate(input))
+    ,InputFilename         {"anonymous"}
     ,DebugFilename         {"anonymous.monthly_trace"}
     ,Debugging             {false}
     ,Solving               {mce_solve_none != 
BasicValues::yare_input_.SolveType}
diff --git a/ihs_avdebug.cpp b/ihs_avdebug.cpp
index 02efc55..a3886f1 100644
--- a/ihs_avdebug.cpp
+++ b/ihs_avdebug.cpp
@@ -271,6 +271,7 @@ void AccountValue::SetDebugFilename(std::string const& s)
     bool const regr_testing = global_settings::instance().regression_testing();
     std::string const& print_dir = c.print_directory();
     fs::path const f = regr_testing ? s : modify_directory(s, print_dir);
+    InputFilename = f.string();
     DebugFilename = unique_filepath(f, ".monthly_trace" + tsv_ext).string();
 }
 



reply via email to

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