X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fengraver-group.hh;h=39e52f3c522e7bca705164e6d65301da2504eed5;hb=01cf114a7808fb0d519d0619f6f56c524ce60399;hp=125021cdf6122e088bea994d61709be35aa3c1bb;hpb=69b9cead5afe7164b9053d26eba582fec3825ef8;p=lilypond.git diff --git a/lily/include/engraver-group.hh b/lily/include/engraver-group.hh index 125021cdf6..39e52f3c52 100644 --- a/lily/include/engraver-group.hh +++ b/lily/include/engraver-group.hh @@ -1,44 +1,62 @@ /* - engraver-group.hh -- declare Engraver_group_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1997--2015 Han-Wen Nienhuys - (c) 1997--1998 Han-Wen Nienhuys -*/ + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ -#ifndef ENGRAVERGROUP_HH -#define ENGRAVERGROUP_HH +#ifndef ENGRAVER_GROUP_HH +#define ENGRAVER_GROUP_HH -#include "lily-proto.hh" -#include "parray.hh" -#include "plist.hh" -#include "score-elem-info.hh" #include "engraver.hh" #include "translator-group.hh" +class Announce_grob_info : public Grob_info +{ + Direction start_end_; +public: + Announce_grob_info (Grob_info gi, Direction start_end) + : Grob_info (gi), start_end_ (start_end) + { } + Direction start_end () const { return start_end_; } +}; -/** - Group a number of engravers. Usually delegates everything to its contents. - Postfix: group - */ -class Engraver_group_engraver : public Engraver, - public virtual Translator_group +class Engraver_group : public Translator_group { protected: - Array announce_info_arr_; + vector announce_infos_; + Drul_array acknowledge_hash_table_drul_; + void override (SCM); + void revert (SCM); public: - TRANSLATOR_CLONE(Engraver_group_engraver); - Engraver_group_engraver(); - ~Engraver_group_engraver(); - - DECLARE_MY_RUNTIME_TYPEINFO; - - virtual Staff_info get_staff_info() const; - virtual void do_announces(); - virtual void announce_element (Score_elem_info); + DECLARE_CLASSNAME (Engraver_group); + Engraver_group (); + virtual void derived_mark () const; + void do_announces (); + virtual void connect_to_context (Context *c); + virtual void disconnect_from_context (); + virtual void announce_grob (Grob_info, Direction start_end, + Context *reroute_context = 0); + bool pending_grobs () const; +private: + virtual void acknowledge_grobs (); }; -#endif // ENGRAVERGROUP_HH +typedef void (Engraver:: *Engraver_method) (void); + +void engraver_each (SCM list, Engraver_method method); +#endif /* ENGRAVERGROUP_HH */