BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
BALL::VIEW::ModelProcessor Class Reference

#include <BALL/VIEW/MODELS/modelProcessor.h>

Inheritance diagram for BALL::VIEW::ModelProcessor:
BALL::UnaryProcessor< Composite > BALL::PropertyManager BALL::UnaryFunctor< Composite, Processor::Result > BALL::VIEW::AddBackboneModel BALL::VIEW::AddSurfaceModel BALL::VIEW::AtomBondModelBaseProcessor BALL::VIEW::ForceModel BALL::VIEW::LabelModel BALL::VIEW::AddCartoonModel BALL::VIEW::AddBallAndStickModel BALL::VIEW::AddLineModel BALL::VIEW::AddVanDerWaalsModel BALL::VIEW::HBondModelProcessor

Public Member Functions

 ModelProcessor ()
 ModelProcessor (const ModelProcessor &model_processor)
virtual ~ModelProcessor ()
virtual void clear ()
 Clear all datastructures, but dont destroy the geometric objects.
virtual bool isValid () const
virtual void clearComposites ()
virtual void dump (std::ostream &, Size) const
GeometricObjectListgetGeometricObjects ()
 Return the list with the created geometric objects.
const GeometricObjectListgetGeometricObjects () const
 Return the list with the created geometric objects.
void setDrawingPrecision (Index precision)
Index getDrawingPrecision () const
void setSurfaceDrawingPrecision (float precision)
float getSurfaceDrawingPrecision () const
virtual bool createGeometricObjects ()
- Public Member Functions inherited from BALL::UnaryProcessor< Composite >
 UnaryProcessor ()
 UnaryProcessor (const UnaryProcessor &)
virtual ~UnaryProcessor ()
virtual bool start ()
virtual bool finish ()
virtual Processor::Result operator() (Composite &)
- Public Member Functions inherited from BALL::PropertyManager
BALL_INLINE PropertyManager ()
 Default constructor.
BALL_INLINE PropertyManager (const PropertyManager &property_manager)
 Copy constructor.
virtual ~PropertyManager ()
 Destructor.
virtual void destroy ()
 Clears all properties.
void set (const PropertyManager &property_manager)
const PropertyManageroperator= (const PropertyManager &property_manager)
void get (PropertyManager &property_manager) const
void swap (PropertyManager &property_manager)
BitVectorgetBitVector ()
const BitVectorgetBitVector () const
 operator BitVector & ()
void setProperty (Property property)
void clearProperty (Property property)
void toggleProperty (Property property)
Size countProperties () const
const NamedPropertygetNamedProperty (Position index) const
NamedPropertygetNamedProperty (Position index)
void setProperty (const NamedProperty &property)
void setProperty (const string &name)
void setProperty (const string &name, bool value)
void setProperty (const string &name, int value)
void setProperty (const string &name, unsigned int value)
void setProperty (const string &name, float value)
void setProperty (const string &name, double value)
void setProperty (const string &name, const string &value)
void setProperty (const string &name, const PersistentObject &value)
const NamedPropertygetProperty (const string &name) const
NamedPropertyIterator beginNamedProperty ()
NamedPropertyIterator endNamedProperty ()
void clearProperty (const string &name)
Size countNamedProperties () const
bool hasProperty (Property property) const
 Query for an unnamed property.
bool hasProperty (const string &name) const
 Query for a named property.
bool operator== (const PropertyManager &pm) const
bool operator!= (const PropertyManager &pm) const
 Inequality operator.
void write (PersistenceManager &pm) const
 Persistent stream writing.
bool read (PersistenceManager &pm)
 Persistent stream reading.

Protected Attributes

GeometricObjectList geometric_objects_
Index drawing_precision_
float surface_drawing_precision_

Additional Inherited Members

- Public Types inherited from BALL::UnaryFunctor< Composite, Processor::Result >
typedef Processor::Result result_type
typedef Composite argument_type
typedef Compositeargument_reference
typedef const Compositeconst_argument_reference
typedef Compositeargument_pointer
typedef const Compositeconst_argument_pointer

