summaryrefslogtreecommitdiff
path: root/src/reel_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-12 14:16:27 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-12 14:16:27 +0000
commit1bcf0b11634647a2a6b99330b2854704e5c1bc38 (patch)
tree941c8515af2eb63647f61c3dfd5ee2cd876cf6f3 /src/reel_asset.h
parent315f98667668ba59b80033429acf10fb3f4e13fe (diff)
Small cleanup.
Diffstat (limited to 'src/reel_asset.h')
-rw-r--r--src/reel_asset.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/reel_asset.h b/src/reel_asset.h
index 9211fbd1..4ad5b85b 100644
--- a/src/reel_asset.h
+++ b/src/reel_asset.h
@@ -85,6 +85,17 @@ public:
}
protected:
+
+ template <class T>
+ boost::shared_ptr<T> asset_of_type () const {
+ return boost::dynamic_pointer_cast<T> (_asset_ref.asset ());
+ }
+
+ template <class T>
+ boost::shared_ptr<T> asset_of_type () {
+ return boost::dynamic_pointer_cast<T> (_asset_ref.asset ());
+ }
+
/** @return the node name that this asset uses in the CPL's &lt;Reel&gt; node
* e.g. MainPicture, MainSound etc.
*/