Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

VIEW::AtomBondModelBaseProcessor Class Reference
[Model Processors]

AtomBondModelBaseProcessor class. More...

#include <atomBondModelBaseProcessor.h>

Inheritance diagram for VIEW::AtomBondModelBaseProcessor:

VIEW::ModelProcessor UnaryProcessor< Composite > PropertyManager UnaryFunctor< Composite, Processor::Result > VIEW::AddBallAndStickModel VIEW::AddLineModel VIEW::AddVanDerWaalsModel VIEW::HBondModelProcessor List of all members.

Public Member Functions

Constructors and Destructors
 AtomBondModelBaseProcessor () throw ()
 Default Constructor.
 AtomBondModelBaseProcessor (const AtomBondModelBaseProcessor &baseProcessor) throw ()
 Copy constructor.
virtual ~AtomBondModelBaseProcessor () throw ()
 Destructor.
virtual void clear () throw ()
 Explicit default initialization.
Assignment
virtual void set (const AtomBondModelBaseProcessor &processor) throw ()
 Assignment.
const AtomBondModelBaseProcessoroperator= (const AtomBondModelBaseProcessor &processor) throw ()
 Assignment operator.
Processor specific methods
virtual Processor::Result operator() (Composite &composite)
 Operator method.
debuggers and diagnostics
virtual void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
 Internal value dump.
virtual void clearComposites () throw ()
 Needed in derived classes, which store references to the Composite instances they worked on.
virtual bool createGeometricObjects () throw ()
 Method to create geometric objects.

Protected Member Functions

virtual void visualiseBond_ (const Bond &bond) throw ()
virtual void visualiseRings_ () throw ()
Protected members
This methods are provided for easy generation of models.

With the method insertAtom_() all Atom objects that will be part of the newly created model will be stored. This stored atoms are later used (in the method buildBondModels_()) to create the models of the Bond objects that can be reached from the atoms. The other methods are access method for the stored atoms.

void insertAtom_ (const Atom *atom) throw ()
 Insert an Atom into the used atoms structure.
void clearUsedAtoms_ () throw ()
 Clear all used atoms.
List< const Atom * > & getAtomList_ () throw ()
 Mutable inspection of the list of used atoms.
HashSet< const Atom * > & getAtomSet_ () throw ()
 Mutable inspection of the hash set of used atoms.
void buildBondModels_ ()
 Build the bond models.

Protected Attributes

vector< vector< Atom * > > rings_
HashSet< const Atom * > ring_atoms_

Detailed Description

AtomBondModelBaseProcessor class.

The class AtomBondModelBaseProcessor is the base class for all models whose structure is somewhat orientated after the Atom and Bond structure (e.g. the model Ball And Stick)


Constructor & Destructor Documentation

VIEW::AtomBondModelBaseProcessor::AtomBondModelBaseProcessor  )  throw ()
 

Default Constructor.

Clear all used Atom objects.

VIEW::AtomBondModelBaseProcessor::AtomBondModelBaseProcessor const AtomBondModelBaseProcessor baseProcessor  )  throw ()
 

Copy constructor.

virtual VIEW::AtomBondModelBaseProcessor::~AtomBondModelBaseProcessor  )  throw () [virtual]
 

Destructor.


Member Function Documentation

void VIEW::AtomBondModelBaseProcessor::buildBondModels_  )  [protected]
 

Build the bond models.

This method is called from the finish method. It iterates over every Bond object that can be reached from the stored Atom objects and calls visualiseBond_(), which has to be overloaded in derived classes.

virtual void VIEW::AtomBondModelBaseProcessor::clear  )  throw () [virtual]
 

Explicit default initialization.

Reset the state of this AtomBondModelBaseProcessor:

Reimplemented from VIEW::ModelProcessor.

Reimplemented in VIEW::AddBallAndStickModel, and VIEW::HBondModelProcessor.

virtual void VIEW::AtomBondModelBaseProcessor::clearComposites  )  throw () [virtual]
 

Needed in derived classes, which store references to the Composite instances they worked on.

Here only needed for a common interface and therefore empty.

Reimplemented from VIEW::ModelProcessor.

void VIEW::AtomBondModelBaseProcessor::clearUsedAtoms_  )  throw () [protected]
 

Clear all used atoms.

virtual bool VIEW::AtomBondModelBaseProcessor::createGeometricObjects  )  throw () [virtual]
 

Method to create geometric objects.

This method is called in Representation::update() after all operator() was called for all Composites. To be overloaded in derived classes

Reimplemented from VIEW::ModelProcessor.

Reimplemented in VIEW::AddBallAndStickModel.

virtual void VIEW::AtomBondModelBaseProcessor::dump std::ostream &  s = std::cout,
Size  depth = 0
const throw () [virtual]
 

Internal value dump.

Dump the current state to the output ostream s with dumping depth depth. Calls ModelProcessor::dump.

Parameters:
s output stream where to output the state
depth the dumping depth

Reimplemented from VIEW::ModelProcessor.

Reimplemented in VIEW::AddBallAndStickModel, VIEW::AddLineModel, and VIEW::AddVanDerWaalsModel.

List<const Atom*>& VIEW::AtomBondModelBaseProcessor::getAtomList_  )  throw () [protected]
 

Mutable inspection of the list of used atoms.

HashSet<const Atom*>& VIEW::AtomBondModelBaseProcessor::getAtomSet_  )  throw () [protected]
 

Mutable inspection of the hash set of used atoms.

void VIEW::AtomBondModelBaseProcessor::insertAtom_ const Atom atom  )  throw () [protected]
 

Insert an Atom into the used atoms structure.

All the inserted atoms will be later processed to generate the graphical representation of the Bond objects that can be reached from each inserted atom.

Parameters:
atom the Atom object to inserted

virtual Processor::Result VIEW::AtomBondModelBaseProcessor::operator() Composite composite  )  [virtual]
 

Operator method.

This method iterates over each Composite object reachable in the Composite tree. If a Composite is of kind Moleculue and has aromatic rings, these rings are stored for later processing in the finish method.

Parameters:
composite the Composite object that will be processed

Reimplemented from UnaryProcessor< Composite >.

Reimplemented in VIEW::AddBallAndStickModel, VIEW::HBondModelProcessor, VIEW::AddLineModel, and VIEW::AddVanDerWaalsModel.

const AtomBondModelBaseProcessor& VIEW::AtomBondModelBaseProcessor::operator= const AtomBondModelBaseProcessor processor  )  throw ()
 

Assignment operator.

Calls set.

virtual void VIEW::AtomBondModelBaseProcessor::set const AtomBondModelBaseProcessor processor  )  throw () [virtual]
 

Assignment.

Calls clearUsedAtoms_(). Calls ModelProcessor::set.