diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-10 14:19:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-11 13:25:52 +0200 |
commit | aae6d7557950c19d22b7d09fae26f3d20db75a22 (patch) | |
tree | 3ef10cd2b05eef0b2f2d387a1838cd6aa835ad68 /brep | |
parent | a90ce0f4ff27c6994fe3e7827baaebf4e510cffb (diff) |
Location member added to brep::package_version class
Diffstat (limited to 'brep')
-rw-r--r-- | brep/package | 11 | ||||
-rw-r--r-- | brep/package.cxx | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/brep/package b/brep/package index 45660a6..0132b73 100644 --- a/brep/package +++ b/brep/package @@ -80,6 +80,13 @@ namespace brep #pragma db map type(path) as(std::string) \ to((?).string ()) from(brep::path (?)) + using optional_path = optional<path>; + using optional_string = optional<std::string>; + + #pragma db map type(optional_path) as(brep::optional_string) \ + to((?) ? (?)->string () : brep::optional_string ()) \ + from((?) ? brep::path (*(?)) : brep::optional_path ()) + using dir_path = butl::dir_path; #pragma db map type(dir_path) as(std::string) \ @@ -352,7 +359,8 @@ namespace brep license_alternatives_type, std::string changes, dependencies_type, - requirements_type); + requirements_type, + optional<path> location); // Manifest data. // @@ -364,6 +372,7 @@ namespace brep std::string changes; dependencies_type dependencies; requirements_type requirements; + optional<path> location; // Database mapping. // diff --git a/brep/package.cxx b/brep/package.cxx index 585a0b5..215754f 100644 --- a/brep/package.cxx +++ b/brep/package.cxx @@ -62,7 +62,8 @@ namespace brep license_alternatives_type la, string ch, dependencies_type dp, - requirements_type rq) + requirements_type rq, + optional<path> lc) : repository (move (rp)), package (move (pk)), version (move (vr)), @@ -70,7 +71,8 @@ namespace brep license_alternatives (move (la)), changes (move (ch)), dependencies (move (dp)), - requirements (move (rq)) + requirements (move (rq)), + location (move (lc)) { } |