BALL  1.5.0
nucleicAcid.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_KERNEL_NUCLEICACID_H
6 #define BALL_KERNEL_NUCLEICACID_H
7 
8 #ifndef BALL_KERNEL_MOLECULE_H
9 # include <BALL/KERNEL/molecule.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_NUCLEOTIDE_H
13 # include <BALL/KERNEL/nucleotide.h>
14 #endif
15 
16 #define BALL_NUCLEICACID_DEFAULT_ID ""
17 
18 namespace BALL
19 {
28  : public Molecule
29  {
30  public:
31 
33 
34 
37 
38 
40  enum Property
41  {
42  NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES
43  };
44 
46 
49 
53 
56  NucleicAcid(const NucleicAcid& nucleic_acid, bool deep = true);
57 
60  NucleicAcid(const String& name,
62 
65  virtual ~NucleicAcid();
66 
69  virtual void clear();
70 
74  virtual void destroy();
75 
77 
80 
84  void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
85 
90 
92 
95 
101  void set(const NucleicAcid& nucleic_acid, bool deep = true);
102 
105  NucleicAcid& operator = (const NucleicAcid& nucleic_acid);
106 
109  void get(NucleicAcid& nucleic_acid, bool deep = true) const;
110 
113  void swap(NucleicAcid& nucleic_acid);
114 
116 
121  bool operator == (const NucleicAcid& nucleic_acid) const;
122 
126  bool operator != (const NucleicAcid& nucleic_acid) const;
127 
130 
139 
147  const Nucleotide* getNucleotide(Position position) const;
148 
154 
159  const Nucleotide* get3Prime() const;
160 
166 
171  const Nucleotide* get5Prime() const;
172 
176  void setID(const String& id);
177 
181  const String& getID() const;
182 
187 
189 
190  using Molecule::prepend;
191  using Molecule::append;
192  using Molecule::insert;
194  using Molecule::insertAfter;
195  using Molecule::remove;
196  using Molecule::splice;
198  using Molecule::spliceAfter;
199 
203 
209  virtual bool isValid() const;
210 
218  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
219 
221 
222  // --- EXTERNAL ITERATORS
223 
226 
227  private:
228 
229  // --- ATTRIBUTES
230 
231  String id_;
232  };
233 } // namespace BALL
234 
235 #endif // BALL_KERNEL_NUCLEICACID_H
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition: iterator.h:25
#define BALL_NUCLEICACID_DEFAULT_ID
Definition: nucleicAcid.h:16
#define BALL_CREATE_DEEP(name)
Definition: create.h:26
Definition: constants.h:13
BALL_EXPORT NucleotideList nucleotides(const AtomContainer &fragment, bool selected_only=false)
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
Property
The number of predefined properties for AtomContainer.
Definition: atomContainer.h:43
bool remove(Atom &atom)
void splice(AtomContainer &atom_container)
void prepend(Atom &atom)
void insert(Atom &atom)
void append(Atom &atom)
void insertBefore(Atom &atom, Composite &before)
void spliceBefore(AtomContainer &atom_container)
void insertAfter(Atom &atom, Composite &after)
void spliceAfter(AtomContainer &atom_container)
@ NUMBER_OF_PROPERTIES
Definition: molecule.h:45
virtual void destroy()
virtual void clear()
void setID(const String &id)
void set(const NucleicAcid &nucleic_acid, bool deep=true)
const Nucleotide * getNucleotide(Position position) const
NucleicAcid(const NucleicAcid &nucleic_acid, bool deep=true)
virtual bool isValid() const
virtual ~NucleicAcid()
NucleicAcid(const String &name, const String &id=BALL_NUCLEICACID_DEFAULT_ID)
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
void get(NucleicAcid &nucleic_acid, bool deep=true) const
void swap(NucleicAcid &nucleic_acid)
Nucleotide * get5Prime()
const Nucleotide * get3Prime() const
const Nucleotide * get5Prime() const
const String & getID() const
Nucleotide * get3Prime()
Nucleotide * getNucleotide(Position position)
Size countNucleotides() const
void persistentRead(PersistenceManager &pm)
void persistentWrite(PersistenceManager &pm, const char *name=0) const
#define BALL_EXPORT
Definition: COMMON/global.h:50