Logo Search packages:      
Sourcecode: cdk version File versions  Download package

void org::openscience::cdk::layout::RingPlacer::checkAndMarkPlaced ( IRingSet  rs ) [inline]

Walks throught the atoms of each ring in a ring set and marks a ring as PLACED if all of its atoms have been placed.

Parameters:
rsThe ringset to be checked

Definition at line 533 of file RingPlacer.java.

References allPlaced(), org::openscience::cdk::interfaces::IAtomContainer::getAtom(), org::openscience::cdk::interfaces::IAtomContainerSet::getAtomContainer(), org::openscience::cdk::interfaces::IAtomContainerSet::getAtomContainerCount(), org::openscience::cdk::interfaces::IAtomContainer::getAtomCount(), org::openscience::cdk::CDKConstants::ISPLACED, and org::openscience::cdk::interfaces::IChemObject::setFlag().

Referenced by org::openscience::cdk::layout::StructureDiagramGenerator::generateCoordinates(), and org::openscience::cdk::layout::StructureDiagramGenerator::layoutRingSet().

      {
            IRing ring = null;
            boolean allPlaced = true;
            for (int i = 0; i < rs.getAtomContainerCount(); i++)
            {
                  ring = (IRing)rs.getAtomContainer(i);
                  allPlaced = true;
                  for (int j = 0; j < ring.getAtomCount(); j++)
                  {
                        if (!((IAtom)ring.getAtom(j)).getFlag(CDKConstants.ISPLACED))
                        {
                              allPlaced = false; 
                              break;
                        }
                  }
                  ring.setFlag(CDKConstants.ISPLACED, allPlaced);
            }
      }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index