]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4541 (2/2) Clean up...
authorDan Eble <nine.fierce.ballads@gmail.com>
Sat, 8 Aug 2015 00:21:50 +0000 (20:21 -0400)
committerDan Eble <nine.fierce.ballads@gmail.com>
Fri, 14 Aug 2015 21:21:18 +0000 (17:21 -0400)
* Use has_interface<Interface> (grob)
* Remove DECLARE_GROB_INTERFACE()

Edits to grob-interface.hh are manual and the rest is the result of
the following script.

for FILE in $(git grep -lw DECLARE_GROB_INTERFACE lily)
do
    sed -i "/^ *DECLARE_GROB_INTERFACE ();.*$/d" $FILE
done

for FILE in $(git grep -lw "has_interface" lily)
do
    if [ $FILE == lily/include/grob-interface.hh ] ; then continue ; fi

    sed -i "s/\\([_a-zA-Z]\\+\\)::has_interface\\>/has_interface<\\1>/g
s/\\([_a-zA-Z]\\+\\) && has_interface<\\([_a-zA-Z]\\+\\)> (\\1)/has_interface<\\2> (\\1)/g" $FILE
done

132 files changed:
lily/accidental-placement.cc
lily/align-interface.cc
lily/axis-group-interface.cc
lily/balloon.cc
lily/beam-collision-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/break-alignment-interface.cc
lily/clef-modifier.cc
lily/cluster-engraver.cc
lily/cluster.cc
lily/collision-engraver.cc
lily/dot-column.cc
lily/dynamic-align-engraver.cc
lily/dynamic-engraver.cc
lily/enclosing-bracket.cc
lily/figured-bass-continuation.cc
lily/flag.cc
lily/grob.cc
lily/hairpin.cc
lily/include/accidental-interface.hh
lily/include/accidental-placement.hh
lily/include/align-interface.hh
lily/include/arpeggio.hh
lily/include/axis-group-interface.hh
lily/include/bar-line.hh
lily/include/beam.hh
lily/include/break-align-interface.hh
lily/include/breathing-sign.hh
lily/include/chord-name.hh
lily/include/clef.hh
lily/include/cluster.hh
lily/include/custos.hh
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/fingering-column.hh
lily/include/font-interface.hh
lily/include/gregorian-ligature.hh
lily/include/grid-line-interface.hh
lily/include/grob-interface.hh
lily/include/grob.hh
lily/include/hairpin.hh
lily/include/hara-kiri-group-spanner.hh
lily/include/horizontal-bracket.hh
lily/include/item.hh
lily/include/kievan-ligature.hh
lily/include/line-interface.hh
lily/include/lyric-extender.hh
lily/include/lyric-hyphen.hh
lily/include/measure-grouping-spanner.hh
lily/include/melody-spanner.hh
lily/include/mensural-ligature.hh
lily/include/multi-measure-rest.hh
lily/include/note-collision.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/note-spacing.hh
lily/include/paper-column.hh
lily/include/percent-repeat-item.hh
lily/include/pure-from-neighbor-interface.hh
lily/include/rest-collision.hh
lily/include/rest.hh
lily/include/rhythmic-head.hh
lily/include/script-column.hh
lily/include/script-interface.hh
lily/include/self-alignment-interface.hh
lily/include/semi-tie-column.hh
lily/include/semi-tie.hh
lily/include/separation-item.hh
lily/include/side-position-interface.hh
lily/include/slur.hh
lily/include/spaceable-grob.hh
lily/include/spacing-interface.hh
lily/include/spacing-spanner.hh
lily/include/spanner.hh
lily/include/staff-grouper-interface.hh
lily/include/staff-spacing.hh
lily/include/staff-symbol-referencer.hh
lily/include/staff-symbol.hh
lily/include/stem-tremolo.hh
lily/include/stem.hh
lily/include/system-start-delimiter.hh
lily/include/system.hh
lily/include/text-interface.hh
lily/include/tie-column.hh
lily/include/tie.hh
lily/include/tuplet-bracket.hh
lily/include/tuplet-number.hh
lily/include/vaticana-ligature.hh
lily/include/volta-bracket.hh
lily/instrument-name-engraver.cc
lily/key-signature-interface.cc
lily/ledger-line-spanner.cc
lily/line-spanner.cc
lily/lyric-engraver.cc
lily/note-collision.cc
lily/note-column.cc
lily/note-spacing.cc
lily/ottava-bracket.cc
lily/page-layout-problem.cc
lily/paper-column-engraver.cc
lily/paper-column.cc
lily/piano-pedal-bracket.cc
lily/pure-from-neighbor-engraver.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/script-column.cc
lily/script-interface.cc
lily/script-row-engraver.cc
lily/self-alignment-interface.cc
lily/semi-tie.cc
lily/separating-line-group-engraver.cc
lily/separation-item.cc
lily/side-position-interface.cc
lily/slur-configuration.cc
lily/slur-scoring.cc
lily/slur.cc
lily/spacing-determine-loose-columns.cc
lily/spacing-interface.cc
lily/spacing-loose-columns.cc
lily/spacing-spanner.cc
lily/staff-spacing.cc
lily/staff-symbol-referencer.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/system.cc
lily/tie-column.cc
lily/tie-formatting-problem.cc
lily/tie.cc
lily/tuplet-bracket.cc
lily/tuplet-number.cc
lily/vertical-align-engraver.cc

index 32eb54fac7e94c9b915858bb7f33331e334b7d95..f8a0967954c8e106a8a218daa41052ff37cfc29a 100644 (file)
@@ -313,7 +313,7 @@ extract_heads_and_stems (vector<Accidental_placement_entry *> const &apes)
           Grob *head = acc->get_parent (Y_AXIS);
           Grob *col = head->get_parent (X_AXIS);
 
-          if (Note_column::has_interface (col))
+          if (has_interface<Note_column> (col))
             note_cols.push_back (col);
           else
             ret.push_back (head);
