#include "dcp_content_type.h"
#include "dcpomatic_assert.h"
-#include <boost/foreach.hpp>
#include "i18n.h"
DCPContentType const *
DCPContentType::from_isdcf_name (string n)
{
- BOOST_FOREACH (DCPContentType const * i, _dcp_content_types) {
+ for (auto i: _dcp_content_types) {
if (i->isdcf_name() == n) {
return i;
}
return 0;
}
+DCPContentType const *
+DCPContentType::from_libdcp_kind (dcp::ContentKind kind)
+{
+ for (auto i: _dcp_content_types) {
+ if (i->libdcp_kind() == kind) {
+ return i;
+ }
+ }
+
+ DCPOMATIC_ASSERT (false);
+ return 0;
+}
+
+
DCPContentType const *
DCPContentType::from_index (int n)
{