*/
+#include "asset_list.h"
#include "object.h"
-#include "types.h"
#include <libcxml/cxml.h>
#include <boost/filesystem.hpp>
#include <boost/optional.hpp>
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);
- boost::optional<boost::filesystem::path> path() const {
- return _path;
+ boost::optional<boost::filesystem::path> file() const {
+ return _file;
}
std::map<std::string, boost::filesystem::path> asset_ids_and_paths() const;
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);
bool _pkl = false;
};
+ std::vector<Asset> assets() const {
+ return _assets;
+ }
+
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;
+ mutable boost::optional<boost::filesystem::path> _file;
};