@@ -327,7 +327,7 @@ extract_heads_and_stems (vector<Accidental_placement_entry *> const &apes)
   for (vsize i = note_cols.size (); i--;)
     {
       Grob *c = note_cols[i]->get_parent (X_AXIS);
-      if (Note_collision_interface::has_interface (c))
+      if (has_interface<Note_collision_interface> (c))
         {
           extract_grob_set (c, "elements", columns);
           concat (note_cols, columns);
index 0c140235dc97d044f96f48288d5a92c26547edfc..80a9dd3c081f043713b8d8debe07482aeffe02e3 100644 (file)
@@ -106,7 +106,7 @@ get_skylines (Grob *g,
       // of the system. This way, the tall treble clefs are only compared with the treble
       // clefs of the other staff and they will be ignored if the staff above is, for example,
       // lyrics.
-      if (Axis_group_interface::has_interface (g))
+      if (has_interface<Axis_group_interface> (g))
         {
           extent = Axis_group_interface::rest_of_line_pure_height (g, start, end);
           Interval begin_of_line_extent = Axis_group_interface::begin_of_line_pure_height (g, start);
index 09f6ab471be1d31cd94f26cd236a0e56e515184d..c9c56858a17a071bb38a7038820bee6812b8c4f3 100644 (file)
@@ -101,7 +101,7 @@ Axis_group_interface::relative_maybe_bound_group_extent (vector<Grob *> const &e
       Grob *se = elts[i];
       if (!to_boolean (se->get_property ("cross-staff")))
         {
-          Interval dims = (bound && Axis_group_interface::has_interface (se)
+          Interval dims = (bound && has_interface<Axis_group_interface> (se)
                            ? generic_bound_extent (se, common, a)
                            : se->extent (common, a));
           if (!dims.is_empty ())
@@ -330,7 +330,7 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end)
      reasonably safe to assume that if our parent is a VerticalAlignment,
      we can assume additivity and cache things nicely. */
   Grob *p = me->get_parent (Y_AXIS);
-  if (p && Align_interface::has_interface (p))
+  if (has_interface<Align_interface> (p))
     return Axis_group_interface::sum_partial_pure_heights (me, start, end);
 
   Grob *common = unsmob<Grob> (me->get_object ("pure-Y-common"));
@@ -344,7 +344,7 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end)
       if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start
           && g->pure_is_visible (start, end)
           && !(to_boolean (g->get_property ("cross-staff"))
-               && Stem::has_interface (g)))
+               && has_interface<Stem> (g)))
         {
           Interval dims = g->pure_y_extent (common, start, end);
           if (!dims.is_empty ())
@@ -443,7 +443,7 @@ Axis_group_interface::generic_group_extent (Grob *me, Axis a)
   /* trigger the callback to do skyline-spacing on the children */
   if (a == Y_AXIS)
     for (vsize i = 0; i < elts.size (); i++)
-      if (!(Stem::has_interface (elts[i])
+      if (!(has_interface<Stem> (elts[i])
             && to_boolean (elts[i]->get_property ("cross-staff"))))
         (void) elts[i]->get_property ("vertical-skylines");
 
@@ -535,7 +535,7 @@ Axis_group_interface::calc_pure_y_common (SCM smob)
 
   extract_grob_set (me, "pure-relevant-grobs", elts);
   Grob *common = common_refpoint_of_array (elts, me, Y_AXIS);
-  if (common != me && Align_interface::has_interface (common))
+  if (common != me && has_interface<Align_interface> (common))
     {
       me->programming_error("My pure_y_common is a VerticalAlignment,"
                             " which might contain several staves.");
@@ -599,7 +599,7 @@ Axis_group_interface::get_children (Grob *me, vector<Grob *> *found)
 {
   found->push_back (me);
 
-  if (!Axis_group_interface::has_interface (me))
+  if (!has_interface<Axis_group_interface> (me))
     return;
 
   extract_grob_set (me, "elements", elements);
index 7e8067a577ac5db20ceb8129e977a2edf27ee819..d8519f6e39345bfd45f8a08dab5e7c0597534bd1 100644 (file)
@@ -33,7 +33,6 @@ class Balloon_interface
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (print_spanner, (SCM));
-  DECLARE_GROB_INTERFACE ();
 
   static SCM internal_balloon_print (Grob *me, Grob *p, Offset off);
 };
index bb8e42e1cf19d9c95f75f1336bd95bcb7156e8b9..151ffacf16eab597378664eeb3d84a74f7ce5229 100644 (file)
@@ -115,12 +115,12 @@ Beam_collision_engraver::finalize ()
           if ((covered_grob_spanned_rank[RIGHT] >= beam_spanned_rank_[LEFT])
               && !(to_boolean (beam_grob->get_property ("collision-voice-only"))
                    && (covered_grob_context != beam_context))
-              && !(Beam::has_interface (covered_grob)
+              && !(has_interface<Beam> (covered_grob)
                    && (covered_grob_spanned_rank[LEFT] <= beam_spanned_rank_[LEFT]))
               && covered_grob_has_interface (covered_grob, beam_grob))
             {
               // Do not consider note heads attached to the beam.
-              if (Stem::has_interface (covered_grob))
+              if (has_interface<Stem> (covered_grob))
                 if (unsmob<Grob> (covered_grob->get_object ("beam")))
                   continue;
 
index 856d8be0b6cf6338e46a20acb5d011701906adbf..f3505772f1a70940c4deb9014d400b9158e485a2 100644 (file)
@@ -305,7 +305,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
         edge_dirs_ = Drul_array<Direction> (stem_infos_[0].dir_,
                                             stem_infos_.back ().dir_);
 
-      is_xstaff_ = Align_interface::has_interface (common[Y_AXIS]);
+      is_xstaff_ = has_interface<Align_interface> (common[Y_AXIS]);
       is_knee_ |= dirs_found[DOWN] && dirs_found[UP];
 
       staff_radius_ = Staff_symbol_referencer::staff_radius (beams[i]);
@@ -343,7 +343,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
           if (!collisions[j]->is_live ())
             continue;
 
-          if (Beam::has_interface (collisions[j]) && Beam::is_cross_staff (collisions[j]))
+          if (has_interface<Beam> (collisions[j]) && Beam::is_cross_staff (collisions[j]))
             continue;
 
           Box b;
@@ -364,7 +364,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
             add_collision (b[X_AXIS][d], b[Y_AXIS], width_factor);
 
           Grob *stem = unsmob<Grob> (collisions[j]->get_object ("stem"));
-          if (stem && Stem::has_interface (stem) && Stem::is_normal_stem (stem))
+          if (has_interface<Stem> (stem) && Stem::is_normal_stem (stem))
             {
               colliding_stems.insert (stem);
             }
index c18c3d8430be70e4b0ccccaf4584283aef3ad913..206f6e9f4dfb4ff9f5a442f19596f80e17cef7e9 100644 (file)
@@ -1232,7 +1232,7 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset)
     return scm_from_double (0.0);
   Grob *beam = unsmob<Grob> (stem->get_object ("beam"));
   if (!beam
-      || !Beam::has_interface (beam)
+      || !has_interface<Beam> (beam)
       || !Beam::normal_stem_count (beam))
     return scm_from_double (0.0);
 
index 58cb488d6b920efd83d21efbe841f9af8d7770fc..e2a546f6a676ed1ecbbbc85ef56414aea512e0a2 100644 (file)
@@ -263,7 +263,7 @@ Break_alignable_interface::self_align_callback (SCM grob)
 {
   Grob *me = unsmob<Grob> (grob);
   Item *alignment = dynamic_cast<Item *> (me->get_parent (X_AXIS));
-  if (!Break_alignment_interface::has_interface (alignment))
+  if (!has_interface<Break_alignment_interface> (alignment))
     return scm_from_int (0);
 
   SCM symbol_list = me->get_property ("break-align-symbols");
index 4c24dd356e0473a9aa98ee603ff729798807bd18..c6ce950fc04a64ab5a6abf28bdaa05fda706876f 100644 (file)
@@ -22,7 +22,6 @@
 struct Clef_modifier
 {
   DECLARE_SCHEME_CALLBACK (calc_parent_alignment, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 MAKE_SCHEME_CALLBACK (Clef_modifier, calc_parent_alignment, 1)
index 8af3137f90e9c21f5db4f3f9839afac418d0c767..bb5ed0dc54da0b6f79b430afb227b2bb35682ab7 100644 (file)
@@ -135,7 +135,7 @@ Cluster_spanner_engraver::stop_translation_timestep ()
 void
 Cluster_spanner_engraver::acknowledge_note_column (Grob_info info)
 {
-  if (!beacon_ && Note_column::has_interface (info.grob ()))
+  if (!beacon_ && has_interface<Note_column> (info.grob ()))
     {
       finished_spanner_ = spanner_;
       spanner_ = 0;
index 694da482a5fba6cb4de806fd06963e43e5b723b1..9c160fd8ccb4037aee24480a5581078e997208bd 100644 (file)
@@ -228,7 +228,6 @@ struct Cluster_beacon
 {
 public:
   DECLARE_SCHEME_CALLBACK (height, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);
index d2cf95e1e8515d33962325207af37dd59e456cb6..35f8015a68f34eb03309a419ffbc702a8ead34ab 100644 (file)
@@ -51,7 +51,7 @@ Collision_engraver::process_acknowledged ()
 void
 Collision_engraver::acknowledge_note_column (Grob_info i)
 {
-  if (Note_column::has_interface (i.grob ()))
+  if (has_interface<Note_column> (i.grob ()))
     {
       /*should check Y axis? */
       if (Note_column::has_rests (i.grob ()) || i.grob ()->get_parent (X_AXIS))
index b8f1663b1080cf9faeeb9cf7fb51f9f8b4842117..7ac3140141065c5a4b7fe359d8725d21a0cce230 100644 (file)
@@ -95,12 +95,12 @@ Dot_column::calc_positioning_done (SCM smob)
          Rest collisions should wait after line breaking.
       */
       Interval y;
-      if (Rest::has_interface (s))
+      if (has_interface<Rest> (s))
         {
           base_x.unite (s->extent (commonx, X_AXIS));
           continue;
         }
-      else if (Stem::has_interface (s))
+      else if (has_interface<Stem> (s))
         {
           Real y1 = Stem::head_positions (s)[-get_grob_direction (s)];
           Real y2 = y1 + get_grob_direction (s) * 7;
@@ -110,7 +110,7 @@ Dot_column::calc_positioning_done (SCM smob)
 
           stems.insert (s);
         }
-      else if (Note_head::has_interface (s))
+      else if (has_interface<Note_head> (s))
         y = Interval (-1.1, 1.1);
       else
         {
@@ -200,7 +200,7 @@ Dot_column::calc_positioning_done (SCM smob)
       Grob *note = dots[i]->get_parent (Y_AXIS);
       if (note)
         {
-          if (Note_head::has_interface (note))
+          if (has_interface<Note_head> (note))
             dp.dir_ = to_dir (dp.dot_->get_property ("direction"));
 
           dp.x_extent_ = note->extent (commonx, X_AXIS);
@@ -252,7 +252,7 @@ Dot_column::add_head (Grob *me, Grob *head)
       // correct X-offset of the dots for horizontal collision avoidance.
       // The translation here is undone in calc_positioning_done, where we
       // do the X-offset properly.
-      if (Rest::has_interface (head))
+      if (has_interface<Rest> (head))
         d->translate_axis (head->extent (head, X_AXIS).length (), X_AXIS);
       else
         d->set_property ("X-offset", Grob::x_parent_positioning_proc);
index 4a443dec5c7dfe1bb975e3d435c37e65c0cceb6d..0abb39a7f2614b5bd0ab79e488b2159e46890f14 100644 (file)
@@ -80,7 +80,7 @@ Dynamic_align_engraver::create_line_spanner (Grob *cause)
 void
 Dynamic_align_engraver::acknowledge_end_dynamic (Grob_info info)
 {
-  if (Spanner::has_interface (info.grob ()))
+  if (has_interface<Spanner> (info.grob ()))
     ended_.push_back (info.spanner ());
 
   /* If the break flag is set, store the current spanner and let new dynamics
@@ -141,7 +141,7 @@ Dynamic_align_engraver::acknowledge_dynamic (Grob_info info)
     }
 
   create_line_spanner (info.grob ());
-  if (Spanner::has_interface (info.grob ()))
+  if (has_interface<Spanner> (info.grob ()))
     {
       started_.push_back (info.spanner ());
       current_dynamic_spanner_ = info.spanner ();
index 4b51d904140e9f0a6e4d87d716a5c534cf174308..edfd35fcb5912652b08a46dd3548da3cc5866ac6 100644 (file)
@@ -179,11 +179,11 @@ Dynamic_engraver::process_music ()
         }
       if (finished_spanner_)
         {
-          if (Hairpin::has_interface (finished_spanner_))
+          if (has_interface<Hairpin> (finished_spanner_))
             Pointer_group_interface::add_grob (finished_spanner_,
                                                ly_symbol2scm ("adjacent-spanners"),
                                                current_spanner_);
-          if (Hairpin::has_interface (current_spanner_))
+          if (has_interface<Hairpin> (current_spanner_))
             Pointer_group_interface::add_grob (current_spanner_,
                                                ly_symbol2scm ("adjacent-spanners"),
                                                finished_spanner_);
index 57593649d30332b79cbf9b8583107212646ddb28..dd551e38414078c28ad515f4c57fec667af3da61 100644 (file)
@@ -26,7 +26,6 @@
 
 struct Enclosing_bracket
 {
-  DECLARE_GROB_INTERFACE ();
 
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
index 371c4d24babd3dd1ceec00976acb1ab50edf5988..bb84bb3c3ef73f510332a7c7f9222e6130e88fca 100644 (file)
@@ -30,7 +30,6 @@
 
 struct Figured_bass_continuation
 {
-  DECLARE_GROB_INTERFACE ();
 
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
index 7333bf299fd25c29eb4a28cfb15d39b9f556f56c..4b90be8be01a2395624067d2d64d04d9e230048d 100644 (file)
@@ -38,7 +38,6 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_y_offset, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_calc_y_offset, (SCM, SCM, SCM));
   DECLARE_SCHEME_CALLBACK (calc_x_offset, (SCM));
-  DECLARE_GROB_INTERFACE ();
 
   static SCM internal_calc_y_offset (SCM smob, bool pure);
 };
index 83b78edac4c7db74e6f8ca5a0aaaebedfc600aa0..f7bf31f2868db17937bfa33d1a64b4d35d2c9602 100644 (file)
@@ -391,7 +391,7 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
   if (Grob *p = get_parent (Y_AXIS))
     {
       Real trans = 0;
-      if (Align_interface::has_interface (p) && !dim_cache_[Y_AXIS].offset_)
+      if (has_interface<Align_interface> (p) && !dim_cache_[Y_AXIS].offset_)
         trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
 
       return off + trans + p->pure_relative_y_coordinate (refp, start, end);
@@ -638,7 +638,7 @@ get_maybe_root_vertical_alignment (Grob *g, Grob *maybe)
 {
   if (!g)
     return maybe;
-  if (Align_interface::has_interface (g))
+  if (has_interface<Align_interface> (g))
     return get_maybe_root_vertical_alignment (g->get_parent (Y_AXIS), g);
   return get_maybe_root_vertical_alignment (g->get_parent (Y_AXIS), maybe);
 
@@ -657,8 +657,8 @@ Grob::get_vertical_axis_group (Grob *g)
     return 0;
   if (!g->get_parent (Y_AXIS))
     return 0;
-  if (Axis_group_interface::has_interface (g)
-      && Align_interface::has_interface (g->get_parent (Y_AXIS)))
+  if (has_interface<Axis_group_interface> (g)
+      && has_interface<Align_interface> (g->get_parent (Y_AXIS)))
     return g;
   return get_vertical_axis_group (g->get_parent (Y_AXIS));
 
@@ -965,11 +965,11 @@ robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
 bool
 Grob::check_cross_staff (Grob *commony)
 {
-  if (Align_interface::has_interface (commony))
+  if (has_interface<Align_interface> (commony))
     return true;
 
   for (Grob *g = this; g && g != commony; g = g->get_parent (Y_AXIS))
-    if (Align_interface::has_interface (g))
+    if (has_interface<Align_interface> (g))
       return true;
 
   return false;
index a083062e392499c72bf4523a5f7b1e6fa9f6c325..01d8fd93dea61f696d5af6a189244517f4fca622 100644 (file)
@@ -185,7 +185,7 @@ Hairpin::print (SCM smob)
         }
       else
         {
-          if (Text_interface::has_interface (b))
+          if (has_interface<Text_interface> (b))
             {
               if (!e.is_empty ())
                 x_points[d] = e[-d] - d * padding;
@@ -214,7 +214,7 @@ Hairpin::print (SCM smob)
 
               if (neighbor_found)
                 {
-                  if (Hairpin::has_interface (adjacent))
+                  if (has_interface<Hairpin> (adjacent))
                     {
                       /*
                         Handle back-to-back hairpins with a circle in the middle
@@ -237,7 +237,7 @@ Hairpin::print (SCM smob)
               else
                 {
                   if (d == RIGHT // end at the left edge of a rest
-                      && Note_column::has_interface (b)
+                      && has_interface<Note_column> (b)
                       && Note_column::has_rests (b))
                     x_points[d] = e[-d];
                   else
index f5c36c5583f3e9b732e9cf740a9c0576e916994f..ef5e07ea663fcb857cca2d48d6c6be6cbe89e40e 100644 (file)
@@ -34,7 +34,6 @@ public:
   DECLARE_SCHEME_CALLBACK (height, (SCM));
   DECLARE_SCHEME_CALLBACK (remove_tied, (SCM));
 
-  DECLARE_GROB_INTERFACE ();
   static SCM get_stencil (Grob *me);
 };
 
index bb47efdb0a8a6c9958851968d49b257b85c22e18..4c362cbd93d1c1df2d1ba0f4e77613e74257b253 100644 (file)
@@ -35,7 +35,6 @@ public:
                                  vector<Grob *> *real_acc);
 
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 #endif /* ACCIDENTAL_PLACEMENT_HH */
 
index 66548410f4b3484a0018d23a9223411514d825a0..612c31c0d5bef18fc53c35575bcec351180b4c27 100644 (file)
@@ -40,7 +40,6 @@ public:
   static void add_element (Grob *, Grob *);
   static int get_count (Grob *, Grob *);
 
-  DECLARE_GROB_INTERFACE ();
 
   static Real get_pure_child_y_translation (Grob *, Grob *child, int start, int end);
 
index 6a59b5600066400d5b6c2b415938733f663b0a40..46245290982a9ea94712d1e9c611585fa1977cf5 100644 (file)
@@ -34,7 +34,6 @@ public:
   DECLARE_SCHEME_CALLBACK (brew_chord_slur, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* ARPEGGIO_HH */
index 1987d9289bb0b3239184bcd9c95bdbd39508e3dc..5e5152d2378aa6e684c6c7e30f275f58eca8c711 100644 (file)
@@ -69,7 +69,6 @@ class Axis_group_interface
   static SCM calc_common (Grob *, Axis);
   static Real minimum_distance (Grob *, Grob *, Axis);
   static SCM calc_maybe_pure_staff_staff_spacing (Grob *, bool, int, int);
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* AXIS_GROUP_INTERFACE_HH */
index 1a157f3c447dad16f0c8230a4e0b3e6885f0c58c..ef3739faf007cd6cd72624b8ecbb08feaa07fb76 100644 (file)
@@ -26,7 +26,6 @@
 class Bar_line
 {
 public:
-  DECLARE_GROB_INTERFACE ();
 
   static bool non_empty_barline (Grob *me);
 };
index afa3a805ab71ca1a82e64516aeb83fbf464ba80f..6dbdf4b23f626b1958655695e8001f9908a4b4e7 100644 (file)
@@ -57,7 +57,6 @@ public:
   static int normal_stem_count (Grob *);
   static Grob *first_normal_stem (Grob *);
   static Grob *last_normal_stem (Grob *);
-  DECLARE_GROB_INTERFACE ();
   static void add_stem (Grob *, Grob *);
   static bool is_cross_staff (Grob *);
   static bool is_knee (Grob *);
index 5eba16efeece5218d6a5d016adc64d871311ad3f..cbb7f00c7441c2397043a8bb16fe781c8407b97e 100644 (file)
@@ -27,7 +27,6 @@ class Break_alignment_interface
 {
 public:
   static vector<Grob *> ordered_elements (Grob *me);
-  DECLARE_GROB_INTERFACE ();
   static void add_element (Grob *me, Grob *add);
   static SCM break_align_order (Item *me);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element));
@@ -38,13 +37,11 @@ struct Break_aligned_interface
   DECLARE_SCHEME_CALLBACK (calc_average_anchor, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_extent_aligned_anchor, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_break_visibility, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 struct Break_alignable_interface
 {
   DECLARE_SCHEME_CALLBACK (self_align_callback, (SCM element));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // BREAK_ALIGN_INTERFACE_HH
index 5718bf24733570f53b415e79098f83cfa47fd7a0..84b33cd1b3547d9ca9557b2691ba1e3139aead57 100644 (file)
@@ -27,7 +27,6 @@ public:
   DECLARE_SCHEME_CALLBACK (finalis, (SCM));
   DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element));
 
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // BREATHING_SIGN_HH
index 5a289e223f8190e244077c740c8c8ab64c70a45e..0df71f2fb47b39d23c91915bb7f68815bab15691 100644 (file)
@@ -27,7 +27,6 @@ class Chord_name
 {
 public:
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // CHORD_NAME_HH
index 240086ce8b3e573b54456022f7d779337995c58f..8e3d10c0d38d15e4c3fb38a7ed777a7d074d1dc4 100644 (file)
@@ -27,7 +27,6 @@ struct Clef
 {
   DECLARE_SCHEME_CALLBACK (calc_glyph_name, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* CLEF_HH */
index b9d6cf0e07898f5111bbf42a0c1caf9d84a2d199..81aec746f96f0936035495403e7f214badf56c2c 100644 (file)
@@ -28,7 +28,6 @@ class Cluster
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // CLUSTER_HH
index fcb9e9e146f610691eae67d064d3ecb267e94c45..ddf38b0b8aa6407605e8f1a576b5fc4ab67b3c70 100644 (file)
@@ -26,7 +26,6 @@
 struct Custos
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 
 private:
   static void add_streepjes (Grob *me, int pos, int interspaces, Stencil *custos_);
index a816f426ae7e74b520c409ff125168c9c7e0f16d..6c975b1c561963ebae652bec85ab9f49a9929176 100644 (file)
@@ -34,7 +34,6 @@ public:
   static int compare (Grob *const &, Grob *const &);
   static void add_head (Grob *dotcol, Grob *rh);
 
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (side_position, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
 };
index fdd0673af9821797669e73ade3dba919455b1961..7e1a1f6b524bd772acdcd4b9d33f720691bb93df 100644 (file)
@@ -27,7 +27,6 @@ class Dots
 {
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // DOTS_HH
index e7d47c0b43fc6f9d005b62a88fca0488e6129f20..f422da99ebe7444dc21e89e23a110ddd3fea4ddd 100644 (file)
@@ -28,7 +28,6 @@ struct Fingering_column
 {
   static void add_fingering (Grob *, Grob *);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
-  DECLARE_GROB_INTERFACE ();
   static void do_x_positioning (Grob *me);
   static void do_y_positioning (Grob *me);
 };
index 96b6b0b8d942284495bc617c69d5d4e3571b4e16..43fd271dd6ae633eb7a20860111422a9b043c046 100644 (file)
@@ -28,7 +28,6 @@ struct Font_interface
   static SCM text_font_alist_chain (Grob *);
   static SCM music_font_alist_chain (Grob *);
   static Font_metric *get_default_font (Grob *);
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* FONT_INTERFACE_HH */
index b0cfd7afda3ec4e44761d25bbf4b49b906202d47..00894341632fd00ad4e3492599d92179be491a2c 100644 (file)
@@ -27,7 +27,6 @@ class Grob;
 class Gregorian_ligature
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   static string prefixes_to_str (Grob *);
 };
 
index 75ed7a7cdfc5515042f4e1e8324a45e5bc2bff95..2a4760a7177289d4d9d14a06e5e82b787821f7c2 100644 (file)
@@ -29,13 +29,11 @@ public:
   static void add_grid_point (Grob *me, Grob *b);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 class Grid_point_interface
 {
 public:
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* GRID_LINE_INTERFACE_HH */
index 8590373a0ab7d2b58601396b081737b5640f4272..9c3eadb4b06b7deccf252f2cabfbe65f4cc91fa1 100644 (file)
 
 class Grob;
 
-// TODO: remove DECLARE_GROB_INTERFACE
-#define DECLARE_GROB_INTERFACE() \
-  static bool has_interface (Grob *g)
-
-// TODO: remove cl::has_interface and use ::has_interface directly
 #define ADD_INTERFACE(cl, b, c)                                 \
   Grob_interface<cl> cl ## _interface_initializer;              \
   template <> char const *Grob_interface<cl>::cxx_name_ (#cl);  \
   template <> char const *Grob_interface<cl>::description_ (b); \
-  template <> char const *Grob_interface<cl>::variables_ (c);   \
-  bool cl::has_interface (Grob *me)                             \
-  {                                                             \
-    return ::has_interface<cl> (me);                            \
-  }
+  template <> char const *Grob_interface<cl>::variables_ (c);
 
 SCM add_interface (char const *cxx_name,
                    char const *descr,
index 5ef37227662f5d6de3601dff4a42f42548dc9265..db51e02e73cb0a0c5ec6ce1f4e91d56d5bc69bbe 100644 (file)
@@ -137,7 +137,6 @@ public:
 
   /* interfaces */
   bool internal_has_interface (SCM intf);
-  DECLARE_GROB_INTERFACE ();
 
   /* offsets */
   void translate_axis (Real, Axis);
index 8807bc8cc81c893f6af490450f2c87ee6449a69d..a2e2f8bf9e9ee2fa26860067cedaa87ba26ff2c2 100644 (file)
@@ -30,7 +30,6 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (broken_bound_padding, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // HAIRPIN_HH
index b8ccba5beed63ec346634eea4ecafce578245715..ad5c1d64a27448d75351a1a2bb7f6748f8344b03 100644 (file)
@@ -31,7 +31,6 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_skylines, (SCM smob));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end));
   DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_y_parent_callback, (SCM));
-  DECLARE_GROB_INTERFACE ();
   static bool request_suicide (Grob *me, int start, int end);
   static bool request_suicide_alone (Grob *me, int start, int end);
   static void consider_suicide (Grob *me);
index e2fbb22b09e64ea6255b3e6f876f1bba029d1fd6..3a1692fc1124b216e04c253f064263cfa27bf0e9 100644 (file)
@@ -31,7 +31,6 @@ struct Horizontal_bracket
   static Stencil make_enclosing_bracket (Grob *me, Grob *refpoint,
                                          vector<Grob *> grobs,
                                          Axis a, Direction dir);
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* HORIZONTAL_BRACKET_HH */
index e987d89bcabf81a01164b36e46857e08d310b3fa..07f1261a525c72fca408cd4085d26c0df80da42d 100644 (file)
@@ -54,7 +54,6 @@ public:
   virtual Interval_t<int> spanned_rank_interval () const;
   virtual Interval pure_y_extent (Grob *ref, int start, int end);
   virtual void cache_pure_height (Interval height);
-  DECLARE_GROB_INTERFACE ();
 protected:
   virtual void discretionary_processing ();
   void copy_breakable_items ();
index a74387a89bd0c5708e76ce2aa9acfd4a19cc29b0..d3d425a515329bed5cf1948f3d4bec5e6731aed8 100644 (file)
@@ -26,7 +26,6 @@
 struct Kievan_ligature
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* KIEVAN_LIGATURE_HH */
index f45aca5b221d36fd5b297f9d634b235413d4eba9..b805f7262af464722ea8ea03db1e51fe5a16c731 100644 (file)
@@ -26,7 +26,6 @@
 struct Line_interface
 {
   static Stencil line (Grob *me, Offset from, Offset to);
-  DECLARE_GROB_INTERFACE ();
   static Stencil make_zigzag_line (Grob *me,
                                    Offset from,
                                    Offset to);
index 88135421e4de30f32aa6dd8f5702ca5d38d5c1dd..8ae8c975531a34cdad61e4e9a41edc170c93684b 100644 (file)
@@ -27,7 +27,6 @@
 class Lyric_extender
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 };
 
index 95418bc36ad1e856923fbeb2681061196f8e3d91..fb03c6df5161b59de5a119be9c166b5612b8c2cf 100644 (file)
@@ -27,7 +27,6 @@ struct Lyric_hyphen
 {
 public:
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 };
 
index 44eb334b17e2f546aab2f133e345c062d1f51183..0e67f228228ad2238999b5063803b6732c38370a 100644 (file)
@@ -28,7 +28,6 @@ class Measure_grouping
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* MEASURE_GROUPING_SPANNER_HH */
index 4609a4c90d794a6d1f059974b0b5f00dbe2cc624..6ce6a2733b2a6fb933a3ed83d40de2eac2910243 100644 (file)
@@ -26,7 +26,6 @@
 class Melody_spanner
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   static void add_stem (Grob *, Grob *);
   DECLARE_SCHEME_CALLBACK (calc_neutral_stem_direction, (SCM));
 };
index 97b8e2e21682a5eecd7863e28537a987d91609dd..3e4e46a6412524387ed4a9b4b31ebcbee14b9784 100644 (file)
@@ -45,7 +45,6 @@ struct Mensural_ligature
 {
   DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* MENSURAL_LIGATURE_HH */
index bf3c7083a77e1d1b96d4b765ee47a35adc348877..f4d379ade4a639c3a6ac39c6bebee33507434874 100644 (file)
@@ -26,7 +26,6 @@
 class Multi_measure_rest
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (height, (SCM));
   DECLARE_SCHEME_CALLBACK (percent, (SCM));
index fcdece0a59e69be00d229fd2fa78b9739b606819..ad2ed5345d3575f775e17bbb0585f764c4ce4594 100644 (file)
@@ -44,6 +44,5 @@ public:
   static Drul_array<vector<Grob *> > get_clash_groups (Grob *me);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM smob));
   static void add_column (Grob *me, Grob *ncol);
-  DECLARE_GROB_INTERFACE ();
 };
 #endif // COLLISION_HH
index cd09b076afe2d36942c425ee0f9344c1e5e16b55..1cf08545bf4c48f4adffb75df8ea9446590381e5 100644 (file)
@@ -43,7 +43,6 @@ public:
   static bool has_rests (Grob *me);
   static Grob *dot_column (Grob *me);
   static Interval cross_staff_extent (Grob *me, Grob *refp);
-  DECLARE_GROB_INTERFACE ();
 
   static Item *get_stem (Grob *);
   static Item *get_flag (Grob *);
index d14fbcfe775e2a86f813f9f8d2af99ec4570e3aa..1e167d58b284b36835ee43e6f0408e380f4bb3af 100644 (file)
@@ -30,7 +30,6 @@ public:
   DECLARE_SCHEME_CALLBACK (stem_x_shift, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_stem_attachment, (SCM));
   DECLARE_SCHEME_CALLBACK (include_ledger_line_height, (SCM));
-  DECLARE_GROB_INTERFACE ();
 
   static Real stem_attachment_coordinate (Grob *, Axis a);
   static int get_balltype (Grob *);
index 7fde934f512a8ddf1b46a877eda984cccd19f11e..df063b382ea3df66c8739a0209f3f52f56c95b3b 100644 (file)
@@ -27,7 +27,6 @@
 class Note_spacing
 {
 public:
-  DECLARE_GROB_INTERFACE ();
 
   static Spring get_spacing (Grob *me, Item *, Spring, Real);
   static void stem_dir_correction (Grob *me, Item *next_col, Real incr,
index 03c503f9a831b829675a5ac278040a6800f252e7..f1cb01e740685bcf11f9463e82a42466501d01f0 100644 (file)
@@ -50,7 +50,6 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
 
-  DECLARE_GROB_INTERFACE ();
   static int get_rank (Grob const *);
   static bool is_musical (Grob *);
   static Moment when_mom (Grob *);
index 448b8110346dfe262b54494c72e9a284205402e6..85b1cdb446041243f4012983abcca6158c14c096 100644 (file)
@@ -26,7 +26,6 @@
 class Percent_repeat_item_interface
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (beat_slash, (SCM));
   DECLARE_SCHEME_CALLBACK (double_percent, (SCM));
   static Stencil x_percent (Grob *, int);
index ec53a97f473ff2e1044f90ccd5653e3f79434287..f125d217e4dbf1e13afa46fb832f4c4f29855123 100644 (file)
@@ -27,7 +27,6 @@ class Pure_from_neighbor_interface
 {
 public:
   DECLARE_SCHEME_CALLBACK (calc_pure_relevant_grobs, (SCM));
-  DECLARE_GROB_INTERFACE ();
 
 };
 
index b9cfc17b8ef23e961be9026de36b76f77f4b3bdf..3946f9b93306b128429cae35892c11a7bc3412a9 100644 (file)
@@ -28,7 +28,6 @@ class Rest_collision
 public:
   static void add_column (Grob *me, Grob *);
 
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element));
   DECLARE_SCHEME_CALLBACK (force_shift_callback_rest, (SCM element, SCM off));
   static SCM do_shift (Grob *);
index 548e031e557e8171b4fe3e91e17b5c72cd4e930e..644aa1450c7bf904d203f444424d82f3eef7b24f 100644 (file)
@@ -29,7 +29,6 @@ class Rest
 public:
   DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE ();
   static string glyph_name (Grob *, int durlog, const string &style, bool, Real);
   static Real staff_position_internal (Grob *, int /* duration_log */,
                                        int /* dir */);
index e7cb7cfc4a1c8ec8cd1f521e65cff75291d299bf..17eecd4f22b8c567717d5502bf65df83a428dc0c 100644 (file)
@@ -32,7 +32,6 @@ public:
   static Item *get_dots (Grob *);
   static int dot_count (Grob *);
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // RHYTHMIC_HEAD_HH
index 51f2eb9206ecbf2d73528e69402933d1f2639c24..fe4816eae16d3bc797b490bad6969db5096b1315 100644 (file)
@@ -30,7 +30,6 @@ public:
   static void add_side_positioned (Grob *, Grob *);
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
   DECLARE_SCHEME_CALLBACK (row_before_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE ();
   static void order_grobs (vector<Grob *> grobs);
 
 };
index 2839010b0d9106bc6d8bc1bbcf8036b71ce9b988..9154aea6cc4a991881b03afb6a1861616d5a57f5 100644 (file)
@@ -34,7 +34,6 @@ public:
   static Stencil get_stencil (Grob *, Direction d);
   static Direction get_direction (Grob *);
 
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
index ffdfb825015366b1aef10403b5157360856f9ef6..4cf683fd36e58c0851bf15e063ea5136220cfebf 100644 (file)
@@ -25,7 +25,6 @@
 
 struct Self_alignment_interface
 {
-  DECLARE_GROB_INTERFACE ();
 
   static SCM aligned_on_self (Grob *me, Axis a, bool pure, int start, int end);
   static SCM centered_on_object (Grob *me, Axis a);
index 7ad63e80d17ec6f85a720f4ef193b4def2ace38f..e02b57a11eac323ef24522cdcfc8f11c8f602564 100644 (file)
@@ -26,7 +26,6 @@
 
 struct Semi_tie_column
 {
-  DECLARE_GROB_INTERFACE ();
 
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_head_direction, (SCM));
index 97a3dcbe04cf3b98ba218c75b8a4e6e05cf5abb7..1e8db8bdb85fb590722fded7351e43448fe1e988 100644 (file)
@@ -25,7 +25,6 @@
 
 struct Semi_tie
 {
-  DECLARE_GROB_INTERFACE ();
 
   DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
   static bool less (Grob *s1, Grob *s2);
index f78fd0d6a945a3b245ed0df4cbd73bba399f4a35..81ea523fe29b649807323bbdcb99eb3ea1c097f2 100644 (file)
@@ -27,7 +27,6 @@
 
 struct Separation_item
 {
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (calc_skylines, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 
index c98189f0875bb09976e25e4d3de43a36791dde3f..c0330e795d1497bf5c4ecbb1b24bdcf25a7751c6 100644 (file)
@@ -42,7 +42,6 @@ public:
 
   static Axis get_axis (Grob *);
   static void set_axis (Grob *, Axis);
-  DECLARE_GROB_INTERFACE ();
   static void add_support (Grob *, Grob *);
   static void recursive_add_support (Grob *, Grob *);
   static void add_staff_support (Grob *);
index 000c07dce82945320002b99979d1add1f787d2db..ae85ac24d3c769253e98390535b880eb1d67e27c 100644 (file)
@@ -41,7 +41,6 @@ public:
   DECLARE_SCHEME_CALLBACK (pure_outside_slur_callback, (SCM, SCM, SCM, SCM));
   DECLARE_SCHEME_CALLBACK (outside_slur_cross_staff, (SCM, SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE ();
   static Bezier get_curve (Grob *me);
 };
 
index ba219c28a987f047a371e675248033028e7f3ce5..5c6427e6589c7c8b15d7bef5e8b9024c3dd5a410 100644 (file)
@@ -31,7 +31,6 @@ struct Spaceable_grob
   static void add_spring (Grob *me, Grob *to, Spring sp);
   static Spring get_spring (Grob *me, Grob *other);
 
-  DECLARE_GROB_INTERFACE ();
   static SCM get_minimum_distances (Grob *);
   static SCM get_ideal_distances (Grob *);
 };
index 2ade005a22260363ec25471987646e3a780986f7..ddfe2efb1c43b48aed07249933cd37adfa3b922f 100644 (file)
@@ -32,7 +32,6 @@ struct Spacing_interface
   static Drul_array<Skyline> skylines (Grob *me, Grob *right_col);
   static Grob *extremal_break_aligned_grob (Grob *me, Direction, Direction, Interval *);
 
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* SPACING_INTERFACE_HH */
index 61ed8dc4ac0c3ee8ac5df1b8262e5997f992f1e1..fcfba904175f8a4a830306f557dd587f6bb8c4e8 100644 (file)
@@ -50,7 +50,6 @@ public:
 
   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* SPACING_SPANNER_HH */
index 7ee27abcb19208d0218d53062f8aeda1d12cba66..79032dfb305c2d52dc2eef5f3d057e52565240c7 100644 (file)
@@ -76,7 +76,6 @@ public:
   static bool less (Spanner *const &, Spanner *const &);
   virtual Grob *find_broken_piece (System *) const;
   virtual void derived_mark () const;
-  DECLARE_GROB_INTERFACE ();
   virtual System *get_system () const;
 
   SCM get_cached_pure_property (SCM sym, int start, int end);
index 3ad0ccf5681831a974bef78061795d3ff9d2d3b8..0e00d4280f72b64fc635290b07d559b4d5b64f15 100644 (file)
@@ -25,7 +25,6 @@
 class Staff_grouper_interface
 {
 public:
-  DECLARE_GROB_INTERFACE ();
 
   static bool maybe_pure_within_group (Grob *, Grob *child, bool, int, int);
 };
index 521be99d19c88538069321c1ad6e36a3de446d0c..11a81a998eef5027c792d3735ab314f70b1620d8 100644 (file)
@@ -30,7 +30,6 @@ class Staff_spacing
   static Real next_notes_correction (Grob *, Grob *);
 
 public:
-  DECLARE_GROB_INTERFACE ();
   static Spring get_spacing (Grob *, Grob *, Real);
   static Interval bar_y_positions (Grob *);
 };
index 3c5f55b836aa78b957de6fb223e107748ad85179..64d41014d70ae28a6041e940a0b124338f125a2a 100644 (file)
@@ -30,7 +30,6 @@
 class Staff_symbol_referencer
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   static bool ugly_hack (Grob *);
   static void set_position (Grob *, Real);
   static void pure_set_position (Grob *, Real);
index 19e826d3d0620fa953bb2805be3344ee18157fd5..9454ebe7f445a53c72f7284c1e7bfb5a6cd9280e 100644 (file)
@@ -40,6 +40,5 @@ public:
   static Interval line_span (Grob *);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (height, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 #endif // STAFF_SYMBOL_HH
index 2495bb695a8bb422b65521e4633c737c20beeacb..ead984dc38a6bb9bb0bc94572156c487ec8592e0 100644 (file)
@@ -27,7 +27,6 @@ class Stem_tremolo
 {
 public:
 
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (calc_slope, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_width, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_y_offset, (SCM));
index 0aeb83ee6aa88e2356bc77c443c8d795ba5be589..7c4612552a13d6c3ea34545b2ff35ef69fae1890 100644 (file)
@@ -58,7 +58,6 @@ public:
   static Real internal_calc_stem_end_position (Grob *, bool);
   static Real internal_calc_stem_begin_position (Grob *, bool);
 
-  DECLARE_GROB_INTERFACE ();
   static void set_spacing_hints (Grob *);
   static Grob *flag (Grob *);
 
index 3e1848c530b7561244b3aebc5180369fbddf9373..bf1fd0d28c11d004d60b1bbbfd7de7b5de0708ec 100644 (file)
@@ -31,7 +31,6 @@ class System_start_delimiter
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 
-  DECLARE_GROB_INTERFACE ();
   static void try_collapse (Grob *);
   static Stencil staff_bracket (Grob *, Real);
   static Stencil old_staff_bracket (Grob *, Real);
index 84b39bd02fa394fb121b6546b1659b177c51bf91..4e402ffeca5c40ead781a964ce5d8f2dd34bad18 100644 (file)
@@ -74,7 +74,6 @@ public:
   int spanner_count () const;
 
   void break_into_pieces (vector<Column_x_positions> const &);
-  DECLARE_GROB_INTERFACE ();
 
   vector<Item *> broken_col_range (Item const *, Item const *) const;
   vector<Grob *> used_columns () const;
index f8f86d6f33225219388586ba74a1a1d24f9cd5cb..c653495be892c89a5495e1c52a3fe752c5a4acf2 100644 (file)
@@ -30,7 +30,6 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
   DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM));
-  DECLARE_GROB_INTERFACE ();
   static bool is_markup (SCM);
   static bool is_markup_list (SCM);
 };
index 0485cd0bcf3c96607b23153ca394b2d0c939642f..025cf8433aced03c419f2e70c8f001b6b965533d 100644 (file)
@@ -26,7 +26,6 @@
 class Tie_column
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   static void add_tie (Grob *me, Spanner *);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
index 186c0a4d386dc7f27a33156c3296ebf54528f351..e92ca6194704db6fcc29c19ec73ea5f8b6d7e1a2 100644 (file)
@@ -28,7 +28,6 @@ class Tie
 {
 public:
   static void set_head (Spanner *, Direction, Grob *head);
-  DECLARE_GROB_INTERFACE ();
   static Item *head (Spanner *, Direction);
   static int get_column_rank (Spanner *, Direction);
   static int get_position (Spanner *);
index 72daae4da9990aa7c942617ffc04b57008764e04..1e41154fbf32dfd03755ffd524cf1a6de81a8230 100644 (file)
@@ -34,7 +34,6 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_connect_to_neighbors, (SCM smob));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
 
-  DECLARE_GROB_INTERFACE ();
   static Grob *get_common_x (Spanner *);
   static void add_tuplet_bracket (Grob *me, Grob *smaller_bracket);
   static void get_bounds (Grob *, Grob **, Grob **);
index 9780beefb29491baec0146f0f60912045253a935..24ba77a37712efee55a98be041e215e02135a79d 100644 (file)
@@ -30,7 +30,6 @@ struct Tuplet_number
   DECLARE_SCHEME_CALLBACK (calc_x_offset, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_y_offset, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE ();
 
   static Real calc_offset (Spanner *me, Axis a); // not used
 
index 912b54decea2dc05c2e1f0467cc70f5e390aa55d..25e994753f8686a7e5d88313ab1af7f8e4b0516b 100644 (file)
@@ -27,7 +27,6 @@ struct Vaticana_ligature
 {
   DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 /*
index 1a934d4a4a94177cf06f56ac24b9d53a5d6284b2..ffde225d2f07e23f28d80a4c7cab3e2e4209949c 100644 (file)
@@ -26,7 +26,6 @@
 class Volta_bracket_interface
 {
 public:
-  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   static void modify_edge_height (Spanner *);
   static void add_bar (Grob *me, Item *bar);
index 8b1a4c30033cddcdcfe59fd8e8509e82f5349233..d339fbce612e94c19638c33ed0da5c532b07f89b 100644 (file)
@@ -133,7 +133,7 @@ Instrument_name_engraver::acknowledge_axis_group (Grob_info info)
       && !info.grob ()->internal_has_interface (ly_symbol2scm ("dynamic-interface"))
       && !info.grob ()->internal_has_interface (ly_symbol2scm ("piano-pedal-interface"))
       && !info.grob ()->internal_has_interface (ly_symbol2scm ("volta-interface"))
-      && (!Align_interface::has_interface (info.grob ())))
+      && (!has_interface<Align_interface> (info.grob ())))
     {
       if (Page_layout_problem::is_spaceable (info.grob ()))
         axis_groups_.push_back (info.grob ());
index 56af49da39b9c4ce0bd789b14a1e812f5bac1e94..3249a736c3f2a18c103107bdce08e851b06650b8 100644 (file)
@@ -32,7 +32,6 @@
 struct Key_signature_interface
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 /*
index 5cb5462351667fc1d84f834e8a0190d6fe41e21a..b0e8fee3c2321b8e7f078a7946048714deca168a 100644 (file)
@@ -32,7 +32,6 @@ struct Ledger_line_spanner
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 static void
@@ -339,7 +338,6 @@ ADD_INTERFACE (Ledger_line_spanner,
 
 struct Ledgered_interface
 {
-  DECLARE_GROB_INTERFACE ();
 };
 
 ADD_INTERFACE (Ledgered_interface,
index be20f25d98fb0a824030cb48ecd4faa77bfa3974..925e578e358b4eb3bd5ddebd38eeab9044a89a08 100644 (file)
@@ -43,12 +43,11 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_left_bound_info_and_text, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_right_bound_info, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_bound_info, (SCM, Direction));
-  DECLARE_GROB_INTERFACE ();
 };
 
 Spanner *parent_spanner (Grob *g)
 {
-  if (Spanner::has_interface (g))
+  if (has_interface<Spanner> (g))
     return dynamic_cast<Spanner *> (g);
   return parent_spanner (g->get_parent (Y_AXIS));
 }
@@ -110,7 +109,7 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
                          ? columns[0] : columns.back ();
         }
 
-      Real x_coord = (Paper_column::has_interface (bound_grob)
+      Real x_coord = (has_interface<Paper_column> (bound_grob)
                       ? Axis_group_interface::generic_bound_extent (bound_grob, commonx, X_AXIS)
                       : robust_relative_extent (bound_grob, commonx, X_AXIS)).linear_combination (attach);
 
index bc576bf3ccc669f23fbea53df01ce072c069549b..cdee61517e333f4c6a554c973b27c11555d8835c 100644 (file)
@@ -158,7 +158,7 @@ get_current_note_head (Context *voice)
       // here.  Not with this mechanism.
       if ((*end_mom == end_from_now)
           && dynamic_cast<Item *> (g)
-          && Note_head::has_interface (g))
+          && has_interface<Note_head> (g))
         {
           return g;
         }
index 0ef6b7b4e0b322ba767d35a8684402fbb1e7f2fa..f98cb5a3a037d279c5234b314638432a5252737f 100644 (file)
@@ -309,14 +309,14 @@ check_meshing_chords (Grob *me,
     {
       Grob *d = unsmob<Grob> (head_up->get_object ("dot"));
       Grob *parent = d->get_parent (X_AXIS);
-      if (Dot_column::has_interface (parent))
+      if (has_interface<Dot_column> (parent))
         Side_position_interface::add_support (parent, head_down);
     }
   else if (Rhythmic_head::dot_count (head_down))
     {
       Grob *d = unsmob<Grob> (head_down->get_object ("dot"));
       Grob *parent = d->get_parent (X_AXIS);
-      if (Dot_column::has_interface (parent))
+      if (has_interface<Dot_column> (parent))
         {
           Grob *stem = unsmob<Grob> (head_up->get_object ("stem"));
           // Loop over all heads on an up-pointing-stem to see if dots
@@ -433,7 +433,7 @@ Note_collision_interface::get_clash_groups (Grob *me)
   for (vsize i = 0; i < elements.size (); i++)
     {
       Grob *se = elements[i];
-      if (Note_column::has_interface (se))
+      if (has_interface<Note_column> (se))
         {
           if (!Note_column::dir (se))
             se->programming_error ("note-column has no direction");
index a5da30a8c7926214df6982f11f75ac639338f009..1d79fee652c57a825400a5e9a3fca3abb9c483a2 100644 (file)
@@ -98,7 +98,7 @@ Direction
 Note_column::dir (Grob *me)
 {
   Grob *stem = unsmob<Grob> (me->get_object ("stem"));
-  if (stem && Stem::has_interface (stem))
+  if (has_interface<Stem> (stem))
     return get_grob_direction (stem);
   else
     {
@@ -107,7 +107,7 @@ Note_column::dir (Grob *me)
         return (Direction)sign (head_positions_interval (me).center ());
     }
 
-  if (Note_column::has_interface (me))
+  if (has_interface<Note_column> (me))
     programming_error ("Note_column without heads and stem");
   else
     programming_error ("dir() given grob without Note_column interface");
@@ -131,7 +131,7 @@ void
 Note_column::add_head (Grob *me, Grob *h)
 {
   bool both = false;
-  if (Rest::has_interface (h))
+  if (has_interface<Rest> (h))
     {
       extract_grob_set (me, "note-heads", heads);
       if (heads.size ())
@@ -139,7 +139,7 @@ Note_column::add_head (Grob *me, Grob *h)
       else
         me->set_object ("rest", h->self_scm ());
     }
-  else if (Note_head::has_interface (h))
+  else if (has_interface<Note_head> (h))
     {
       if (unsmob<Grob> (me->get_object ("rest")))
         both = true;
@@ -205,7 +205,7 @@ Note_column::accidentals (Grob *me)
   if (!acc)
     return 0;
 
-  if (Accidental_placement::has_interface (acc->get_parent (X_AXIS)))
+  if (has_interface<Accidental_placement> (acc->get_parent (X_AXIS)))
     return acc->get_parent (X_AXIS);
 
   /* compatibility. */
index 91859fb6ec692daa1c9e3badce5dcdce3616238d..a894be25394c9a41ba44a5db8870e79e686c574b 100644 (file)
@@ -228,7 +228,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
       for (vsize i = 0; i < items.size (); i++)
         {
           Item *it = dynamic_cast<Item *> (items[i]);
-          if (!Note_column::has_interface (it))
+          if (!has_interface<Note_column> (it))
             continue;
           if (d == RIGHT && it->get_column () != rcolumn)
             continue;
index 5e962a6bb3eef0b3dcffaea7818419ccf0aa5684..63a9d3ebca37adaa2b60dd4bce024875b2301202 100644 (file)
@@ -35,7 +35,6 @@
 struct Ottava_bracket
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 /*
@@ -61,7 +60,7 @@ Ottava_bracket::print (SCM smob)
       Item *b = me->get_bound (d);
       broken[d] = (b->break_status_dir () != CENTER);
 
-      if (Note_column::has_interface (b))
+      if (has_interface<Note_column> (b))
         {
           extract_grob_set (b, "note-heads", heads);
           common = common_refpoint_of_array (heads, common, X_AXIS);
@@ -94,7 +93,7 @@ Ottava_bracket::print (SCM smob)
       Item *b = me->get_bound (d);
 
       Interval ext;
-      if (Note_column::has_interface (b))
+      if (has_interface<Note_column> (b))
         {
           extract_grob_set (b, "note-heads", heads);
           for (vsize i = 0; i < heads.size (); i++)
index 3f4fca05f1fddfb8be11561dc51a71154b465bdb..8f1951223c4e8a4721047f848ec296ebc50a5e3f 100644 (file)
@@ -1232,7 +1232,7 @@ Page_layout_problem::filter_dead_elements (vector<Grob *> const &input)
   vector<Grob *> output;
   for (vsize i = 0; i < input.size (); ++i)
     {
-      if (Hara_kiri_group_spanner::has_interface (input[i]))
+      if (has_interface<Hara_kiri_group_spanner> (input[i]))
         Hara_kiri_group_spanner::consider_suicide (input[i]);
 
       if (input[i]->is_live ())
index 334861844c900076ffaf540f9cb02d53813bf3fa..7c44f173d70226f540b266bd24c7c28dfc8d8a76 100644 (file)
@@ -241,10 +241,10 @@ Paper_column_engraver::stop_translation_timestep ()
       if (!unsmob<Grob> (elem->get_object ("axis-group-parent-X")))
         elem->set_object ("axis-group-parent-X", col->self_scm ());
 
-      if (Accidental_placement::has_interface (elem)
-          || Arpeggio::has_interface (elem))
+      if (has_interface<Accidental_placement> (elem)
+          || has_interface<Arpeggio> (elem))
         Separation_item::add_conditional_item (col, elem);
-      else if (!Accidental_interface::has_interface (elem))
+      else if (!has_interface<Accidental_interface> (elem))
         Separation_item::add_item (col, elem);
     }
   items_.clear ();
index d907acdf24f914e9b435aca0c92b44a46c149d96..3ea5a89f0538a37b236c412e9744ba5a378ad61f 100644 (file)
@@ -203,7 +203,7 @@ Paper_column::break_align_width (Grob *me, SCM align_syms)
           (me, ly_symbol2scm ("elements"),
            (scm_is_eq (align_sym, ly_symbol2scm ("staff-bar"))
             ? Bar_line::non_empty_barline
-            : Break_alignment_interface::has_interface));
+            : has_interface<Break_alignment_interface>));
       else
         {
           extract_grob_set (me, "elements", elts);
@@ -440,7 +440,7 @@ Paper_column::is_extraneous_column_from_ligature (Grob *me)
   bool has_notehead = false;
   for (vsize i = 0; i < elts.size (); i++)
     {
-      if (Rhythmic_head::has_interface (elts[i]))
+      if (has_interface<Rhythmic_head> (elts[i]))
         {
           has_notehead = true;
           if (dynamic_cast<Item *> (elts[i])->get_column () == me)
index f58a130f75dad10698c728ece0c5ba491dbb8d57..b47e5e3b6deee146c2f20a51d49c05353064273d 100644 (file)
@@ -26,7 +26,6 @@
 struct Piano_pedal_bracket
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE ();
 };
 
 MAKE_SCHEME_CALLBACK (Piano_pedal_bracket, print, 1);
index 7061a9268498b3c492e9d2eb07a55cfccadd37b7..e073785006817700dbe7e20355d1a6049e6d722a 100644 (file)
@@ -46,7 +46,7 @@ Pure_from_neighbor_engraver::Pure_from_neighbor_engraver ()
 void
 Pure_from_neighbor_engraver::acknowledge_item (Grob_info i)
 {
-  if (!Pure_from_neighbor_interface::has_interface (i.item ()))
+  if (!has_interface<Pure_from_neighbor_interface> (i.item ()))
     pure_relevants_.push_back (i.item ());
 }
 
index 20e7eb9fc784940fe610bec1d6348d5382616250..e261502201affa11e873788d50da3b7265bc340e 100644 (file)
@@ -62,7 +62,7 @@ Rest_collision_engraver::process_acknowledged ()
       if (!g || !m)
         continue;
 
-      if (Rhythmic_head::has_interface (g) && (*m) > now)
+      if (has_interface<Rhythmic_head> (g) && (*m) > now)
         {
           Grob *column = g->get_parent (X_AXIS);
           if (!column)
@@ -70,7 +70,7 @@ Rest_collision_engraver::process_acknowledged ()
 
           // Only include rests that start now. Include notes that started any time.
           Paper_column *paper_column = dynamic_cast<Item *> (column)->get_column ();
-          if (!Rest::has_interface (g) || !paper_column || Paper_column::when_mom (paper_column) == now)
+          if (!has_interface<Rest> (g) || !paper_column || Paper_column::when_mom (paper_column) == now)
             {
               columns.insert (column);
               rest_count += Note_column::has_rests (column);
index 300dcfc3c40d160238f8c4bcc3f00a55667916cb..536ced40e5b7fb75b88b34893da3064ff3faa8bd 100644 (file)
@@ -52,7 +52,7 @@ Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
   if (scm_is_number (offset))
     rest_grob->translate_axis (scm_to_double (offset), Y_AXIS);
 
-  if (Note_column::has_interface (parent) && Note_column::has_rests (parent))
+  if (has_interface<Note_column> (parent) && Note_column::has_rests (parent))
     {
       Grob *collision = unsmob<Grob> (parent->get_object ("rest-collision"));
 
@@ -109,7 +109,7 @@ Rest_collision::calc_positioning_done (SCM smob)
   for (vsize i = 0; i < elts.size (); i++)
     {
       Grob *e = elts[i];
-      if (Note_column::has_interface (e))
+      if (has_interface<Note_column> (e))
         {
           if (unsmob<Grob> (e->get_object ("rest")))
             rests.push_back (e);
index 3a288dac72fed44d4d617de36671398b357a2a40..94aa8908e70a1dfc3c2dfc791358491edb99e9d9 100644 (file)
@@ -72,8 +72,8 @@ Script_column::row_before_line_breaking (SCM smob)
       /*
         Don't want to consider scripts horizontally next to notes.
       */
-      if (Accidental_placement::has_interface (sc)
-          || Arpeggio::has_interface (sc))
+      if (has_interface<Accidental_placement> (sc)
+          || has_interface<Arpeggio> (sc))
         {
           affect_all_grobs.push_back (sc);
         }
index eaba157f34b27196a7d074aa410654fa5f11e15b..24fe4dc0824ed063beb72142f10cae86a46d5f72 100644 (file)
@@ -131,7 +131,6 @@ Script_interface::print (SCM smob)
 
 struct Text_script
 {
-  DECLARE_GROB_INTERFACE ();
 };
 
 ADD_INTERFACE (Text_script,
index dc81f38b7f2da42a206e180d1d9d2ace49c3c3dd..35b5038020f34431faa1819ff09b36611868ce16 100644 (file)
@@ -56,7 +56,7 @@ Script_row_engraver::stop_translation_timestep ()
   if (script_row_)
     {
       for (vsize i = 0; i < scripts_.size (); i++)
-        if (Accidental_placement::has_interface (scripts_[i])
+        if (has_interface<Accidental_placement> (scripts_[i])
             || Side_position_interface::get_axis (scripts_[i]) == X_AXIS)
           Script_column::add_side_positioned (script_row_, scripts_[i]);
     }
index 49b4125364fa9ad1a0b23e1d91b9d244b3426f37..512f970e0e05fa500735eb9e93ec12039f58d5e1 100644 (file)
@@ -104,7 +104,7 @@ Self_alignment_interface::aligned_on_parent (Grob *me, Axis a)
 {
   Grob *him = me->get_parent (a);
   Interval he;
-  if (Paper_column::has_interface (him))
+  if (has_interface<Paper_column> (him))
       /*
         PaperColumn extents aren't reliable (they depend on size and alignment
         of PaperColumn's children), so we align on NoteColumn instead.
@@ -115,7 +115,7 @@ Self_alignment_interface::aligned_on_parent (Grob *me, Axis a)
   else
     {
       if (to_boolean (me->get_property ("X-align-on-main-noteheads"))
-          && Note_column::has_interface (him))
+          && has_interface<Note_column> (him))
         he = Note_column::calc_main_extent(him);
       else
         he = him->extent (him, a);
index 049cd029d6c40d56eb9348e81b0639bf9f70cf12..0669c277f7ecad65b16fed5c60796626b6a9485d 100644 (file)
@@ -60,7 +60,7 @@ Semi_tie::calc_control_points (SCM smob)
   (void) me->get_property ("direction");
 
   Grob *yparent = me->get_parent (Y_AXIS);
-  if (Semi_tie_column::has_interface (yparent))
+  if (has_interface<Semi_tie_column> (yparent))
     {
       /* trigger positioning. */
       yparent->get_property ("positioning-done");
index 5355f5cc43d9b29f8deac66c9324a687db499b1b..08069afda8858634692b5d73ea8d99d92e025371 100644 (file)
@@ -78,7 +78,7 @@ Separating_line_group_engraver::acknowledge_item (Grob_info i)
 {
   Item *it = i.item ();
 
-  if (Note_spacing::has_interface (it))
+  if (has_interface<Note_spacing> (it))
     {
       current_spacings_.note_spacings_.push_back (it);
       return;
index 01490fa1a011852e5728ffa05d46d01a545a13a4..e29b8a912960454e099e1a89a5b367369c751c4d 100644 (file)
@@ -129,7 +129,7 @@ Separation_item::boxes (Grob *me, Grob *left)
       vector<Grob *> other_elts; // for now only arpeggios
       for (vsize i = 0; i < read_only_elts.size (); i++)
         {
-          if (Accidental_placement::has_interface (read_only_elts[i]))
+          if (has_interface<Accidental_placement> (read_only_elts[i]))
             accidental_elts.push_back (read_only_elts[i]);
           else
             other_elts.push_back (read_only_elts[i]);
@@ -153,8 +153,8 @@ Separation_item::boxes (Grob *me, Grob *left)
          bounds all of them). However, we can't exclude an axis-group that
          adds to its childrens' stencil. Currently, this is just TrillPitchGroup;
          hence the check for note-head-interface. */
-      if (Axis_group_interface::has_interface (il)
-          && !Note_head::has_interface (il))
+      if (has_interface<Axis_group_interface> (il)
+          && !has_interface<Note_head> (il))
         continue;
 
       Interval y (il->pure_y_extent (ycommon, 0, very_large));
index 08ac17285d4b9b1c6fa5bf7805a3a9609e4b1ba8..16e2929a6699001fd029f7e43548097ec62031c6 100644 (file)
@@ -65,7 +65,7 @@ get_support_set (Grob *me)
 
   for (vsize i = 0; i < proto_support.size (); i++)
     {
-      if (Accidental_placement::has_interface (proto_support[i]))
+      if (has_interface<Accidental_placement> (proto_support[i]))
         {
           Grob *accs = proto_support[i];
           for (SCM acs = accs->get_object ("accidental-grobs"); scm_is_pair (acs);
@@ -252,7 +252,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
         continue; // so 'me' may not move in response to 'e'
 
       if (a == Y_AXIS
-          && Stem::has_interface (e))
+          && has_interface<Stem> (e))
         {
           // If called as 'pure' we may not force a stem to set its direction,
           if (pure && !is_direction (e->get_property_data ("direction")))
@@ -283,7 +283,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
                          : e->maybe_pure_coordinate (common[Y_AXIS], Y_AXIS, pure, start, end);
                Skyline_pair copy = *unsmob<Skyline_pair> (sp);
                if (a == Y_AXIS
-                   && Stem::has_interface (e)
+                   && has_interface<Stem> (e)
                    && to_boolean (me->get_maybe_pure_property ("add-stem-support", pure, start, end)))
                  copy[dir].set_minimum_height (copy[dir].max_height ());
                copy.shift (a == X_AXIS ? yc : xc);
@@ -381,7 +381,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
           staff_span.widen (1);
           if (staff_span.contains (position)
               /* If we are between notehead and staff, quantize for ledger lines. */
-              || (Note_head::has_interface (head)
+              || (has_interface<Note_head> (head)
                   && dir * position < 0))
             {
               total_off += (rounded - position) * 0.5 * ss;
index 8e1db97d8413d3e35fdbe502738541457fae4589..dc453a97294fc130b3ec49378d21bdaec3924893 100644 (file)
@@ -334,7 +334,7 @@ Slur_configuration::score_extra_encompass (Slur_score_state const &state)
   // we find forbidden attachments
   vector<Offset> forbidden_attachments;
   for (vsize i = 0; i < state.extra_encompass_infos_.size (); i++)
-    if (Tie::has_interface (state.extra_encompass_infos_[i].grob_))
+    if (has_interface<Tie> (state.extra_encompass_infos_[i].grob_))
       {
         Grob *t = state.extra_encompass_infos_[i].grob_;
         Grob *common_x = Grob::get_vertical_axis_group (t);
index cca56781aa92eaaa18579fb611f75161e9338d96..edd45f64278a80bf36e1d180f70664b8e5ccb9c8 100644 (file)
@@ -161,7 +161,7 @@ Slur_score_state::get_bound_info () const
   for (LEFT_and_RIGHT (d))
     {
       extremes[d].bound_ = slur_->get_bound (d);
-      if (Note_column::has_interface (extremes[d].bound_))
+      if (has_interface<Note_column> (extremes[d].bound_))
         {
           extremes[d].note_column_ = extremes[d].bound_;
           extremes[d].stem_ = Note_column::get_stem (extremes[d].note_column_);
@@ -285,7 +285,7 @@ Slur_score_state::fill (Grob *me)
                      ly_symbol2scm ("inside"))
           && minmax (dir_, encompass_place, y_place) == encompass_place
           && (!extra_encompass_infos_[i].grob_->internal_has_interface (ly_symbol2scm ("key-signature-interface"))
-              && !Clef::has_interface (extra_encompass_infos_[i].grob_)
+              && !has_interface<Clef> (extra_encompass_infos_[i].grob_)
               && !extra_encompass_infos_[i].grob_->internal_has_interface (ly_symbol2scm ("time-signature-interface"))))
         {
           for (LEFT_and_RIGHT (d))
@@ -627,7 +627,7 @@ Slur_score_state::generate_avoid_offsets () const
   extract_grob_set (slur_, "encompass-objects", extra_encompasses);
   for (vsize i = 0; i < extra_encompasses.size (); i++)
     {
-      if (Slur::has_interface (extra_encompasses[i]))
+      if (has_interface<Slur> (extra_encompasses[i]))
         {
           Grob *small_slur = extra_encompasses[i];
           Bezier b = Slur::get_curve (small_slur);
@@ -756,7 +756,7 @@ Slur_score_state::get_extra_encompass_infos () const
   vector<Extra_collision_info> collision_infos;
   for (vsize i = encompasses.size (); i--;)
     {
-      if (Slur::has_interface (encompasses[i]))
+      if (has_interface<Slur> (encompasses[i]))
         {
           Spanner *small_slur = dynamic_cast<Spanner *> (encompasses[i]);
           Bezier b = Slur::get_curve (small_slur);
@@ -797,12 +797,12 @@ Slur_score_state::get_extra_encompass_infos () const
           Grob *g = encompasses [i];
           Interval xe = g->extent (common_[X_AXIS], X_AXIS);
           Interval ye = g->extent (common_[Y_AXIS], Y_AXIS);
-          if (Dots::has_interface (g))
+          if (has_interface<Dots> (g))
             ye.widen (0.2);
 
           Real xp = 0.0;
           Real penalty = parameters_.extra_object_collision_penalty_;
-          if (Accidental_interface::has_interface (g))
+          if (has_interface<Accidental_interface> (g))
             {
               penalty = parameters_.accidental_collision_;
 
index 39059a59b64eef7d5715b368c398cef15e8bfb9e..a11a30258e8f3ae57daf500a19a171a5421a5f6b 100644 (file)
@@ -204,7 +204,7 @@ Slur::replace_breakable_encompass_objects (Grob *me)
     {
       Grob *g = extra_objects[i];
 
-      if (Separation_item::has_interface (g))
+      if (has_interface<Separation_item> (g))
         {
           extract_grob_set (g, "elements", breakables);
           for (vsize j = 0; j < breakables.size (); j++)
@@ -409,7 +409,7 @@ Slur::auxiliary_acknowledge_extra_object (Grob_info const &info,
   else
     slur = slurs[0];
 
-  if (Tie::has_interface (e)
+  if (has_interface<Tie> (e)
       || scm_is_eq (avoid, ly_symbol2scm ("inside")))
     {
       for (vsize i = slurs.size (); i--;)
@@ -478,7 +478,7 @@ Slur::calc_cross_staff (SCM smob)
      so we can ignore them here */
   vector<Grob *> non_sep_extras;
   for (vsize i = 0; i < extras.size (); i++)
-    if (!Separation_item::has_interface (extras[i]))
+    if (!has_interface<Separation_item> (extras[i]))
       non_sep_extras.push_back (extras[i]);
 
   Grob *common = common_refpoint_of_array (cols, me, Y_AXIS);
index c7990558dd5d633700d412bfc100d06926c33c61..4be23042ad44bbddc007c8879714cd0c201bd35d 100644 (file)
@@ -108,7 +108,7 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
   for (vsize i = elts.size (); i--;)
     {
       Grob *g = elts[i];
-      if (g && Break_alignment_interface::has_interface (g))
+      if (has_interface<Break_alignment_interface> (g))
         {
           extract_grob_set (g, "elements", gelts);
           for (vsize j = gelts.size (); j--;)
@@ -150,7 +150,7 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
               || Spacing_interface::right_column (sp) != rc)
             continue;
 
-          if (Note_spacing::has_interface (sp))
+          if (has_interface<Note_spacing> (sp))
             {
               /*
                 The note spacing should be taken from the musical
@@ -161,7 +161,7 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
 
               dists[d] = max (dists[d], spring.min_distance ());
             }
-          else if (Staff_spacing::has_interface (sp))
+          else if (has_interface<Staff_spacing> (sp))
             {
               Spring spring = Staff_spacing::get_spacing (sp, rc, 0.0);
 
index 1ade62b0e53224ffd2568d794bf18b43de578b79..030d02e7272ca63b42df028cad1b85d59d22e9c3 100644 (file)
@@ -64,7 +64,7 @@ Spacing_interface::skylines (Grob *me, Grob *right_col)
             if (Item *piece = g->find_prebroken_piece (break_dirs[d]))
               g = piece;
 
-          if (g && Separation_item::has_interface (g) && g->get_column () == columns[d])
+          if (has_interface<Separation_item> (g) && g->get_column () == columns[d])
             {
               SCM sky_scm = g->get_property ("horizontal-skylines");
               Skyline_pair *sky = unsmob<Skyline_pair> (sky_scm);
@@ -144,9 +144,9 @@ get_note_columns (vector<Grob *> const &elts)
 
   for (vsize i = 0; i < elts.size (); i++)
     {
-      if (Note_column::has_interface (elts[i]))
+      if (has_interface<Note_column> (elts[i]))
         ret.push_back (dynamic_cast<Item *> (elts[i]));
-      else if (Separation_item::has_interface (elts[i]))
+      else if (has_interface<Separation_item> (elts[i]))
         {
           extract_grob_set (elts[i], "elements", more_elts);
           vector<Item *> ncs = get_note_columns (more_elts);
index c3846e694ddd6ffe4b31c6618da5f7ae378c7b86..15f77f34a0bcc0283ca5119af4e5958b9df24c06 100644 (file)
@@ -155,7 +155,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
             {
               Spring spring = Spacing_spanner::note_spacing (spacing, loose_col,
                                                              next_col, &options);
-              if (Note_spacing::has_interface (spacing))
+              if (has_interface<Note_spacing> (spacing))
                 spring = Note_spacing::get_spacing (spacing, next_col,
                                                     spring, options.increment_);
 
index f6f532125afa31cf9720e2cd92b0e3c700e5b98e..cc353bc365896abd19b5ada958a688d5a3d8a27e 100644 (file)
@@ -351,7 +351,7 @@ Spacing_spanner::musical_column_spacing (Grob *me,
           /*
             This is probably a waste of time in the case of polyphonic
             music.  */
-          if (found_matching_column && Note_spacing::has_interface (wish))
+          if (found_matching_column && has_interface<Note_spacing> (wish))
             {
               Real inc = options->increment_;
               Grob *gsp = unsmob<Grob> (left_col->get_object ("grace-spacing"));
@@ -489,7 +489,7 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
         {
           Item *spacing_grob = dynamic_cast<Item *> (wishes[i]);
 
-          if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
+          if (!spacing_grob || !has_interface<Staff_spacing> (spacing_grob))
             continue;
 
           /*
index 11fb185a877b934364f7a8dcaf28a8f7f7d41fa1..c8e51f56f8ee4585ac4b5242c4151e238dd1d3b6 100644 (file)
@@ -44,7 +44,7 @@ using namespace std;
 Real
 Staff_spacing::optical_correction (Grob *me, Grob *g, Interval bar_height)
 {
-  if (!g || !Note_column::has_interface (g))
+  if (!g || !has_interface<Note_column> (g))
     return 0;
 
   Grob *stem = Note_column::get_stem (g);
index 2f245fda9be2c8fcbebd23a80a825530462141c2..09b3d2856ec5405162e50f58e817a2e784933cce 100644 (file)
@@ -48,7 +48,7 @@ Staff_symbol_referencer::on_staff_line (Grob *me, int pos)
 Grob *
 Staff_symbol_referencer::get_staff_symbol (Grob *me)
 {
-  if (Staff_symbol::has_interface (me))
+  if (has_interface<Staff_symbol> (me))
     return me;
 
   SCM st = me->get_object ("staff-symbol");
index 75d25f43cf4f1d5cc5a4e2f6b26c0b34b4111d89..5f71607a37b89b8877ea58c832c9521cb0163aa7 100644 (file)
@@ -261,7 +261,7 @@ Stem_tremolo::calc_direction (SCM smob)
    */
   Grob *maybe_nc = stem->get_parent (X_AXIS)->get_parent (X_AXIS);
   bool whole_note = Stem::duration_log (stem) <= 0;
-  if (whole_note && Note_collision_interface::has_interface (maybe_nc))
+  if (whole_note && has_interface<Note_collision_interface> (maybe_nc))
     {
       Drul_array<bool> avoid_me (false, false);
       vector<int> all_nhps = Note_collision_interface::note_head_positions (maybe_nc);
index 2fad60d10598f139753cfa87e5c11bab0feb8605..9cb84f57faa424b38df02d44e3086e06d6714629 100644 (file)
@@ -266,9 +266,9 @@ Stem::add_head (Grob *me, Grob *n)
 {
   n->set_object ("stem", me->self_scm ());
 
-  if (Note_head::has_interface (n))
+  if (has_interface<Note_head> (n))
     Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), n);
-  else if (Rest::has_interface (n))
+  else if (has_interface<Rest> (n))
     Pointer_group_interface::add_grob (me, ly_symbol2scm ("rests"), n);
 }
 
index a511a32b678515d3ccc5dd468a768810d0b7d4b7..4a18ab52b7fd8c8b61d153d182fe79afad490208 100644 (file)
@@ -414,7 +414,7 @@ System::vertical_skyline_elements (SCM smob)
   vector<Grob *> vertical_skyline_grobs;
   extract_grob_set (me_grob, "elements", my_elts);
   for (vsize i = 0; i < my_elts.size (); i++)
-    if (System_start_delimiter::has_interface (my_elts[i]))
+    if (has_interface<System_start_delimiter> (my_elts[i]))
       vertical_skyline_grobs.push_back (my_elts[i]);
 
   System *me = dynamic_cast<System *> (me_grob);
@@ -429,7 +429,7 @@ System::vertical_skyline_elements (SCM smob)
   extract_grob_set (align, "elements", elts);
 
   for (vsize i = 0; i < elts.size (); i++)
-    if (Hara_kiri_group_spanner::has_interface (elts[i]))
+    if (has_interface<Hara_kiri_group_spanner> (elts[i]))
       vertical_skyline_grobs.push_back (elts[i]);
 
   SCM grobs_scm = Grob_array::make_array ();
@@ -763,7 +763,7 @@ System::get_vertical_alignment (SCM smob)
   extract_grob_set (me, "elements", elts);
   Grob *ret = 0;
   for (vsize i = 0; i < elts.size (); i++)
-    if (Align_interface::has_interface (elts[i]))
+    if (has_interface<Align_interface> (elts[i]))
       {
         if (ret)
           me->programming_error ("found multiple vertical alignments in this system");
@@ -792,7 +792,7 @@ System::get_extremal_staff (Direction dir, Interval const &iv)
   vsize end = (dir == UP) ? elts.size () : VPOS;
   for (vsize i = start; i != end; i += dir)
     {
-      if (Hara_kiri_group_spanner::has_interface (elts[i]))
+      if (has_interface<Hara_kiri_group_spanner> (elts[i]))
         Hara_kiri_group_spanner::consider_suicide (elts[i]);
 
       Interval intersection = elts[i]->extent (this, X_AXIS);
@@ -822,7 +822,7 @@ System::get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interva
       if (elts[i] == vertical_axis_group)
         return out;
 
-      if (Hara_kiri_group_spanner::has_interface (elts[i]))
+      if (has_interface<Hara_kiri_group_spanner> (elts[i]))
         Hara_kiri_group_spanner::consider_suicide (elts[i]);
 
       bounds.intersect (elts[i]->spanned_rank_interval ());
@@ -917,7 +917,7 @@ System::calc_pure_relevant_grobs (SCM smob)
 
   for (vsize i = 0; i < elts.size (); ++i)
     {
-      if (!Axis_group_interface::has_interface (elts[i]))
+      if (!has_interface<Axis_group_interface> (elts[i]))
         {
           relevant_grobs.push_back (elts[i]);
 
index 8a0ef24139a5b8481e84e4277de5ff8a105cc36e..5f111a8581274bc026c21059f09da714f836a214 100644 (file)
@@ -40,7 +40,7 @@ Tie_column::add_tie (Grob *tc, Spanner *tie)
   Spanner *me = dynamic_cast<Spanner *> (tc);
 
   if (tie->get_parent (Y_AXIS)
-      && Tie_column::has_interface (tie->get_parent (Y_AXIS)))
+      && has_interface<Tie_column> (tie->get_parent (Y_AXIS)))
     return;
 
   if (!me->get_bound (LEFT)
index ad08638ebb000d81b22ba4a050c7f0aa0e2a0636..905718469cf0b7e696366219b37c6cee5acf4169 100644 (file)
@@ -99,7 +99,7 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item *> bounds,
   for (vsize i = 0; i < bounds.size (); i++)
     {
       Grob *head = bounds[i];
-      if (!Note_head::has_interface (head))
+      if (!has_interface<Note_head> (head))
         continue;
 
       if (!stem)
index ae81317e392665ac08cca89a1926e7853c342f04..849e859eb59e1d38689b6e42daa621f75288451a 100644 (file)
@@ -64,7 +64,7 @@ Item *
 Tie::head (Spanner *me, Direction d)
 {
   Item *it = me->get_bound (d);
-  return Note_head::has_interface (it) ? it : 0;
+  return has_interface<Note_head> (it) ? it : 0;
 }
 
 int
@@ -146,8 +146,8 @@ Tie::calc_direction (SCM smob)
   // types.  It might be clearer to use a template.
   Grob *me = unsmob<Grob> (smob);
   Grob *yparent = me->get_parent (Y_AXIS);
-  if ((Tie_column::has_interface (yparent)
-       || Semi_tie_column::has_interface (yparent))
+  if ((has_interface<Tie_column> (yparent)
+       || has_interface<Semi_tie_column> (yparent))
       && unsmob<Grob_array> (yparent->get_object ("ties"))
       //      && unsmob<Grob_array> (yparent->get_object ("ties"))->size () > 1
      )
@@ -209,8 +209,8 @@ Tie::calc_control_points (SCM smob)
   Spanner *me = LY_ASSERT_SMOB(Spanner, smob, 1);
 
   Grob *yparent = me->get_parent (Y_AXIS);
-  if ((Tie_column::has_interface (yparent)
-       || Semi_tie_column::has_interface (yparent))
+  if ((has_interface<Tie_column> (yparent)
+       || has_interface<Semi_tie_column> (yparent))
       && unsmob<Grob_array> (yparent->get_object ("ties")))
     {
       extract_grob_set (yparent, "ties", ties);
index a1ad69c72acda43ff5f3eefbddb2374174a0d4fc..17e1194de80762822da92ed5e7d8767bc6a8a7d0 100644 (file)
@@ -64,7 +64,7 @@ get_x_bound_item (Grob *me_grob, Direction hdir, Direction my_dir)
 {
   Spanner *me = dynamic_cast<Spanner *> (me_grob);
   Item *g = me->get_bound (hdir);
-  if (Note_column::has_interface (g)
+  if (has_interface<Note_column> (g)
       && Note_column::get_stem (g)
       && Note_column::dir (g) == my_dir)
     g = Note_column::get_stem (g);
index c8781ca14d0d2b7d9dcae542b4fa2c597a3b30b1..4d879ade4c46b37fb143339358a592b11e76971d 100644 (file)
@@ -272,7 +272,7 @@ Tuplet_number::calc_x_offset (SCM smob)
 
   for (LEFT_and_RIGHT (d))
     {
-      if (Note_column::has_interface (bounds[d])
+      if (has_interface<Note_column> (bounds[d])
           && Note_column::get_stem (bounds[d]))
         bounds[d] = Note_column::get_stem (bounds[d]);
       bound_poss[d] = Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[-d];
index d28d0d74a3b121e2c27828d92732920b36f12333..6a47809fd728d64fe33f03020bae8440cfb79d30 100644 (file)
@@ -120,7 +120,7 @@ Vertical_align_engraver::qualifies (Grob_info i) const
 {
   int sz = i.origin_contexts ((Translator *)this).size ();
 
-  return sz > 0 && Axis_group_interface::has_interface (i.grob ())
+  return sz > 0 && has_interface<Axis_group_interface> (i.grob ())
          && !i.grob ()->get_parent (Y_AXIS)
          && !to_boolean (i.grob ()->get_property ("no-alignment"))
          && Axis_group_interface::has_axis (i.grob (), Y_AXIS);