Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4093)

Unified Diff: lily/include/grob.hh

Issue 569740046: Simplify and speed up break substitution
Patch Set: reserve mem; clear mem; c++11 loops Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/grob-array.cc ('k') | lily/include/item.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/include/grob.hh
diff --git a/lily/include/grob.hh b/lily/include/grob.hh
index 69e1baca92c4930f4f7b542fb5c4036362dd28fe..c1818487ebd08d32b42a43bc9a05046353766a01 100644
--- a/lily/include/grob.hh
+++ b/lily/include/grob.hh
@@ -28,6 +28,17 @@
#include <set>
+struct Break_criterion {
+ Direction break_dir_;
+ System *root_system_;
+ System *break_system_;
+ Break_criterion() {
+ break_dir_ = CENTER;
+ root_system_ = NULL;
+ break_system_ = NULL;
+ }
+};
+
class Grob : public Smob<Grob>
{
public:
@@ -57,7 +68,7 @@ protected:
*/
SCM interfaces_;
- void substitute_object_links (SCM, SCM);
+ void substitute_object_links (Break_criterion, SCM);
Real get_offset (Axis a) const;
SCM try_callback (SCM, SCM);
SCM try_callback_on_alist (SCM *, SCM, SCM);
@@ -129,12 +140,12 @@ public:
/* class hierarchy */
virtual System *get_system () const;
static System *get_system (Grob *);
- virtual void do_break_processing ();
+ virtual void do_break_processing (System *root);
virtual Grob *find_broken_piece (System *) const;
virtual void break_breakable_item (System *);
virtual void derived_mark () const;
- virtual void handle_broken_dependencies ();
- virtual void handle_prebroken_dependencies ();
+ virtual void handle_broken_dependencies (System *root);
+ virtual void handle_prebroken_dependencies (System *root);
virtual bool internal_set_as_bound_of_spanner (Spanner *, Direction) { return false; }
/* printing */
« no previous file with comments | « lily/grob-array.cc ('k') | lily/include/item.hh » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b