diff options
Diffstat (limited to 'src/asset_map.cc')
| -rw-r--r-- | src/asset_map.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/asset_map.cc b/src/asset_map.cc index 3af2d6f8..31809c9b 100644 --- a/src/asset_map.cc +++ b/src/asset_map.cc @@ -24,6 +24,7 @@ #include "asset_map.h" using namespace std; +using namespace boost; using namespace libdcp; AssetMap::AssetMap (string file) @@ -54,3 +55,14 @@ Chunk::Chunk (xmlpp::Node const * node) length = optional_int64_node ("Length"); } +shared_ptr<AssetMapAsset> +AssetMap::asset_from_id (string id) const +{ + for (list<shared_ptr<AssetMapAsset> >::const_iterator i = assets.begin (); i != assets.end(); ++i) { + if ((*i)->id == id) { + return *i; + } + } + + return shared_ptr<AssetMapAsset> (); +} |
