Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

NucleicAcid Class Reference
[Molecular Datastructures]

Nucleic acid class. More...

#include <nucleicAcid.h>

Inheritance diagram for NucleicAcid:

Molecule AtomContainer Composite PropertyManager PersistentObject Selectable Object AutoDeletable List of all members.

Public Types

Enums
enum  Property { NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES }
 Properties.

Public Member Functions

bool operator== (const NucleicAcid &nucleic_acid) const throw ()
 Equality operator.
bool operator!= (const NucleicAcid &nucleic_acid) const throw ()
 Inequality operator.
Constructors and Destructors
 NucleicAcid () throw ()
 Default constructor.
 NucleicAcid (const NucleicAcid &nucleic_acid, bool deep=true) throw ()
 Copy constructor.
 NucleicAcid (const String &name, const String &id=BALL_NUCLEICACID_DEFAULT_ID) throw ()
 Detailed constructor.
virtual ~NucleicAcid () throw ()
 Destructor.
virtual void clear () throw ()
 Clear the contents of the nucleic acid.
virtual void destroy () throw ()
 Clear the contents of the nucleic acid and remove it from parent kernel objects.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
 Writes a NucleicAcid object to a persistent stream.
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
 Reads a NucleicAcid object from a persistent stream.
Assignment Methods
void set (const NucleicAcid &nucleic_acid, bool deep=true) throw ()
 Assignment with cloning facility.
NucleicAcidoperator= (const NucleicAcid &nucleic_acid) throw ()
 Assignment operator.
void get (NucleicAcid &nucleic_acid, bool deep=true) const throw ()
 Assign a NucleicAcid object from another.
void swap (NucleicAcid &nucleic_acid) throw ()
 Swap the contents of two NucleicAcid objects.
Accessors
NucleotidegetNucleotide (Position position) throw ()
 Get a pointer to a child Nucleotide at a given position.
const NucleotidegetNucleotide (Position position) const throw ()
 Get a pointer to a child Nucleotide at a given position.
Nucleotideget3Prime () throw ()
 Retrieve a pointer to the Nucleotide at the 3'-end of this instance.
const Nucleotideget3Prime () const throw ()
 Retrieve a const pointer to the nucleotide at the 3'-end of this instance.
Nucleotideget5Prime () throw ()
 Retrieve a pointer to the Nucleotide at the 5'-end of this instance.
const Nucleotideget5Prime () const throw ()
 Retrieve a const pointer to the Nucleotide at the 5'-end of this instance.
void setID (const String &id) throw ()
 Set the ID of the NucleicAcid.
const StringgetID () const throw ()
 Retrieve the ID of the NucleicAcid.
Size countNucleotides () const throw ()
 Return the number of Nucleotides contained in this instance NucleicAcid.
Debugging and Diagnostics
virtual bool isValid () const throw ()
 Internal state and consistency self-validation.
virtual void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
 Internal state dump.

Detailed Description

Nucleic acid class.


Constructor & Destructor Documentation

NucleicAcid::NucleicAcid  )  throw ()
 

Default constructor.

NucleicAcid::NucleicAcid const NucleicAcid nucleic_acid,
bool  deep = true
throw ()
 

Copy constructor.

NucleicAcid::NucleicAcid const String name,
const String id = BALL_NUCLEICACID_DEFAULT_ID
throw ()
 

Detailed constructor.

virtual NucleicAcid::~NucleicAcid  )  throw () [virtual]
 

Destructor.


Member Function Documentation

virtual void NucleicAcid::clear  )  throw () [virtual]
 

Clear the contents of the nucleic acid.

Reimplemented from AtomContainer.

Size NucleicAcid::countNucleotides  )  const throw ()
 

Return the number of Nucleotides contained in this instance NucleicAcid.

Returns:
Size - number of Nucleotides

virtual void NucleicAcid::destroy  )  throw () [virtual]
 

Clear the contents of the nucleic acid and remove it from parent kernel objects.

Reimplemented from AtomContainer.

virtual void NucleicAcid::dump std::ostream &  s = std::cout,
Size  depth = 0
const throw () [virtual]
 

