[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 29865fc 133/156: Add supplemental report to N
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 29865fc 133/156: Add supplemental report to NASD illustrations too |
Date: |
Tue, 30 Jan 2018 17:22:31 -0500 (EST) |
branch: master
commit 29865fcce5b6115a0e3eb189f0f5a9fd73a9d45b
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Add supplemental report to NASD illustrations too
Factor out supplemental_report_base class from supplemental_report and
reuse it for nasd_supplemental_report page.
---
ledger_pdf_generator_wx.cpp | 41 ++++++++++++++++++++++++++++++---------
nasd_supplemental_report.mustache | 7 +++++++
2 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 0898470..ae480e8 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1838,10 +1838,10 @@ class tabular_detail2_page : public
page_with_tabular_report
}
};
-class supplemental_report : public page_with_tabular_report
+class supplemental_report_base : public page_with_tabular_report
{
public:
- explicit supplemental_report(html_interpolator const& interpolate_html)
+ explicit supplemental_report_base(html_interpolator const&
interpolate_html)
{
constexpr std::size_t max_columns = 12;
std::string const empty_column_name("[none]");
@@ -1866,6 +1866,20 @@ class supplemental_report : public
page_with_tabular_report
}
private:
+ illustration_table_columns const& get_table_columns() const override
+ {
+ return columns_;
+ }
+
+ illustration_table_columns columns_;
+};
+
+class supplemental_report : public supplemental_report_base
+{
+ public:
+ using supplemental_report_base::supplemental_report_base;
+
+ private:
std::string get_fixed_page_contents() const override
{
return "{{>supplemental_report}}";
@@ -1875,13 +1889,6 @@ class supplemental_report : public
page_with_tabular_report
{
return "footer_disclaimer";
}
-
- illustration_table_columns const& get_table_columns() const override
- {
- return columns_;
- }
-
- illustration_table_columns columns_;
};
// Regular illustration.
@@ -2374,6 +2381,18 @@ class nasd_assumption_detail : public
page_with_tabular_report
// all of its columns, including the "AttainedAge" one, are always shown.
};
+class nasd_supplemental_report : public supplemental_report_base
+{
+ public:
+ using supplemental_report_base::supplemental_report_base;
+
+ private:
+ std::string get_fixed_page_contents() const override
+ {
+ return "{{>nasd_supplemental_report}}";
+ }
+};
+
// NASD illustration.
class pdf_illustration_nasd : public pdf_illustration
{
@@ -2426,6 +2445,10 @@ class pdf_illustration_nasd : public pdf_illustration
{
add<nasd_assumption_detail>();
}
+ if(invar.SupplementalReport)
+ {
+ add<nasd_supplemental_report>(get_interpolator());
+ }
}
std::string get_upper_footer_template_name() const override
diff --git a/nasd_supplemental_report.mustache
b/nasd_supplemental_report.mustache
new file mode 100644
index 0000000..0c4bf77
--- /dev/null
+++ b/nasd_supplemental_report.mustache
@@ -0,0 +1,7 @@
+{{>nasd_header_upper}}
+<p align="center">{{SupplementalReportTitle}}</p>
+{{>nasd_header_lower}}
+
+{{>dollar_units}}
+
+{{! The supplemental report table itself is generated from C++ code }}
- [lmi-commits] [lmi] master b09a25f 026/156: Implement numbering pages in the PDF output, (continued)
- [lmi-commits] [lmi] master b09a25f 026/156: Implement numbering pages in the PDF output, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb75971 033/156: Implement the second part of the narrative summary page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 964db82 067/156: Rename columns_headings_page to column_headings_page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2a94469 074/156: Use Mustache template files from the data directory, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 01be23a 103/156: Automatically squeeze table columns to make them fit if necessary, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 46a7442 068/156: Factor out helper render_template() method, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d77620f 100/156: Factor out dollar_units template from the existing ones, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 833eef5 086/156: Use std::make_unique<> instead of raw "new", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 34c088c 073/156: Move footer contents into an external template too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0ba1c32 146/156: Consistently use "curr" as abbreviation of "current", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 29865fc 133/156: Add supplemental report to NASD illustrations too,
Greg Chicares <=
- [lmi-commits] [lmi] master 919d796 001/156: Remove old XSL-FO-based PDF generation code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master cc7fc05 143/156: Change template file extension from .mustache to .mst, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 08984bb 148/156: Recognize Mustache files in the coding rules test, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master de5a5c7 151/156: Fix interpolate_string_test build, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb5693e 136/156: Harmonize spacing in header in reg_d_group illustrations too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0c85a7a 154/156: Avoid using directive for the "html" namespace, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 463e8ca 138/156: Fix bug with page numbers in subsequent illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 830e1fd 130/156: Manually break column titles into lines, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 43859a6 053/156: Add support for "measure only" output mode to wx_table_generator, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 772f4a4 139/156: Refactor: use get_fixed_page_contents_template_name(), Greg Chicares, 2018/01/30