Ring Class Reference

#include <ring.h>

List of all members.

Public Member Functions

Ring construction functions
 Ring ()
 Ring (vector< Atom * > *, vector< Bond * > *)
 ~Ring ()
void addBond (Bond *aBond, bool silentError=false) throw ( CError )
void addAtom (Atom *anAtom, bool silentError=false) throw ( CError )
Accessor functions
int getID ()
void setID (int a)
vector< Bond * > * getBonds ()
Ring manipulation functions
bool hasAtom (Atom *anAtom)
bool hasBond (Bond *aBond)
bool equals (Ring *anotherRing)
Output functions
string toStringShort ()
string toString ()
void describeShort ()
void describe ()

Protected Attributes

vector< Bond * > bonds
int id


Detailed Description

This class implements the notion of ring. It contains a list of atoms.

Author:
Jean-Luc Perret


Constructor & Destructor Documentation

Ring::Ring  ) 
 

class constructor.

Ring::Ring vector< Atom * > *  ,
vector< Bond * > * 
 

class constructor.

Ring::~Ring  ) 
 

class desctructor.


Member Function Documentation

void Ring::addAtom Atom anAtom,
bool  silentError = false
throw ( CError )
 

adds an atom to the ring.

void Ring::addBond Bond aBond,
bool  silentError = false
throw ( CError )
 

adds a bond to the ring. this function should only be called during ring creation from a file. Not for ring detection.

void Ring::describe  ) 
 

gives a description of the ring.

void Ring::describeShort  ) 
 

gives a short description of the ring.

bool Ring::equals Ring anotherRing  ) 
 

comparison operator.

vector<Bond*>* Ring::getBonds  )  [inline]
 

returns the vector of bonds the ring is made of.

int Ring::getID  )  [inline]
 

returns the id of the ring.

bool Ring::hasAtom Atom anAtom  ) 
 

returns true if the ring contains anAtom.

bool Ring::hasBond Bond aBond  ) 
 

returns true if the ring contains aBond.

void Ring::setID int  a  )  [inline]
 

sest the id of the ring.

string Ring::toString  ) 
 

returns a string describing of the ring.

string Ring::toStringShort  ) 
 

returns a string shortly describing of the ring.


Member Data Documentation

vector<Bond*> Ring::bonds [protected]
 

vector of bonds the ring is made of.

int Ring::id [protected]
 

stores a unique id of the ring in the molecule.


The documentation for this class was generated from the following file:
Generated on Wed Nov 28 12:12:52 2007 for ChemCpp by  doxygen 1.4.6