]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/staff-elem.hh
release: 0.0.46.jcn1
[lilypond.git] / lily / include / staff-elem.hh
index e2fce84582df8b177cb54f81739419c2c78ba9ae..a604385cff466692e07ef72887f8f503a3e6d0e8 100644 (file)
   Stem. So the Beam has to be calculated *before* Stem. This is
   accomplished with the dependencies field of struct Staff_elem.
 
+  (elem)
   */
-struct Staff_elem {
+class Staff_elem {
+
+    /// member: the symbols
+    Molecule *output;          // should scrap, and use temp var?
+
+
+    /**
+      This is  needed, because #output# may still be
+      NULL.
+      */
+    Offset offset_;
+    Array<Staff_elem*> dependancy_l_arr_;
+public:
     enum Status {
        ORPHAN,                 // not yet added to pstaff
        VIRGIN,                 // added to pstaff
        PRECALCING,
        PRECALCED,              // calcs before spacing done
-       POSTCALCING,
+       POSTCALCING,            // busy calculating. This is used to trap cyclic deps.
        POSTCALCED,             // after spacing calcs done
        OUTPUT,                 // molecule has been output
     } status;
@@ -68,19 +81,8 @@ protected:
     /// do calculations after determining horizontal spacing
     virtual void do_post_processing();
 
-    Array<Staff_elem*> dependants;
+    Array<Staff_elem*> dependant_l_arr_;
 
-private:
-    /// member: the symbols
-    Molecule *output;          // should scrap, and use temp var?
-
-
-    /**
-      This is  needed, because #output# may still be
-      NULL.
-      */
-    Offset offset_;
-    Array<Staff_elem*> dependencies;
 };