]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.21
authorfred <fred>
Sun, 24 Mar 2002 19:27:14 +0000 (19:27 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:27:14 +0000 (19:27 +0000)
hdr/molecule.hh
src/molecule.cc

index b5df9ee383ab4baceca6c48974cbeaa99d3542f5..7419e203de86dd13bb433d7f450313586975b47b 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "plist.hh"
 #include "boxes.hh"
-#include "item.hh"
 #include "symbol.hh"
 
 /// a symbol which can be translated, and freely copied
@@ -28,7 +27,7 @@ struct Atom {
 
 /// a group of #Atom#s
 struct Molecule {
-    IPointerList<Atom*> ats;
+    IPointerList<Atom*> ats;   // change to List<Atom>? 
 
     /****************/
     
index 68b8791c18d1e67767a204806831a825a702ee81..6b9db4cac3147a1020788589e1180214518430dc 100644 (file)
@@ -1,4 +1,3 @@
-#include "glob.hh"
 #include "vray.hh"
 #include "interval.hh"
 #include "dimen.hh"
@@ -46,7 +45,7 @@ String
 Molecule::TeXstring() const
 {
     String s;
-    for(PCursor<Atom*> c(ats); c.ok(); c++)
+    for(iter_top(ats,c); c.ok(); c++)
        s+=c->TeXstring();
     return s;
 }
@@ -55,7 +54,7 @@ Box
 Molecule::extent() const
 {
     Box b;
-    for(PCursor<Atom*> c(ats); c.ok(); c++)
+    for(iter_top(ats,c); c.ok(); c++)
        b.unite(c->extent());
     return b;
 }
@@ -63,14 +62,14 @@ Molecule::extent() const
 void
 Molecule::translate(Offset o)
 {
-    for (PCursor<Atom*> c(ats); c.ok(); c++)
+    for (iter_top(ats,c); c.ok(); c++)
        c->translate(o);
 }
 
 void
 Molecule::add(const Molecule &m)
 {
-    for (PCursor<Atom*> c(m.ats); c.ok(); c++) {
+    for (iter_top(m.ats,c); c.ok(); c++) {
        add(**c);
     }
 }
@@ -142,6 +141,6 @@ Molecule::Molecule(const Molecule&s)
 void
 Molecule::print() const
 {
-    for (PCursor<Atom*> c(ats); c.ok(); c++)
+    for (iter_top(ats,c); c.ok(); c++)
        c->print();
 }