out << "" << make_html_anchor(*i) << " | \n";
// Status
- out << "stat) << "\">" << i->stat << "num << "\"> | \n";
+ out << "stat) << "\">"
+ << i->stat << "num << "\"> | \n";
// Section
out << "";
@@ -254,7 +256,8 @@ assert(!i->tags.empty());
}
template
-void print_issues(std::ostream & out, std::vector const & issues, lwg::section_map & section_db, Pred pred) {
+void print_issues(std::ostream & out, std::vector const & issues, lwg::section_map & section_db,
+ lwg::file_names const & names, Pred pred) {
std::multiset const all_issues{ issues.begin(), issues.end()} ;
std::multiset const issues_by_status{ issues.begin(), issues.end() };
@@ -279,7 +282,8 @@ void print_issues(std::ostream & out, std::vector const & issues, lw
out << ", " << section_db[iss.tags[k]] << " " << iss.tags[k];
}
- out << " Status: " << iss.stat << "\n";
+ out << " Status: "
+ << iss.stat << "\n";
out << " Submitter: " << iss.submitter
<< " Opened: ";
print_date(out, iss.date);
@@ -289,16 +293,19 @@ void print_issues(std::ostream & out, std::vector const & issues, lw
// view active issues in []
if (active_issues.count(iss) > 1) {
- out << " View other active issues in " << iss.tags[0] << ". \n";
+ out << "View other active issues in " << iss.tags[0] << ". \n";
}
// view all issues in []
if (all_issues.count(iss) > 1) {
- out << "View all other issues in " << iss.tags[0] << ". \n";
+ out << "View all other issues in " << iss.tags[0] << ". \n";
}
// view all issues with same status
if (issues_by_status.count(iss) > 1) {
- out << "View all issues with " << iss.stat << " status. \n";
+ out << "View all issues with "
+ << iss.stat << " status. \n";
}
// duplicates
@@ -340,12 +347,12 @@ void print_resolutions(std::ostream & out, std::vector const & issue
}
}
-void print_paper_heading(std::ostream& out, std::string const & paper, lwg::mailing_info const & lwg_issues_xml) {
+void print_paper_heading(std::ostream& out, std::string const & paper, lwg::mailing_info const & config) {
out <<
R"(
Doc. no. |
- )" << lwg_issues_xml.get_doc_number(paper) << R"( |
+ )" << config.get_doc_number(paper) << R"( |
Date: |
@@ -357,22 +364,22 @@ R"(
Reply to: |
- )" << lwg_issues_xml.get_maintainer() << R"( |
+ )" << config.get_maintainer() << R"( |
)";
out << "";
if (paper == "active") {
- out << "C++ Standard Library Active Issues List (Revision ";
+ out << config.get_doc_name() + " Active Issues List (Revision ";
}
else if (paper == "defect") {
- out << "C++ Standard Library Defect Report List (Revision ";
+ out << config.get_doc_name() + " Defect Report List (Revision ";
}
else if (paper == "closed") {
- out << "C++ Standard Library Closed Issues List (Revision ";
+ out << config.get_doc_name() + " Closed Issues List (Revision ";
}
- out << lwg_issues_xml.get_revision() << ")\n";
+ out << config.get_revision() << ")\n";
out << "" << build_timestamp << " ";
}
@@ -388,17 +395,17 @@ namespace lwg
void report_generator::make_active(std::vector const & issues, std::string const & path, std::string const & diff_report) {
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-active.html"};
+ std::string filename{path + names.active_name()};
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "C++ Standard Library Active Issues List");
- print_paper_heading(out, "active", lwg_issues_xml);
- out << lwg_issues_xml.get_intro("active") << '\n';
- out << "Revision History\n" << lwg_issues_xml.get_revisions(issues, diff_report) << '\n';
- out << "Issue Status\n" << lwg_issues_xml.get_statuses() << '\n';
+ print_file_header(out, "Active Issues List");
+ print_paper_heading(out, "active", config);
+ out << config.get_intro("active") << '\n';
+ out << "Revision History\n" << config.get_revisions(issues, diff_report) << '\n';
+ out << "Issue Status\n" << config.get_statuses() << '\n';
out << "Active Issues\n";
- print_issues(out, issues, section_db, [](issue const & i) {return is_active(i.stat);} );
+ print_issues(out, issues, section_db, names, [](issue const & i) {return is_active(i.stat);} );
print_file_trailer(out);
}
@@ -406,16 +413,16 @@ void report_generator::make_active(std::vector const & issues, std::strin
void report_generator::make_defect(std::vector const & issues, std::string const & path, std::string const & diff_report) {
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-defects.html"};
+ std::string filename{path + names.defects_name()};
std::ofstream out(filename.c_str());
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "C++ Standard Library Defect Report List");
- print_paper_heading(out, "defect", lwg_issues_xml);
- out << lwg_issues_xml.get_intro("defect") << '\n';
- out << "Revision History\n" << lwg_issues_xml.get_revisions(issues, diff_report) << '\n';
+ print_file_header(out, "Defect Report List");
+ print_paper_heading(out, "defect", config);
+ out << config.get_intro("defect") << '\n';
+ out << "Revision History\n" << config.get_revisions(issues, diff_report) << '\n';
out << "Defect Reports\n";
- print_issues(out, issues, section_db, [](issue const & i) {return is_defect(i.stat);} );
+ print_issues(out, issues, section_db, names, [](issue const & i) {return is_defect(i.stat);} );
print_file_trailer(out);
}
@@ -423,37 +430,37 @@ void report_generator::make_defect(std::vector const & issues, std::strin
void report_generator::make_closed(std::vector const & issues, std::string const & path, std::string const & diff_report) {
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-closed.html"};
+ std::string filename{path + names.closed_name()};
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "C++ Standard Library Closed Issues List");
- print_paper_heading(out, "closed", lwg_issues_xml);
- out << lwg_issues_xml.get_intro("closed") << '\n';
- out << "Revision History\n" << lwg_issues_xml.get_revisions(issues, diff_report) << '\n';
+ print_file_header(out, "Closed Issues List");
+ print_paper_heading(out, "closed", config);
+ out << config.get_intro("closed") << '\n';
+ out << "Revision History\n" << config.get_revisions(issues, diff_report) << '\n';
out << "Closed Issues\n";
- print_issues(out, issues, section_db, [](issue const & i) {return is_closed(i.stat);} );
+ print_issues(out, issues, section_db, names, [](issue const & i) {return is_closed(i.stat);} );
print_file_trailer(out);
}
-// Additional non-standard documents, useful for running LWG meetings
+// Additional non-standard documents, useful for running meetings
void report_generator::make_tentative(std::vector const & issues, std::string const & path) {
// publish a document listing all tentative issues that may be acted on during a meeting.
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-tentative.html"};
+ std::string filename{path + names.tentative_name()};
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "C++ Standard Library Tentative Issues");
-// print_paper_heading(out, "active", lwg_issues_xml);
-// out << lwg_issues_xml.get_intro("active") << '\n';
-// out << "Revision History\n" << lwg_issues_xml.get_revisions(issues) << '\n';
-// out << "Issue Status\n" << lwg_issues_xml.get_statuses() << '\n';
+ print_file_header(out, "Tentative Issues");
+// print_paper_heading(out, "active", config);
+// out << config.get_intro("active") << '\n';
+// out << "Revision History\n" << config.get_revisions(issues) << '\n';
+// out << "Issue Status\n" << config.get_statuses() << '\n';
out << "" << build_timestamp << " ";
out << "Tentative Issues\n";
- print_issues(out, issues, section_db, [](issue const & i) {return is_tentative(i.stat);} );
+ print_issues(out, issues, section_db, names, [](issue const & i) {return is_tentative(i.stat);} );
print_file_trailer(out);
}
@@ -462,18 +469,18 @@ void report_generator::make_unresolved(std::vector const & issues, std::s
// publish a document listing all non-tentative, non-ready issues that must be reviewed during a meeting.
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-unresolved.html"};
+ std::string filename{path + names.unresolved_name()};
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "C++ Standard Library Unresolved Issues");
-// print_paper_heading(out, "active", lwg_issues_xml);
-// out << lwg_issues_xml.get_intro("active") << '\n';
-// out << "Revision History\n" << lwg_issues_xml.get_revisions(issues) << '\n';
-// out << "Issue Status\n" << lwg_issues_xml.get_statuses() << '\n';
+ print_file_header(out, "Unresolved Issues");
+// print_paper_heading(out, "active", config);
+// out << config.get_intro("active") << '\n';
+// out << "Revision History\n" << config.get_revisions(issues) << '\n';
+// out << "Issue Status\n" << config.get_statuses() << '\n';
out << "" << build_timestamp << " ";
out << "Unresolved Issues\n";
- print_issues(out, issues, section_db, [](issue const & i) {return is_not_resolved(i.stat);} );
+ print_issues(out, issues, section_db, names, [](issue const & i) {return is_not_resolved(i.stat);} );
print_file_trailer(out);
}
@@ -481,12 +488,12 @@ void report_generator::make_immediate(std::vector const & issues, std::st
// publish a document listing all non-tentative, non-ready issues that must be reviewed during a meeting.
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-immediate.html"};
+ std::string filename{path + names.unresolved_name()};
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HERE]");
-out << R"(C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HERE]
+ print_file_header(out, "Issues Resolved Directly");
+ out << R"()" << config.get_doc_name() << R"( Issues Resolved Directly In [INSERT CURRENT MEETING HERE]
Doc. no. |
@@ -507,7 +514,7 @@ out << R"(C++ Standard Library Issues Resolved Directly In [INSERT CURRENT M
)";
out << "Immediate Issues\n";
- print_issues(out, issues, section_db, [](issue const & i) {return "Immediate" == i.stat;} );
+ print_issues(out, issues, section_db, names, [](issue const & i) {return "Immediate" == i.stat;} );
print_file_trailer(out);
}
@@ -515,13 +522,13 @@ void report_generator::make_editors_issues(std::vector const & issues, st
// publish a single document listing all 'Voting' and 'Immediate' resolutions (only).
assert(std::is_sorted(issues.begin(), issues.end(), order_by_issue_number{}));
- std::string filename{path + "lwg-issues-for-editor.html"};
+ std::string filename{path + names.issues_for_editor_name()};
std::ofstream out{filename.c_str()};
if (!out) {
throw std::runtime_error{"Failed to open " + filename};
}
- print_file_header(out, "C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HERE]");
- out << "C++ Standard Library Issues Resolved In [INSERT CURRENT MEETING HERE]\n";
+ print_file_header(out, "Issues Resolved Directly");
+ out << "" << config.get_doc_name() << " Resolved In [INSERT CURRENT MEETING HERE]\n";
print_resolutions(out, issues, section_db, [](issue const & i) {return "Pending WP" == i.stat;} );
print_file_trailer(out);
}
@@ -532,18 +539,19 @@ void report_generator::make_sort_by_num(std::vector& issues, std::string
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "LWG Table of Contents");
+ print_file_header(out, "Table of Contents");
- out <<
-R"(C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision() << R"()
+ out << "" << config.get_doc_name() <<
+R"( Issues List (Revision )" << config.get_revision() << R"()
Table of Contents
-Reference ISO/IEC IS 14882:2011(E)
-This document is the Table of Contents for the Library Active Issues List,
-Library Defect Reports List, and Library Closed Issues List.
+Reference )" << config.get_doc_reference() << R"(
+This document is the Table of Contents for the Active Issues List,
+Defect Reports List,
+and Closed Issues List.
)";
out << "" << build_timestamp << " ";
- print_table(out, issues.begin(), issues.end(), section_db);
+ print_table(out, issues.begin(), issues.end(), section_db, names);
print_file_trailer(out);
}
@@ -554,18 +562,19 @@ void report_generator::make_sort_by_priority(std::vector& issues, std::st
std::ofstream out{filename.c_str()};
if (!out)
throw std::runtime_error{"Failed to open " + filename};
- print_file_header(out, "LWG Table of Contents");
-
- out <<
-R"(C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision() << R"()
-Table of Contents
-Reference ISO/IEC IS 14882:2011(E)
-This document is the Table of Contents for the Library Active Issues List,
-Library Defect Reports List, and Library Closed Issues List.
+ print_file_header(out, "Table of Contents");
+
+ out << "" << config.get_doc_name() <<
+R"( Issues List (Revision )" << config.get_revision() << R"()
+Index by Issue Number
+Reference )" << config.get_doc_reference() << R"(
+This document is the Table of Contents for the Active Issues List,
+Defect Reports List,
+and Closed Issues List.
)";
out << "" << build_timestamp << " ";
-// print_table(out, issues.begin(), issues.end(), section_db);
+// print_table(out, issues.begin(), issues.end(), section_db, names);
for (auto i = issues.cbegin(), e = issues.cend(); i != e;) {
int px = i->priority;
@@ -578,7 +587,7 @@ R"( |