diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-05 01:24:19 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-05 01:24:19 +0000 |
| commit | 5ee3348142f4cfafdbcf2c9c833843d717affc11 (patch) | |
| tree | 1c97c80eeccc6b5f515a611e35dee35b21d3b09b /src/package.h | |
| parent | 740938890d95e853cf13d4780a5d674c3d6c7f6f (diff) | |
Various IMF hacks.imf
Diffstat (limited to 'src/package.h')
| -rw-r--r-- | src/package.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/package.h b/src/package.h index 324998e5..610b7637 100644 --- a/src/package.h +++ b/src/package.h @@ -27,8 +27,10 @@ #include "types.h" #include "certificate.h" #include "metadata.h" +#include "dcp_assert.h" #include <boost/shared_ptr.hpp> #include <boost/signals2.hpp> +#include <boost/foreach.hpp> #include <string> #include <vector> @@ -111,6 +113,19 @@ protected: */ void write_assetmap (Standard standard, std::string pkl_uuid, int pkl_length, XMLMetadata metadata) const; + template <class T> + std::list<boost::shared_ptr<T> > + cpls_of_type () const + { + std::list<boost::shared_ptr<T> > cpls; + BOOST_FOREACH (boost::shared_ptr<CPL> i, _cpls) { + boost::shared_ptr<T> t = boost::dynamic_pointer_cast<T> (i); + DCP_ASSERT (t); + cpls.push_back (t); + } + return cpls; + } + /** the directory that we are writing to */ boost::filesystem::path _directory; /** the CPLs that make up this package */ |
