diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-11 15:51:59 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-11 16:51:21 +0300 |
commit | 6a41864fdb57c75be3db87b357063b0c828dbc18 (patch) | |
tree | b2f9a56555cd7b642529842013528c95072cd606 /mod/page.hxx | |
parent | 21033565488f6c63b4c40962cccfdc8b6ca32b2a (diff) |
Add support for package project manifest value
Diffstat (limited to 'mod/page.hxx')
-rw-r--r-- | mod/page.hxx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/mod/page.hxx b/mod/page.hxx index 2b8c31f..759984e 100644 --- a/mod/page.hxx +++ b/mod/page.hxx @@ -210,6 +210,25 @@ namespace brep const dir_path* root_; }; + // Generates package project name element. + // + // Displays a link to the package search page with the project name + // specified as a keyword. + // + class TR_PROJECT + { + public: + TR_PROJECT (const package_name& p, const dir_path& r) + : project_ (p), root_ (r) {} + + void + operator() (xml::serializer&) const; + + private: + const package_name& project_; + const dir_path& root_; + }; + // Generates package summary element. // class TR_SUMMARY @@ -258,12 +277,22 @@ namespace brep class TR_TAGS { public: - TR_TAGS (const strings& ts, const dir_path& r): tags_ (ts), root_ (r) {} + // Display the tag link list. + // + TR_TAGS (const strings& ts, const dir_path& r) + : project_ (nullptr), tags_ (ts), root_ (r) {} + + // As above but prepend the list with a tag link produced from the project + // name, if it differs from other tags. + // + TR_TAGS (const package_name& pr, const strings& ts, const dir_path& r) + : project_ (&pr), tags_ (ts), root_ (r) {} void operator() (xml::serializer&) const; private: + const package_name* project_; const strings& tags_; const dir_path& root_; }; |