summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-12-17 18:22:40 +0100
committerCarl Hetherington <cth@carlh.net>2025-12-18 01:10:32 +0100
commit18446861340bfb301b2157e1ebc7fa532bd75952 (patch)
treee3ab3c5dd12302700a92d9327f13529235a70ac6
parenta8c0fd03be2ee810741fe7ab2063926ea8834e8b (diff)
Add can_be_read() to DCP.
-rw-r--r--src/dcp.cc9
-rw-r--r--src/dcp.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index a4ac3eb3..b9d23bad 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -691,3 +691,12 @@ DCP::cpl_summaries() const
return cpls;
}
+
+bool
+DCP::can_be_read() const
+{
+ auto c = cpls();
+ return std::all_of(c.begin(), c.end(), [](shared_ptr<const CPL> cpl) { return cpl->can_be_read(); });
+}
+
+
diff --git a/src/dcp.h b/src/dcp.h
index 4e706349..814116f7 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -204,6 +204,8 @@ public:
return _asset_map;
}
+ bool can_be_read() const;
+
static std::vector<boost::filesystem::path> directories_from_files (std::vector<boost::filesystem::path> files);
private: