summaryrefslogtreecommitdiff
path: root/src/asset_map.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-25 23:49:00 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-25 23:49:00 +0200
commitc7a9a5c9e368b1a5e657adbebd37d1bbc4984e62 (patch)
tree0debc863f39ad74f645ad495e3ca693862eef6de /src/asset_map.h
parentef9671811920cbef50f0f01d063eab418de8925e (diff)
Add AssetList to extract some boilerplate from AssetMap and PKL.
Diffstat (limited to 'src/asset_map.h')
-rw-r--r--src/asset_map.h36
1 files changed, 4 insertions, 32 deletions
diff --git a/src/asset_map.h b/src/asset_map.h
index cf91a95b..733dadab 100644
--- a/src/asset_map.h
+++ b/src/asset_map.h
@@ -32,6 +32,7 @@
*/
+#include "asset_list.h"
#include "object.h"
#include "types.h"
#include <libcxml/cxml.h>
@@ -44,16 +45,12 @@
namespace dcp {
-class AssetMap : public Object
+class AssetMap : public Object, public AssetList
{
public:
AssetMap(Standard standard, boost::optional<std::string> annotation_text, std::string issue_date, std::string issuer, std::string creator)
- : _standard(standard)
- , _annotation_text(annotation_text)
- , _issue_date(issue_date)
- , _issuer(issuer)
- , _creator(creator)
- {}
+ : AssetList(standard, annotation_text, issue_date, issuer, creator)
+ {}
explicit AssetMap(boost::filesystem::path path);
@@ -65,26 +62,6 @@ public:
std::vector<boost::filesystem::path> pkl_paths() const;
- dcp::Standard standard() const {
- return _standard;
- }
-
- void set_annotation_text(std::string annotation_text) {
- _annotation_text = annotation_text;
- }
-
- void set_issue_date(std::string issue_date) {
- _issue_date = issue_date;
- }
-
- void set_issuer(std::string issuer) {
- _issuer = issuer;
- }
-
- void set_creator(std::string creator) {
- _creator = creator;
- }
-
void clear_assets();
void add_asset(std::string id, boost::filesystem::path path, bool pkl);
@@ -117,11 +94,6 @@ public:
};
private:
- dcp::Standard _standard;
- boost::optional<std::string> _annotation_text;
- std::string _issue_date;
- std::string _issuer;
- std::string _creator;
std::vector<Asset> _assets;
mutable boost::optional<boost::filesystem::path> _path;
};