BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
BALL::Mutator Class Referenceabstract

#include <BALL/STRUCTURE/mutator.h>

Inheritance diagram for BALL::Mutator:
BALL::DNAMutator

Public Types

enum  MutatorOptions { NONE = 0, OPTIMIZE = 1 }
 

Public Member Functions

 Mutator (FragmentDB *db=0)
 
virtual ~Mutator ()
 
void setFragmentDB (FragmentDB *db)
 
virtual void setup ()
 
virtual void addMutation (Index i, const String &new_frag_name)=0
 
virtual void clearMutations ()=0
 
void mutate (MutatorOptions opts=NONE)
 
virtual bool optimize ()=0
 

Protected Member Functions

virtual void mutate_impl_ (MutatorOptions opts)=0
 

Protected Attributes

FragmentDBdb_
 

Private Member Functions

void freeDB_ ()
 

Private Attributes

bool keep_db_
 

Detailed Description

Definition at line 12 of file mutator.h.

Member Enumeration Documentation

This enum is used in order to finetune the behaviour of the mutate method. Currently it only offers control over the automatic use of the optimizer after successfully mutating.

Enumerator
NONE 
OPTIMIZE 

Definition at line 20 of file mutator.h.

Constructor & Destructor Documentation

BALL::Mutator::Mutator ( FragmentDB db = 0)

The default constructor can be used to pass a FragmentDB instance to the Mutator. If 0 is passed, a default FragmentDB is instanciated once setup() has been called

virtual BALL::Mutator::~Mutator ( )
virtual

Member Function Documentation

virtual void BALL::Mutator::addMutation ( Index  i,
const String new_frag_name 
)
pure virtual

Adds a mutation to the list of scheduled mutations. Note that it is usually not advisable to conduct too many changes on your structure, as with a growing number mutations results become more and more unreliable.

Exceptions
NotInitializedThis exception is thrown whenever the Mutator needs further information. Usually the Molecule which to mutate needs to be supplied.

Implemented in BALL::DNAMutator.

virtual void BALL::Mutator::clearMutations ( )
pure virtual

Clear the list of scheduled mutations

Implemented in BALL::DNAMutator.

void BALL::Mutator::freeDB_ ( )
private
void BALL::Mutator::mutate ( MutatorOptions  opts = NONE)

Apply the list of scheduled mutations.

Note
This will modify your original structure and most likely render iterators and pointers invalid.
virtual void BALL::Mutator::mutate_impl_ ( MutatorOptions  opts)
protectedpure virtual

Implemented in BALL::DNAMutator.

virtual bool BALL::Mutator::optimize ( )
pure virtual

Optimize the structure that was obtained during minimization

Implemented in BALL::DNAMutator.

void BALL::Mutator::setFragmentDB ( FragmentDB db)
virtual void BALL::Mutator::setup ( )
virtual

Calling this method explicitly circumvents lazy loading of the FragmentDB. This method has no effect if mutate has already been called or if valid instances of the fragmentDB has been passed via the constructor.

Warning
If you called setup() and then set the FragmentDB to NULL via setFragmentDB() you will need to call setup() again in order to prevent lazy loading.

Reimplemented in BALL::DNAMutator.

Member Data Documentation

FragmentDB* BALL::Mutator::db_
protected

Definition at line 78 of file mutator.h.

bool BALL::Mutator::keep_db_
private

Definition at line 83 of file mutator.h.