#include "plist.hh"
#include "boxes.hh"
-#include "item.hh"
#include "symbol.hh"
/// a symbol which can be translated, and freely copied
/// a group of #Atom#s
struct Molecule {
- IPointerList<Atom*> ats;
+ IPointerList<Atom*> ats; // change to List<Atom>?
/****************/
-#include "glob.hh"
#include "vray.hh"
#include "interval.hh"
#include "dimen.hh"
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;
}
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;
}
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);
}
}
void
Molecule::print() const
{
- for (PCursor<Atom*> c(ats); c.ok(); c++)
+ for (iter_top(ats,c); c.ok(); c++)
c->print();
}