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 
27  Mutator(FragmentDB* db = 0);
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  */
36  void setFragmentDB(FragmentDB* db);
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 
BALL::Mutator::db_
FragmentDB * db_
Definition: mutator.h:78
BALL::Mutator::MutatorOptions
MutatorOptions
Definition: mutator.h:20
db
db
Definition: GAFFTypeProcessor.h:74
BALL::String
Definition: string.h:56
BALL
Definition: constants.h:12
BALL::Mutator
Definition: mutator.h:12
BALL_INDEX_TYPE
BALL::FragmentDB
Definition: fragmentDB.h:44
global.h
debug.h
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50