I'm working on solving the dot-column problem.

I have determined an algorithm that I believe will work to get the right dots, 
and to do it configurably.

But I can't get the C++ to work properly.

I've added a new function to Dot_configuration,

In dot-configuration.hh:
struct Dot_configuration : public map<int, Dot_position>
   Dot_formatting_problem const *problem_;
    Dot_configuration (Dot_formatting_problem const &);
    Real x_offset () const;
    int badness () const;
    void print () const;
    Dot_configuration shifted (int k, Direction d) const;
    void remove_collision (int p);
    void suicide_excess_dots (int shift_limit);

In dot-configuration.cc:

Dot_configuration::suicide_excess_dots (int shift_limit)
   for (Dot_configuration::const_iterator i (begin ());
        i != end (); i++)
      if (abs(i->first - i->second.pos_) > shift_limit)
        Grob *d = i->second.dot_;
        d->suicide ();

I'm trying to suicide a dot grob that is contained in the dot_ property of the 
Dot_position element of the map.

But when I try to compile this, I get the error:

error: invalid use of incomplete type 'class Grob'
        d->suicide ();
In file included from 
                 from /home/carl/lilypond-git/lily/dot-configuration.cc:21:
/home/carl/lilypond-git/lily/include/lily-proto.hh:72:7: error: forward 
declaration of 'class Grob'
 class Grob;

Can anybody (perhaps David K) give me a clue as to how I pull the grob out to 
suicide it?



lilypond-devel mailing list

Reply via email to