]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/item.hh
Issue 4141/1: Define inline members unsmob and is_smob for several derived classes
[lilypond.git] / lily / include / item.hh
index bae549594cecf1976ee4f14ef2eb0c105d30d5df..9342d6f981700db69ba3461b15e821016edd7692 100644 (file)
@@ -36,6 +36,13 @@ public:
   Item (SCM);
   Item (Item const &);
 
+  static Item *unsmob (SCM g) {
+    return dynamic_cast <Item *> (Grob::unsmob (g));
+  }
+  static bool is_smob (SCM g) {
+    return Grob::is_smob (g) && unsmob (g);
+  }
+
   virtual Grob *clone () const;
 
   static bool is_non_musical (Grob *);