Detailed Description

Base class for all model processors. Every model processor has a list with all GeometricObject 's it has created. It also stores the drawing precision, it will use for creating new models. You can apply model processors like every other UnaryProcessor for Composite 's:

  Molecule m;
  ModelProcessor model_processor;
  m.apply(model_processor);

Definition at line 37 of file modelProcessor.h.

Constructor & Destructor Documentation

BALL::VIEW::ModelProcessor::ModelProcessor ( )
BALL::VIEW::ModelProcessor::ModelProcessor ( const ModelProcessor model_processor)
virtual BALL::VIEW::ModelProcessor::~ModelProcessor ( )
virtual

Destructor, calls clear

Member Function Documentation

virtual void BALL::VIEW::ModelProcessor::clear ( )
virtual

Clear all datastructures, but dont destroy the geometric objects.

Reimplemented from BALL::PropertyManager.

Reimplemented in BALL::VIEW::AddBackboneModel, BALL::VIEW::AddBallAndStickModel, BALL::VIEW::AtomBondModelBaseProcessor, BALL::VIEW::AddSurfaceModel, and BALL::VIEW::HBondModelProcessor.

virtual void BALL::VIEW::ModelProcessor::clearComposites ( )
inlinevirtual

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 in BALL::VIEW::AtomBondModelBaseProcessor, and BALL::VIEW::AddSurfaceModel.

Definition at line 65 of file modelProcessor.h.

virtual bool BALL::VIEW::ModelProcessor::createGeometricObjects ( )
inlinevirtual

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 in BALL::VIEW::AddBallAndStickModel, BALL::VIEW::AddBackboneModel, BALL::VIEW::AtomBondModelBaseProcessor, BALL::VIEW::AddSurfaceModel, and BALL::VIEW::LabelModel.

Definition at line 97 of file modelProcessor.h.

virtual void BALL::VIEW::ModelProcessor::dump ( std::ostream &  s,
Size  depth 
) const
inlinevirtual

Internal state dump. Dump the current internal state of {*this} to the output ostream s with dumping depth depth .

Parameters
s- output stream where to output the internal state of {*this}
depth- the dumping depth

Reimplemented from BALL::PropertyManager.

Reimplemented in BALL::VIEW::AddBallAndStickModel, BALL::VIEW::AddBackboneModel, BALL::VIEW::AtomBondModelBaseProcessor, BALL::VIEW::AddSurfaceModel, BALL::VIEW::AddLineModel, and BALL::VIEW::AddVanDerWaalsModel.

Definition at line 69 of file modelProcessor.h.

Index BALL::VIEW::ModelProcessor::getDrawingPrecision ( ) const
GeometricObjectList& BALL::VIEW::ModelProcessor::getGeometricObjects ( )
inline

Return the list with the created geometric objects.

Definition at line 73 of file modelProcessor.h.

const GeometricObjectList& BALL::VIEW::ModelProcessor::getGeometricObjects ( ) const
inline

Return the list with the created geometric objects.

Definition at line 77 of file modelProcessor.h.

float BALL::VIEW::ModelProcessor::getSurfaceDrawingPrecision ( ) const
virtual bool BALL::VIEW::ModelProcessor::isValid ( ) const
inlinevirtual

Test if instance is valid. Returns true if the bitvector is valid.

Returns
bool true

Reimplemented from BALL::PropertyManager.

Definition at line 59 of file modelProcessor.h.

void BALL::VIEW::ModelProcessor::setDrawingPrecision ( Index  precision)
void BALL::VIEW::ModelProcessor::setSurfaceDrawingPrecision ( float  precision)

Member Data Documentation

Index BALL::VIEW::ModelProcessor::drawing_precision_
protected

Definition at line 106 of file modelProcessor.h.

GeometricObjectList BALL::VIEW::ModelProcessor::geometric_objects_
protected

Definition at line 103 of file modelProcessor.h.

float BALL::VIEW::ModelProcessor::surface_drawing_precision_
protected

Definition at line 109 of file modelProcessor.h.