]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/engraver-group.hh
Run grand-replace (issue 3765)
[lilypond.git] / lily / include / engraver-group.hh
index bf3c761a2a492b989a4d6d2202c5c376ae9e18d1..8f02c20594e69ec3696e220c82e0e1b511220bb3 100644 (file)
@@ -1,90 +1,52 @@
 /*
-  engravergroup.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--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
+  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.
 
-#ifndef ENGRAVERGROUP_HH
-#define ENGRAVERGROUP_HH
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
-#include "lily-proto.hh"
-#include "parray.hh"
-#include "plist.hh"
-#include "score-elem-info.hh"
-#include "engraver.hh"
-#include "translator.hh"
+#ifndef ENGRAVER_GROUP_HH
+#define ENGRAVER_GROUP_HH
 
+#include "engraver.hh"
+#include "translator-group.hh"
 
-/**
-  Group a number of engravers. Usually delegates everything to its contents.
-  Postfix: group
-  */
-class Engraver_group_engraver : public Engraver, public virtual Translator {
+class Engraver_group : public Translator_group
+{
 protected:
-    
-    Pointer_list<Engraver*> grav_list_;
-    Link_array<Engraver_group_engraver> group_l_arr_;
-    Link_array<Engraver> nongroup_l_arr_;
-    
-    Array<Score_elem_info> announce_info_arr_;
-    
-    virtual void do_print()const;
-
-    virtual bool removable_b()const;
-
+  vector<Grob_info> announce_infos_;
+  Drul_array<SCM> acknowledge_hash_table_drul_;
+  DECLARE_LISTENER (override);
+  DECLARE_LISTENER (revert);
 public:
-    Input_engraver * igrav_l_;
-    void check_removal();
-    Engraver_group_engraver();
-    ~Engraver_group_engraver();
-    
-    bool is_bottom_engraver_b() const;
-
-    
-    /**
-      Junk #grav_l#.
-      Pre:
-      #grav_l# is in #grav_list_#
-     */
-    virtual void terminate_engraver(Engraver * grav_l);
-    
-   NAME_MEMBERS();
-    
-    /**
-      Remove #grav_l# from the list, and return it.
-     */
-    virtual Engraver * remove_engraver_p(Engraver*grav_l);
-    virtual void set_feature(Feature i);
-    virtual void sync_features();
-
-    virtual void do_pre_move_processing();
-    virtual void do_post_move_processing();
-    virtual void do_removal_processing();
-    virtual bool do_try_request(Request*);
-    virtual bool try_request(Request*);
-    virtual void do_process_requests();
-
-    virtual Staff_info get_staff_info()const;
-    
-    virtual Engraver_group_engraver * find_engraver_l(String name,String id);
-    virtual void do_announces();    
-    virtual void announce_element(Score_elem_info);
-    virtual void add(Engraver* grav_p);
-    virtual bool contains_b(Engraver*)const;
-
-    virtual Translator* find_get_translator_l(String name, String id);
-    virtual Translator * get_default_interpreter();
-    /**
-      Go up in the tree. default: choose next parent
-     */
-    Translator * ancestor_l(int l=1);
-    int depth_i() const;
-
+  VIRTUAL_COPY_CONSTRUCTOR (Translator_group, 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);
+  int pending_grob_count () 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 */