diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-17 01:39:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-17 01:39:45 +0100 |
| commit | 28ab65a9d625e03753cd40e22d9f991d59460a16 (patch) | |
| tree | 0e069ed40bb9b2c53edf45dcd10b05d1719e9519 /src/pkl.cc | |
| parent | 5eb0ff8f094517ab6d82751288a69c8fcea74eb1 (diff) | |
Use PKL types rather than file extensions.
Diffstat (limited to 'src/pkl.cc')
| -rw-r--r-- | src/pkl.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -38,6 +38,7 @@ #include "dcp_assert.h" #include <libxml++/libxml++.h> #include <boost/foreach.hpp> +#include <iostream> using std::string; using boost::shared_ptr; @@ -125,3 +126,15 @@ PKL::hash (string id) const DCP_ASSERT (false); } + +string +PKL::type (string id) const +{ + BOOST_FOREACH (shared_ptr<Asset> i, _asset_list) { + if (i->id() == id) { + return i->type; + } + } + + DCP_ASSERT (false); +} |