Internal state dump.

Dump the current internal state of this instance to the output ostream s with dumping depth depth .

Parameters:
s - output stream where to output the internal state of this instance
depth - the dumping depth

Reimplemented from Molecule.

void NucleicAcid::get NucleicAcid nucleic_acid,
bool  deep = true
const throw ()
 

Assign a NucleicAcid object from another.

const Nucleotide* NucleicAcid::get3Prime  )  const throw ()
 

Retrieve a const pointer to the nucleotide at the 3'-end of this instance.

The pointer is 0 if this instance does not have a Nucleotide.

Returns:
Nucleotide* - constant pointer to the first child Nucleotide

Nucleotide* NucleicAcid::get3Prime  )  throw ()
 

Retrieve a pointer to the Nucleotide at the 3'-end of this instance.

The pointer is 0 if this instance does not have a Nucleotide.

Returns:
Nucleotide* - mutable pointer to the first child Nucleotide

const Nucleotide* NucleicAcid::get5Prime  )  const throw ()
 

Retrieve a const pointer to the Nucleotide at the 5'-end of this instance.

The pointer is 0 if this instance does not have a Nucleotide.

Returns:
Nucleotide* - constant pointer to the last child Nucleotide

Nucleotide* NucleicAcid::get5Prime  )  throw ()
 

Retrieve a pointer to the Nucleotide at the 5'-end of this instance.

The pointer is 0 if this instance does not have a Nucleotide.

Returns:
Nucleotide* - mutable pointer to the last child Nucleotide

const String& NucleicAcid::getID  )  const throw ()
 

Retrieve the ID of the NucleicAcid.

Returns:
String the ID

const Nucleotide* NucleicAcid::getNucleotide Position  position  )  const throw ()
 

Get a pointer to a child Nucleotide at a given position.

The pointer is 0 if this instance does not have a Nucleotide at the given position.

Parameters:
position the position of the child Nucleotide
Returns:
Nucleotide* - constant pointer to the child Nucleotide at positon

Nucleotide* NucleicAcid::getNucleotide Position  position  )  throw ()
 

Get a pointer to a child Nucleotide at a given position.

The pointer is 0 if this instance does not have a Nucleotide at the given position.

Parameters:
position the position of the child Nucleotide
Returns:
Nucleotide* - mutable pointer to the child Nucleotide at positon

virtual bool NucleicAcid::isValid  )  const throw () [virtual]
 

Internal state and consistency self-validation.

Returns:
bool - true if the internal state of this instance atom is correct (self-validated) and consistent, false otherwise

Reimplemented from AtomContainer.

bool NucleicAcid::operator!= const NucleicAcid nucleic_acid  )  const throw ()
 

Inequality operator.

See also:
operator ==

NucleicAcid& NucleicAcid::operator= const NucleicAcid nucleic_acid  )  throw ()
 

Assignment operator.

bool NucleicAcid::operator== const NucleicAcid nucleic_acid  )  const throw ()
 

Equality operator.

Two nucleic acids are equal if they have the same handle.

See also:
Object::operator ==.

void NucleicAcid::persistentRead PersistenceManager pm  )  throw (Exception::GeneralException) [virtual]
 

Reads a NucleicAcid object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from Molecule.

void NucleicAcid::persistentWrite PersistenceManager pm,
const char *  name = 0
const throw (Exception::GeneralException) [virtual]
 

Writes a NucleicAcid object to a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from Molecule.

void NucleicAcid::set const NucleicAcid nucleic_acid,
bool  deep = true
throw ()
 

Assignment with cloning facility.

The assignment is either deep or shallow (default).

Parameters:
nucleic_acid the NucleicAcid to be copied (cloned)
deep make a deep (=true) or shallow (=false) copy

void NucleicAcid::setID const String id  )  throw ()
 

Set the ID of the NucleicAcid.

Parameters:
id the new ID

void NucleicAcid::swap NucleicAcid nucleic_acid  )  throw ()
 

Swap the contents of two NucleicAcid objects.