BALL  1.5.0
mutator.h
Go to the documentation of this file.
1 #ifndef BALL_STRUCTURE_MUTATOR_H
2 #define BALL_STRUCTURE_MUTATOR_H
3 
4 #include <BALL/COMMON/debug.h>
5 #include <BALL/COMMON/global.h>
6 
7 namespace BALL
8 {
9  class String;
10  class FragmentDB;
11 
13  {
14  public:
20  enum MutatorOptions { NONE = 0, OPTIMIZE = 1 };
21 
28  virtual ~Mutator();
29 
30  /*
31  * Set a new FragmentDB instance that shall be used to obtain
32  * the new bases. If 0 is passed, a default instance will be automatically
33  * created when calling DNAMutator::mutate(). The passed instance will
34  * <b>not</b> be deleted upon destruction.
35  */
37 
46  virtual void setup();
47 
57  virtual void addMutation(Index i, const String& new_frag_name) = 0;
58 
62  virtual void clearMutations() = 0;
63 
70  void mutate(MutatorOptions opts = NONE);
71 
75  virtual bool optimize() = 0;
76 
77  protected:
79 
80  virtual void mutate_impl_(MutatorOptions opts) = 0;
81 
82  private:
83  bool keep_db_;
84  void freeDB_();
85  };
86 }
87 
88 #endif //BALL_STRUCTURE_MUTATOR_H
89 
Definition: constants.h:13
BALL_INDEX_TYPE Index
virtual void clearMutations()=0
FragmentDB * db_
Definition: mutator.h:78
virtual ~Mutator()
Mutator(FragmentDB *db=0)
void mutate(MutatorOptions opts=NONE)
virtual void setup()
virtual void addMutation(Index i, const String &new_frag_name)=0
virtual bool optimize()=0
virtual void mutate_impl_(MutatorOptions opts)=0
void setFragmentDB(FragmentDB *db)
#define BALL_EXPORT
Definition: COMMON/global.h:50