#include <BALL/KERNEL/nucleotide.h>
Public Types | |
Enums | |
enum | Property { PROPERTY__5_PRIME = Residue::NUMBER_OF_PROPERTIES + 1, PROPERTY__3_PRIME, PROPERTY__NUCLEOTIDE, NUMBER_OF_PROPERTIES } |
The number of predefined properties for AtomContainer. More... | |
Public Member Functions | |
bool | operator== (const Nucleotide &nucleotide) const |
bool | operator!= (const Nucleotide &nucleotide) const |
Constructors and Destructors | |
Nucleotide () | |
Default constructor. | |
Nucleotide (const Nucleotide &nucleotide, bool deep=true) | |
Copy constructor. | |
Nucleotide (const String &name, const String &id=BALL_NUCLEOTIDE_DEFAULT_ID, char insertion_code=BALL_NUCLEOTIDE_DEFAULT_INSERTION_CODE) | |
Detailled constructor. | |
virtual | ~Nucleotide () |
Destructor. | |
virtual void | clear () |
Clears the nucleotides contents. | |
virtual void | destroy () |
Clears the nucleotides contents and removes it from all composite structures. | |
Persistence | |
void | persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException) |
void | persistentRead (PersistenceManager &pm) throw (Exception::GeneralException) |
Assignment | |
void | set (const Nucleotide &nucleotide, bool deep=true) |
Nucleotide & | operator= (const Nucleotide &nucleotide) |
void | get (Nucleotide &nucleotide, bool deep=true) const |
void | swap (Nucleotide &nucleotide) |
Accessors | |
NucleicAcid * | getNucleicAcid () |
const NucleicAcid * | getNucleicAcid () const |
void | setID (const String &id) |
const String & | getID () const |
void | setInsertionCode (char insertion_code) |
char | getInsertionCode () const |
void | prepend (Atom &atom) |
void | append (Atom &atom) |
void | insert (Atom &atom) |
void | insertBefore (Atom &atom, Composite &before) |
void | insertAfter (Atom &atom, Composite &after) |
bool | remove (Atom &atom) |
void | spliceBefore (Nucleotide &nucleotide) |
void | spliceAfter (Nucleotide &nucleotide) |
void | splice (Nucleotide &nucleotide) |
Predicates | |
bool | isTerminal () const |
bool | is3Prime () const |
bool | is5Prime () const |
Debugging and Diagnostics | |
virtual bool | isValid () const |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Private Member Functions | |
AtomContainer * | getAtomContainer (Position position) |
const AtomContainer * | getAtomContainer (Position position) const |
Size | countAtomContainers () const |
void | prepend (AtomContainer &atom_container) |
void | append (AtomContainer &atom_container) |
void | insert (AtomContainer &atom_container) |
void | insertBefore (AtomContainer &atom_container, Composite &composite) |
void | insertAfter (AtomContainer &atom_container, Composite &composite) |
void | spliceBefore (AtomContainer &atom_container) |
void | spliceAfter (AtomContainer &base_ragment) |
void | splice (AtomContainer &AtomContainer) |
bool | remove (AtomContainer &AtomContainer) |
bool | isSuperAtomContainerOf (const AtomContainer &atom_container) const |
Private Attributes | |
String | id_ |
char | insertion_code_ |
Nucleotide class. This class is used to represent nucleotides within an NucleicAcid object.
Definition at line 37 of file nucleotide.h.
The number of predefined properties for AtomContainer.
Reimplemented from BALL::Fragment.
Definition at line 49 of file nucleotide.h.
BALL::Nucleotide::Nucleotide | ( | ) |
Default constructor.
BALL::Nucleotide::Nucleotide | ( | const Nucleotide & | nucleotide, | |
bool | deep = true | |||
) |
Copy constructor.
BALL::Nucleotide::Nucleotide | ( | const String & | name, | |
const String & | id = BALL_NUCLEOTIDE_DEFAULT_ID , |
|||
char | insertion_code = BALL_NUCLEOTIDE_DEFAULT_INSERTION_CODE | |||
) |
Detailled constructor.
virtual BALL::Nucleotide::~Nucleotide | ( | ) | [virtual] |
Destructor.
void BALL::Nucleotide::append | ( | AtomContainer & | atom_container | ) | [private] |
Append an AtomContainer at the last position.
atom_container | the AtomContainer to prepend |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::append | ( | Atom & | atom | ) |
Append an atom after the last position.
atom | the atom to append |
Reimplemented from BALL::AtomContainer.
virtual void BALL::Nucleotide::clear | ( | ) | [virtual] |
Clears the nucleotides contents.
Reimplemented from BALL::AtomContainer.
Size BALL::Nucleotide::countAtomContainers | ( | ) | const [private] |
Count the child AtomContainers.
Reimplemented from BALL::AtomContainer.
virtual void BALL::Nucleotide::destroy | ( | ) | [virtual] |
Clears the nucleotides contents and removes it from all composite structures.
Reimplemented from BALL::AtomContainer.
virtual void BALL::Nucleotide::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const [virtual] |
Internal state dump. Dump the current internal state of this instance to the output ostream s with dumping depth depth .
s | output stream where to output the internal state of this instance nucleotide | |
depth | the dumping depth |
Reimplemented from BALL::Fragment.
void BALL::Nucleotide::get | ( | Nucleotide & | nucleotide, | |
bool | deep = true | |||
) | const |
Copy this instance to nucleotide . The assignment is either deep or shallow (default).
nucleotide | the nucleotide to be assigned to |
const AtomContainer* BALL::Nucleotide::getAtomContainer | ( | Position | position | ) | const [private] |
Get a constant pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.
position | of the child AtomContainer |
Reimplemented from BALL::AtomContainer.
AtomContainer* BALL::Nucleotide::getAtomContainer | ( | Position | position | ) | [private] |
Get a pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.
position | of the child AtomContainer |
Reimplemented from BALL::AtomContainer.
const String& BALL::Nucleotide::getID | ( | ) | const |
Retrieve the ID of the nucleotide.
char BALL::Nucleotide::getInsertionCode | ( | ) | const |
Retrieve the insertion code of the nucleotide.
const NucleicAcid* BALL::Nucleotide::getNucleicAcid | ( | ) | const |
Get a pointer to the parent NucleicAcid. The pointer is 0 if this instance nucleotide does not have a parent NucleicAcid.
NucleicAcid* BALL::Nucleotide::getNucleicAcid | ( | ) |
Get a pointer to the parent NucleicAcid. The pointer is 0 if this instance nucleotide does not have a parent NucleicAcid.
void BALL::Nucleotide::insert | ( | AtomContainer & | atom_container | ) | [private] |
Insert an AtomContainer at the last position.
atom_container | the AtomContainer to insert |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::insert | ( | Atom & | atom | ) |
Insert an atom after the last position.
atom | the atom to insert |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::insertAfter | ( | AtomContainer & | atom_container, | |
Composite & | after | |||
) | [private] |
Insert an AtomContainer after a given Composite object.
atom_container | the AtomContainer to insert | |
after | the Composite object to insert after |
Reimplemented from BALL::AtomContainer.
Insert an atom after a given Composite object.
atom | the atom to insert | |
after | the Composite object to insert after |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::insertBefore | ( | AtomContainer & | atom_container, | |
Composite & | before | |||
) | [private] |
Insert an AtomContainer before a given Composite object.
atom_container | the AtomContainer to insert | |
before | the Composite object to insert before |
Reimplemented from BALL::AtomContainer.
Insert an atom before a given Composite object.
atom | the atom to insert | |
before | the Composite object to insert before |
Reimplemented from BALL::AtomContainer.
bool BALL::Nucleotide::is3Prime | ( | ) | const |
Test if this instance nucleotide is 3-prime. Returns true, if this instance is the first nucleotide in its parent NucleicAcid.
bool BALL::Nucleotide::is5Prime | ( | ) | const |
Test if this instance nucleotide is 5-prime. Returns true, if this instance is the last nucleotide in its parent NucleicAcid.
bool BALL::Nucleotide::isSuperAtomContainerOf | ( | const AtomContainer & | atom_container | ) | const [private] |
Test if an AtomContainer is the parent.
atom_container | the AtomContainer to test |
Reimplemented from BALL::AtomContainer.
bool BALL::Nucleotide::isTerminal | ( | ) | const |
Test if this instance nucleotide is terminal. Returns true, if this instance is the first or last nucleotide in its parent NucleicAcid.
virtual bool BALL::Nucleotide::isValid | ( | ) | const [virtual] |
Internal state and consistency self-validation.
true
if the internal state of this instance nucleotide is correct (self-validated) and consistent, false
otherwise Reimplemented from BALL::AtomContainer.
bool BALL::Nucleotide::operator!= | ( | const Nucleotide & | nucleotide | ) | const |
Inequality operator
Nucleotide& BALL::Nucleotide::operator= | ( | const Nucleotide & | nucleotide | ) |
Assignment operator. The assignment is either deep or shallow (default).
nucleotide | the nucleotide to be copied (cloned) |
bool BALL::Nucleotide::operator== | ( | const Nucleotide & | nucleotide | ) | const |
Equality operator. Two nucleotides are equal if they have the same handle.
void BALL::Nucleotide::persistentRead | ( | PersistenceManager & | pm | ) | throw (Exception::GeneralException) [virtual] |
Reads a Nucleotide object from a persistent stream.
pm | the persistence manager |
Reimplemented from BALL::Fragment.
void BALL::Nucleotide::persistentWrite | ( | PersistenceManager & | pm, | |
const char * | name = 0 | |||
) | const throw (Exception::GeneralException) [virtual] |
Writes a Nucleotide object to a persistent stream.
pm | the persistence manager |
Reimplemented from BALL::Fragment.
void BALL::Nucleotide::prepend | ( | AtomContainer & | atom_container | ) | [private] |
Prepend an AtomContainer at position 0.
atom_container | the AtomContainer to prepend |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::prepend | ( | Atom & | atom | ) |
Prepend an atom at position 0.
atom | the atom to prepend |
Reimplemented from BALL::AtomContainer.
bool BALL::Nucleotide::remove | ( | AtomContainer & | atom_container | ) | [private] |
Remove an AtomContainer
atom_container | the AtomContainer to remove |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::set | ( | const Nucleotide & | nucleotide, | |
bool | deep = true | |||
) |
Assignment with cloning facility. The assignment is either deep or shallow (default).
nucleotide | the nucleotide to be copied (cloned) | |
deep | make a deep (=true ) or shallow (=false ) copy |
void BALL::Nucleotide::setID | ( | const String & | id | ) |
Set the ID of the nucleotide.
id | the new ID |
void BALL::Nucleotide::setInsertionCode | ( | char | insertion_code | ) |
Set the insertion code of the nucleotide.
insertion_code | the new insertion code |
void BALL::Nucleotide::splice | ( | AtomContainer & | atom_container | ) | [private] |
Move the children of {atom_container} into this instance. The children of atom_container
are inserted at its position if it is is a child of this
. Otherwise the children are inserted using spliceBefore .
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::splice | ( | Nucleotide & | nucleotide | ) |
Move the children of nucleotide
into this instance. The children are inserted using spliceBefore .
void BALL::Nucleotide::spliceAfter | ( | AtomContainer & | atom_container | ) | [private] |
Cut all children of atom_container
and append them after the children of this instance.
atom_container | the AtomContainer to access |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::spliceAfter | ( | Nucleotide & | nucleotide | ) |
Cut all children of nucleotide
and append them after the children of this instance.
nucleotide | the nucleotide to access |
void BALL::Nucleotide::spliceBefore | ( | AtomContainer & | atom_container | ) | [private] |
Cut all children of atom_container
and prepend them before the children of this instance.
atom_container | the AtomContainer to access |
Reimplemented from BALL::AtomContainer.
void BALL::Nucleotide::spliceBefore | ( | Nucleotide & | nucleotide | ) |
Cut all children of nucleotide
and prepend them before the children of this instance.
nucleotide | the nucleotide to access |
void BALL::Nucleotide::swap | ( | Nucleotide & | nucleotide | ) |
Swapping of instaces of nucleotide.
nucleotide | the instance of nucleotide to swap with |
String BALL::Nucleotide::id_ [private] |
Definition at line 309 of file nucleotide.h.
char BALL::Nucleotide::insertion_code_ [private] |
Definition at line 311 of file nucleotide.h.