#include <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. |
|
Public Member Functions |
|
| bool | operator== (const Nucleotide &nucleotide) const |
| Equality operator. |
|
| bool | operator!= (const Nucleotide &nucleotide) const |
| Inequality operator. |
|
|
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) |
| Writes a Nucleotide object to a persistent
stream. |
|
| void | persistentRead (PersistenceManager &pm) throw (Exception::GeneralException) |
| Reads a Nucleotide object from a persistent
stream. |
|
|
Assignment
|
|
| void | set (const Nucleotide &nucleotide, bool deep=true) |
| Assignment with cloning facility.
|
|
| Nucleotide & | operator= (const Nucleotide &nucleotide) |
| Assignment operator. |
|
| void | get (Nucleotide &nucleotide, bool deep=true) const |
| Copy this instance to
nucleotide . |
|
| void | swap (Nucleotide &nucleotide) |
| Swapping of instaces of nucleotide.
|
|
|
Accessors
|
|
| NucleicAcid * | getNucleicAcid () |
| Get a pointer to the parent
NucleicAcid. |
|
| const NucleicAcid * | getNucleicAcid () const |
| Get a pointer to the parent
NucleicAcid. |
|
| void | setID (const String &id) |
| Set the ID of the nucleotide.
|
|
| const String & | getID () const |
| Retrieve the ID of the nucleotide.
|
|
| void | setInsertionCode (char insertion_code) |
| Set the insertion code of the
nucleotide. |
|
| char | getInsertionCode () const |
| Retrieve the insertion code of the
nucleotide. |
|
| void | prepend (Atom &atom) |
| Prepend an atom at position 0.
|
|
| void | append (Atom &atom) |
| Append an atom after the last
position. |
|
| void | insert (Atom &atom) |
| Insert an atom after the last
position. |
|
| void | insertBefore (Atom &atom, Composite &before) |
| Insert an atom before a given
Composite object. |
|
| void | insertAfter (Atom &atom, Composite &after) |
| Insert an atom after a given
Composite object. |
|
| bool | remove (Atom &atom) |
| Remove an atom. |
|
| void | spliceBefore (Nucleotide &nucleotide) |
Cut all children of
nucleotide and prepend them before the
children of this instance. |
|
| void | spliceAfter (Nucleotide &nucleotide) |
Cut all children of
nucleotide and append them after the children
of this instance. |
|
| void | splice (Nucleotide &nucleotide) |
Move the children of
nucleotide into this instance. |
|
|
Predicates
|
|
| bool | isTerminal () const |
| Test if this instance nucleotide is
terminal. |
|
| bool | is3Prime () const |
| Test if this instance nucleotide is
3-prime. |
|
| bool | is5Prime () const |
| Test if this instance nucleotide is
5-prime. |
|
|
Debugging and Diagnostics
|
|
| virtual bool | isValid () const |
| Internal state and consistency
self-validation. |
|
| virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
| Internal state dump. |
|
This class is used to represent nucleotides within an NucleicAcid object.
| 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::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 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 | ( | Atom & | atom | ) |
Insert an atom after the last position.
| atom | the atom to insert |
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.
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::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 otherwiseReimplemented 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 | ( | Atom & | atom | ) |
Prepend an atom at position 0.
| atom | the atom to prepend |
Reimplemented from BALL::AtomContainer.
| bool BALL::Nucleotide::remove | ( | Atom & | atom | ) |
| 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 | ( | Nucleotide & | nucleotide | ) |
Move the children of nucleotide into this
instance.
The children are inserted using spliceBefore .
| 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 | ( | 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 |
1.5.8