summaryrefslogtreecommitdiff
path: root/src/pkl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-17 01:39:45 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-17 01:39:45 +0100
commit28ab65a9d625e03753cd40e22d9f991d59460a16 (patch)
tree0e069ed40bb9b2c53edf45dcd10b05d1719e9519 /src/pkl.cc
parent5eb0ff8f094517ab6d82751288a69c8fcea74eb1 (diff)
Use PKL types rather than file extensions.
Diffstat (limited to 'src/pkl.cc')
-rw-r--r--src/pkl.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pkl.cc b/src/pkl.cc
index a46ab313..621cf465 100644
--- a/src/pkl.cc
+++ b/src/pkl.cc
@@ -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);
+}