Skip to content

Commit 605df2a

Browse files
authored
Wire HTML view name (#461)
1 parent 280ec20 commit 605df2a

16 files changed

Lines changed: 161 additions & 95 deletions

conan.lock

Lines changed: 47 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,79 @@
11
{
22
"version": "0.5",
33
"requires": [
4-
"zstd/1.5.7#fde461c0d847a22f16d3066774f61b11%1744114235.235",
5-
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1733936244.862",
6-
"xz_utils/5.4.5#b885d1d79c9d30cff3803f7f551dbe66%1724318972.064",
7-
"wvware/1.2.9-odr#c822f203f7a2dec7b34e4100eabac388%1764497609.565",
4+
"zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4%1760955092.069",
5+
"zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1765284699.337",
6+
"xz_utils/5.8.1#0c67d0683aca2f1ca69a17730a65a1e7%1764347087.521",
7+
"wvware/1.2.9-odr#2d8e0b63ad3ece786e8e70cb5c550f5f%1766349558.318423",
88
"vincentlaucsb-csv-parser/2.3.0#ac67e368e82c9e3da4a663c35e3a1b2f%1718528275.177",
9-
"util-linux-libuuid/2.39.2#637bd312b6310c18190469fae4e1d480%1729761467.688",
9+
"util-linux-libuuid/2.41.2#ee8e33ba15c17c0140643e0bd93c0b6f%1765881086.29",
1010
"utfcpp/4.0.4#cd6efc5d62de4e9ee0b5f3abd0df37a9%1722968964.685",
1111
"uchardet/0.0.8#6ab25e452021fcdb560f4e37f4a27bc1%1759735438.978",
1212
"pugixml/1.14#c6afdcf73d71858303d8260b0d76ff91%1696206310.014",
13-
"poppler-data/0.4.12-odr#06cdb12e4cab52261a5eb6c7d7dad273%1764497608.501",
14-
"poppler/24.08.0-odr#2929132c6c3c67155c6c8f050c923916%1764497607.478",
15-
"pixman/0.43.4#0dcdf859941e32fcc7bfb73ea1946a7f%1718828937.421",
16-
"pdf2htmlex/0.18.8.rc1-odr-git-eb5d291#99dd5c7844a56c308fa8221dc8c8c2b2%1764497606.474",
13+
"poppler-data/0.4.12-odr#06cdb12e4cab52261a5eb6c7d7dad273%1766349558.167614",
14+
"poppler/24.08.0-odr#5150a6889acc1c8c9176d857c12fa3c8%1766349558.019082",
15+
"pixman/0.46.2#88b157b4faa6474a6028c2ba2a987924%1752742515.414",
16+
"pdf2htmlex/0.18.8.rc1-odr-git-eb5d291#fadb1d15d841bf6c75e3bc76bde81777%1766349557.868725",
1717
"pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1743524593.693",
18-
"openlibm/0.8.3#61d8454cf655e95e0d3d3359bde58ac7%1754339136.456942",
19-
"openjpeg/2.5.2#6f7b733e151d1bbf5ed05cbabb846828%1709653017.024",
18+
"openjpeg/2.5.4#372fbc2b4348d45ab0c0a62a8475dc2f%1760446899.685",
2019
"nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d%1701220705.259",
2120
"miniz/3.0.2#bfbce07c6654293cce27ee24129d2df7%1743673472.805",
2221
"lzo/2.10#f00b10acc508cea70645727d970a23e1%1759909644.842",
2322
"libxml2/2.12.7#1c4d20b7ab8b618ce699733723ba4df6%1721306327.767",
2423
"libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1717655459.344",
25-
"libpng/1.6.48#dd0fc04a42b9a23bce065545a81d4847%1746141949.748",
24+
"libpng/1.6.53#a55f084366cd7b81cfce80327507913e%1765191393.267",
2625
"libmagic/5.45#791d5bad38d33272bb120994a198b1ac%1727273086.09",
2726
"libjpeg/9f#8edfe2699565c80c825d0256002504ff%1723665907.087",
2827
"libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1751451666.321",
29-
"libgsf/1.14.52#9b22c41267004c80ba5cde5d01e23a24%1764497589.738",
30-
"libgettext/0.22#35d2811b2dd27a98f69e4daa86ca2000%1714393058.647",
31-
"libffi/3.4.8#06926dca35bcf8e321fcc24def952cde%1748531860.405",
28+
"libgsf/1.14.52#7b7b45fff714f0441d8837e7b14b8b9a%1766349557.4201689",
29+
"libgettext/0.22#b09eea019e19b9b9c46d8f1da7d75444%1765809130.834",
30+
"libffi/3.4.8#a045c00fb26779635e3bed40e80c5254%1753360042.396",
3231
"libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1741781951.327",
33-
"lcms/2.16#fb083506ff40fd950c9e5c39df8bed54%1703969656.459",
32+
"lcms/2.17#3feb06eea368c52c82f50107cd7694cd%1753693316.094",
3433
"gtest/1.14.0#f8f0757a574a8dd747d16af62d6eb1b7%1743410807.169",
35-
"glib/2.81.0-odr#ddf445d5af468f972978af93c44d26e1%1764497588.731",
34+
"glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1766349557.268547",
3635
"giflib/5.2.2#3923fc0f7ffec2f0bdbdee9b548f9248%1731663927.701",
37-
"freetype/2.13.2#5d2563803c8558d4ef47271a82c73d20%1728736671.752",
38-
"fontforge/20240423-git#525c82a5e57385c14b647b966e86ea58%1764497587.707",
39-
"fontconfig/2.15.0-odr#2febbef44ca469204c8ff38cfd21db59%1764497586.969",
40-
"expat/2.6.3#39b80d3109fbe578fddfe4951f0b1d57%1725469045.298",
41-
"cryptopp/8.9.0#fe3de584c28c0ecc938a1671e3f1bd72%1731421245.374",
36+
"freetype/2.14.1#40f1e4af5db7d8155f9ecabd09973280%1762374429.281",
37+
"fontforge/20240423-git#af7f643fc24bfd3661e97e8adf7c5a72%1766349557.1175628",
38+
"fontconfig/2.15.0-odr#5681bcb942193569ee95215b93ed9fb0%1766349556.9683158",
39+
"expat/2.7.3#f529802a90f0758a01f498a18f8c657b%1759399780.465",
40+
"cryptopp/8.9.0#7a51e0038756b21bc3a6b82d681d5906%1758206597.119",
4241
"cpp-httplib/0.16.3#7aa89fbb81ffd19539a49fc132502966%1748426320.106",
43-
"cairo/1.18.0-odr#c1d0ad14a91ad6d161e756d54277ac13%1764497585.932",
44-
"bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5%1744702067.178",
45-
"brotli/1.1.0#406ce8f1c997f4ef7852fa01ff85ef9f%1743158659.041",
46-
"boost/1.86.0#cd839a2082585255010f9e82eea94c7f%1728027203.247",
47-
"argon2/20190702-odr#965901884bc82ec8a7c0a1305d42c127%1764497584.637"
42+
"cairo/1.18.0-odr#e2979af10b4da6ece999e32d272ffabc%1766349556.814425",
43+
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1762886692.465",
44+
"brotli/1.1.0#3f631ef77008f7b5eb388780116371a3%1764862343.045",
45+
"boost/1.90.0#d5e8defe7355494953be18524a7f135b%1765955095.179",
46+
"argon2/20190702-odr#965901884bc82ec8a7c0a1305d42c127%1766349556.660966"
4847
],
4948
"build_requires": [
50-
"zstd/1.5.7#fde461c0d847a22f16d3066774f61b11%1744114235.235",
51-
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1733936244.862",
52-
"xz_utils/5.4.5#b885d1d79c9d30cff3803f7f551dbe66%1724318972.064",
53-
"pkgconf/2.2.0#6462942a22803086372db44689ba825f%1713364853.749",
54-
"pkgconf/2.1.0#27f44583701117b571307cf5b5fe5605%1701537936.436",
55-
"pkgconf/2.0.3#f996677e96e61e6552d85e83756c328b%1696606182.229",
49+
"zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4%1760955092.069",
50+
"zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1765284699.337",
51+
"xz_utils/5.8.1#0c67d0683aca2f1ca69a17730a65a1e7%1764347087.521",
52+
"pkgconf/2.5.1#93c2051284cba1279494a43a4fcfeae2%1757684701.089",
53+
"pkgconf/2.2.0#4ac315b50ef734072b00ff3aacbf52bf%1755505628.021",
54+
"pkgconf/2.1.0#21f96520faf7660b99f872e956d2ac13%1755505630.82",
5655
"pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1743524593.693",
57-
"ninja/1.13.0#53ff096207a5599ced46a633271b3cef%1751046277.036",
58-
"msys2/cci.latest#5b73b10144f73cc5bfe0572ed9be39e1%1751977009.857",
59-
"meson/1.4.0#2262941cc8fbb0099dd0c196ca2a6c01%1726730116.631",
60-
"meson/1.3.2#26ce8a76a36cc275cdfee1d757bc6561%1726730118.251",
61-
"meson/1.2.2#21b73818ba96d9eea465b310b5bbc993%1726730120.212",
62-
"meson/1.2.1#f2b0c7763308df8e33172744dace8845%1726730117.905",
56+
"ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb%1764096931.974",
57+
"meson/1.9.1#abbc783cd297bedce14581b4aec060b8%1758626166.349",
6358
"m4/1.4.19#b38ced39a01e31fef5435bc634461fd2%1700758725.451",
64-
"libtool/2.4.7#a182d7ce8d4c346a19dbd4a5d532ef68%1742900203.747",
59+
"libtool/2.4.7#14e7739cc128bc1623d2ed318008e47e%1755679003.847",
6560
"libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1717655459.344",
6661
"libmagic/5.45#791d5bad38d33272bb120994a198b1ac%1727273086.09",
6762
"libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1751451666.321",
68-
"libgettext/0.22#35d2811b2dd27a98f69e4daa86ca2000%1714393058.647",
69-
"libffi/3.4.8#06926dca35bcf8e321fcc24def952cde%1748531860.405",
63+
"libgettext/0.22#b09eea019e19b9b9c46d8f1da7d75444%1765809130.834",
64+
"libffi/3.4.8#a045c00fb26779635e3bed40e80c5254%1753360042.396",
7065
"libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1741781951.327",
7166
"gtk-doc-stub/cci.20181216#09072d684ce1458596b44a30a747494c%1687277608.37",
72-
"gperf/3.1#1d622ad9717e9348ed3685c9994ad0b9%1709324989.76",
73-
"gnu-config/cci.20210814#dc430d754f465e8c74463019672fb97b%1701248168.479",
74-
"glib/2.81.0-odr#ddf445d5af468f972978af93c44d26e1%1764497588.731",
75-
"gettext/0.22.5#a1f31cc77dee0345699745ef39686dd0%1750252839.982",
76-
"flex/2.6.4#e35bc44b3fcbcd661e0af0dc5b5b1ad4%1674818991.113",
77-
"cmake/3.31.8#dd6e07c418afc4b30cb1c21584dccc49%1750223587.75",
78-
"bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5%1744702067.178",
79-
"automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1688481772.751",
80-
"autoconf/2.71#f9307992909d7fb3df459340f1932809%1711983104.648"
67+
"gperf/3.1#a7afdf8f7cccdc2dcd4d962370c33d4f%1755780571.156",
68+
"gnu-config/cci.20210814#466e9d4d7779e1c142443f7ea44b4284%1762363589.329",
69+
"glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1766349557.268547",
70+
"gettext/0.26#28c867efd4914f03c6c05da08a23c35b%1765299118.633",
71+
"flex/2.6.4#efa781fc5088b47c895bd4eef6911f2e%1761560242.855",
72+
"cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76%1763665505.054",
73+
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1762886692.465",
74+
"automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f%1755524470.56",
75+
"autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86"
8176
],
8277
"python_requires": [],
8378
"config_requires": []
84-
}
79+
}

