aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-03-22 13:18:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-03-23 18:32:37 +0300
commit723a15c5390d0c5eb42f2082fcedb7262e7bc856 (patch)
tree7bef948322e2de710f44943e1e0dd621dc9b0d86 /libbpkg/manifest.hxx
parentc97dba3a4f2af33091112a347e181a5a2edc9914 (diff)
Add package_manifest::effective_type_sub_options()
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r--libbpkg/manifest.hxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index 1d45edf..c922cc4 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -1168,12 +1168,12 @@ namespace bpkg
butl::optional<std::string> sha256sum;
butl::optional<std::string> fragment;
- // Translate optional type to either `exe`, `lib`, or `other`.
+ // Extract the name from optional type, returning either `exe`, `lib`, or
+ // `other`.
//
- // Specifically, if type is present but is not one of the recognized
- // names, then return `other`. If type is absent and the package name
- // starts with the `lib` prefix, then return `lib`. Otherwise, return
- // `exe`.
+ // Specifically, if type is present but the name is not recognized, then
+ // return `other`. If type is absent and the package name starts with the
+ // `lib` prefix, then return `lib`. Otherwise, return `exe`.
//
std::string
effective_type () const;
@@ -1181,6 +1181,14 @@ namespace bpkg
static std::string
effective_type (const butl::optional<std::string>&, const package_name&);
+ // Extract sub-options from optional type.
+ //
+ strings
+ effective_type_sub_options () const;
+
+ static strings
+ effective_type_sub_options (const butl::optional<std::string>&);
+
// Translate the potentially empty list of languages to a non-empty one.
//
// Specifically, if the list of languages is not empty, then return it as