scripts/conan_lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ conan lock create .
55
for profile in .github/config/conan/profiles/*; do
66
conan lock create . --profile:build "${profile}" --profile:host "${profile}"
77
done
8+
conan lock create . --profile:build ".github/config/conan/profiles/ubuntu-24.04-clang-18" --profile:host ".github/config/conan/profiles/android-35-x86_64"

src/odr/html.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ HtmlView::HtmlView(std::shared_ptr<abstract::HtmlView> impl)
150150

151151
const std::string &HtmlView::name() const { return m_impl->name(); }
152152

153+
std::size_t HtmlView::index() const { return m_impl->index(); }
154+
153155
const std::string &HtmlView::path() const { return m_impl->path(); }
154156

155157
const HtmlConfig &HtmlView::config() const { return m_impl->config(); }

src/odr/html.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class HtmlView final {
145145
explicit HtmlView(std::shared_ptr<internal::abstract::HtmlView> impl);
146146

147147
[[nodiscard]] const std::string &name() const;
148+
[[nodiscard]] std::size_t index() const;
148149
[[nodiscard]] const std::string &path() const;
149150
[[nodiscard]] const HtmlConfig &config() const;
150151

src/odr/internal/abstract/html_service.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class HtmlView {
3737
virtual ~HtmlView() = default;
3838

3939
[[nodiscard]] virtual const std::string &name() const = 0;
40+
[[nodiscard]] virtual std::size_t index() const = 0;
4041
[[nodiscard]] virtual const std::string &path() const = 0;
4142
[[nodiscard]] virtual const HtmlConfig &config() const = 0;
4243

src/odr/internal/html/document.cpp

Lines changed: 59 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,15 @@ std::string fill_path_variables(const std::string &path,
153153

154154
class HtmlFragmentBase {
155155
public:
156-
HtmlFragmentBase(std::string name, std::string path, Document document)
157-
: m_name{std::move(name)}, m_path{std::move(path)},
156+
HtmlFragmentBase(std::string name, const std::size_t index, std::string path,
157+
Document document)
158+
: m_name{std::move(name)}, m_index{index}, m_path{std::move(path)},
158159
m_document{std::move(document)} {}
159160

160161
virtual ~HtmlFragmentBase() = default;
161162

162163
[[nodiscard]] const std::string &name() const { return m_name; }
164+
[[nodiscard]] std::size_t index() const { return m_index; }
163165
[[nodiscard]] const std::string &path() const { return m_path; }
164166

165167
virtual void write_fragment(HtmlWriter &out, WritingState &state) const = 0;
@@ -172,16 +174,32 @@ class HtmlFragmentBase {
172174

173175
protected:
174176
std::string m_name;
177+
std::size_t m_index = 0;
175178
std::string m_path;
176179
Document m_document;
177180
};
178181

179-
class HtmlFragmentView final : public HtmlView {
182+
class HtmlFragmentView final : public abstract::HtmlView {
180183
public:
181-
HtmlFragmentView(const abstract::HtmlService &service, std::string name,
182-
std::string path, std::shared_ptr<HtmlFragmentBase> fragment)
183-
: HtmlView(service, std::move(name), std::move(path)),
184-
m_fragment{std::move(fragment)} {}
184+
HtmlFragmentView(const abstract::HtmlService &service,
185+
std::shared_ptr<HtmlFragmentBase> fragment)
186+
: m_service{&service}, m_fragment{std::move(fragment)} {}
187+
188+
[[nodiscard]] const std::string &name() const override {
189+
return m_fragment->name();
190+
}
191+
[[nodiscard]] std::size_t index() const override {
192+
return m_fragment->index();
193+
}
194+
[[nodiscard]] const std::string &path() const override {
195+
return m_fragment->path();
196+
}
197+
[[nodiscard]] const HtmlConfig &config() const override {
198+
return m_service->config();
199+
}
200+
[[nodiscard]] const abstract::HtmlService &service() const {
201+
return *m_service;
202+
}
185203

186204
HtmlResources write_html(HtmlWriter &out) const override {
187205
HtmlResources resources;
@@ -191,6 +209,7 @@ class HtmlFragmentView final : public HtmlView {
191209
}
192210

193211
private:
212+
const abstract::HtmlService *m_service = nullptr;
194213
std::shared_ptr<HtmlFragmentBase> m_fragment;
195214
};
196215

@@ -202,13 +221,12 @@ class HtmlServiceImpl final : public HtmlService {
202221
: HtmlService(std::move(config), std::move(logger)),
203222
m_document{std::move(document)}, m_fragments{std::move(fragments)} {
204223
m_views.emplace_back(
205-
std::make_shared<HtmlView>(*this, "document", "document.html"));
224+
std::make_shared<HtmlView>(*this, "document", 0, "document.html"));
206225
for (const auto &fragment : m_fragments) {
207226
if (fragment->name() == "document") {
208227
continue;
209228
}
210-
m_views.emplace_back(std::make_shared<HtmlFragmentView>(
211-
*this, fragment->name(), fragment->path(), fragment));
229+
m_views.emplace_back(std::make_shared<HtmlFragmentView>(*this, fragment));
212230
}
213231
}
214232

@@ -328,9 +346,9 @@ class HtmlServiceImpl final : public HtmlService {
328346

329347
class TextHtmlFragment final : public HtmlFragmentBase {
330348
public:
331-
explicit TextHtmlFragment(std::string name, std::string path,
332-
Document document)
333-
: HtmlFragmentBase(std::move(name), std::move(path),
349+
explicit TextHtmlFragment(std::string name, const std::size_t index,
350+
std::string path, Document document)
351+
: HtmlFragmentBase(std::move(name), index, std::move(path),
334352
std::move(document)) {}
335353

336354
void write_fragment(HtmlWriter &out, WritingState &state) const override {
@@ -364,9 +382,11 @@ class TextHtmlFragment final : public HtmlFragmentBase {
364382

365383
class SlideHtmlFragment final : public HtmlFragmentBase {
366384
public:
367-
explicit SlideHtmlFragment(std::string name, std::string path,
368-
Document document, const Slide &slide)
369-
: HtmlFragmentBase(std::move(name), std::move(path), std::move(document)),
385+
explicit SlideHtmlFragment(std::string name, const std::size_t index,
386+
std::string path, Document document,
387+
const Slide &slide)
388+
: HtmlFragmentBase(std::move(name), index, std::move(path),
389+
std::move(document)),
370390
m_slide{slide} {}
371391

372392
void write_fragment(HtmlWriter &, WritingState &state) const override {
@@ -379,9 +399,11 @@ class SlideHtmlFragment final : public HtmlFragmentBase {
379399

380400
class SheetHtmlFragment final : public HtmlFragmentBase {
381401
public:
382-
explicit SheetHtmlFragment(std::string name, std::string path,
383-
Document document, const Sheet &sheet)
384-
: HtmlFragmentBase(std::move(name), std::move(path), std::move(document)),
402+
explicit SheetHtmlFragment(std::string name, const std::size_t index,
403+
std::string path, Document document,
404+
const Sheet &sheet)
405+
: HtmlFragmentBase(std::move(name), index, std::move(path),
406+
std::move(document)),
385407
m_sheet{sheet} {}
386408

387409
void write_fragment(HtmlWriter &, WritingState &state) const override {
@@ -394,9 +416,11 @@ class SheetHtmlFragment final : public HtmlFragmentBase {
394416

395417
class PageHtmlFragment final : public HtmlFragmentBase {
396418
public:
397-
explicit PageHtmlFragment(std::string name, std::string path,
398-
Document document, const Page &page)
399-
: HtmlFragmentBase(std::move(name), std::move(path), std::move(document)),
419+
explicit PageHtmlFragment(std::string name, const std::size_t index,
420+
std::string path, Document document,
421+
const Page &page)
422+
: HtmlFragmentBase(std::move(name), index, std::move(path),
423+
std::move(document)),
400424
m_page{page} {}
401425

402426
void write_fragment(HtmlWriter &, WritingState &state) const override {
@@ -419,32 +443,35 @@ odr::HtmlService html::create_document_service(
419443

420444
if (document.document_type() == DocumentType::text) {
421445
fragments.push_back(std::make_unique<TextHtmlFragment>(
422-
"document", config.document_output_file_name, document));
446+
"document", 0, config.document_output_file_name, document));
423447
} else if (document.document_type() == DocumentType::presentation) {
424448
std::size_t i = 0;
425-
for (auto child : document.root_element().children()) {
449+
for (Element child : document.root_element().children()) {
450+
Slide slide = child.as_slide();
426451
fragments.push_back(std::make_unique<SlideHtmlFragment>(
427-
"slide" + std::to_string(i),
452+
slide.name(), i + 1,
428453
fill_path_variables(config.slide_output_file_name, i), document,
429-
child.as_slide()));
454+
slide));
430455
++i;
431456
}
432457
} else if (document.document_type() == DocumentType::spreadsheet) {
433458
std::size_t i = 0;
434-
for (auto child : document.root_element().children()) {
459+
for (Element child : document.root_element().children()) {
460+
Sheet sheet = child.as_sheet();
435461
fragments.push_back(std::make_unique<SheetHtmlFragment>(
436-
"sheet" + std::to_string(i),
462+
sheet.name(), i + 1,
437463
fill_path_variables(config.sheet_output_file_name, i), document,
438-
child.as_sheet()));
464+
sheet));
439465
++i;
440466
}
441467
} else if (document.document_type() == DocumentType::drawing) {
442468
std::size_t i = 0;
443-
for (auto child : document.root_element().children()) {
469+
for (Element child : document.root_element().children()) {
470+
Page page = child.as_page();
444471
fragments.push_back(std::make_unique<PageHtmlFragment>(
445-
"page" + std::to_string(i),
472+
page.name(), i + 1,
446473
fill_path_variables(config.page_output_file_name, i), document,
447-
child.as_page()));
474+
page));
448475
++i;
449476
}
450477
} else {

src/odr/internal/html/filesystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class HtmlServiceImpl final : public HtmlService {
2020
: HtmlService(std::move(config), std::move(logger)),
2121
m_filesystem{std::move(filesystem)} {
2222
m_views.emplace_back(
23-
std::make_shared<HtmlView>(*this, "files", "files.html"));
23+
std::make_shared<HtmlView>(*this, "files", 0, "files.html"));
2424
}
2525

2626
void warmup() const override {}

src/odr/internal/html/html_service.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ HtmlService::HtmlService(HtmlConfig config, std::shared_ptr<Logger> logger)
1212
const HtmlConfig &HtmlService::config() const { return m_config; }
1313

1414
HtmlView::HtmlView(const abstract::HtmlService &service, std::string name,
15-
std::string path)
16-
: m_service{&service}, m_name{std::move(name)}, m_path{std::move(path)} {}
15+
std::size_t index, std::string path)
16+
: m_service{&service}, m_name{std::move(name)}, m_index{index},
17+
m_path{std::move(path)} {}
1718

1819
const std::string &HtmlView::name() const { return m_name; }
1920

21+
std::size_t HtmlView::index() const { return m_index; }
22+
2023
const std::string &HtmlView::path() const { return m_path; }
2124

2225
const HtmlConfig &HtmlView::config() const { return m_service->config(); }

0 commit comments

Comments
 (0)