BALL::NucleicAcid Class Reference
[Molecular Datastructures]

Nucleic acid class. More...

#include <nucleicAcid.h>

Inheritance diagram for BALL::NucleicAcid:
Inheritance graph
[legend]

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
Equality operator.
bool operator!= (const NucleicAcid &nucleic_acid) const
Inequality operator.
Constructors and Destructors
NucleicAcid ()
Default constructor.
NucleicAcid (const NucleicAcid &nucleic_acid, bool deep=true)
Copy constructor.
NucleicAcid (const String &name, const String &id=BALL_NUCLEICACID_DEFAULT_ID)
Detailed constructor.
virtual ~NucleicAcid ()
Destructor.
virtual void clear ()
Clear the contents of the nucleic acid.
virtual void destroy ()
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)
Assignment with cloning facility.
NucleicAcid & operator= (const NucleicAcid &nucleic_acid)
Assignment operator.
void get (NucleicAcid &nucleic_acid, bool deep=true) const
Assign a NucleicAcid object from another.
void swap (NucleicAcid &nucleic_acid)
Swap the contents of two NucleicAcid objects.
Accessors
Nucleotide * getNucleotide (Position position)
Get a pointer to a child Nucleotide at a given position.
const Nucleotide * getNucleotide (Position position) const
Get a pointer to a child Nucleotide at a given position.
Nucleotide * get3Prime ()
Retrieve a pointer to the Nucleotide at the 3'-end of this instance.
const Nucleotide * get3Prime () const
Retrieve a const pointer to the nucleotide at the 3'-end of this instance.
Nucleotide * get5Prime ()
Retrieve a pointer to the Nucleotide at the 5'-end of this instance.
const Nucleotide * get5Prime () const
Retrieve a const pointer to the Nucleotide at the 5'-end of this instance.
void setID (const String &id)
Set the ID of the NucleicAcid.
const String & getID () const
Retrieve the ID of the NucleicAcid.
Size countNucleotides () const
Return the number of Nucleotides contained in this instance NucleicAcid.
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.

Detailed Description

Nucleic acid class.

Member Function Documentation

Size BALL::NucleicAcid::countNucleotides ( ) const

Return the number of Nucleotides contained in this instance NucleicAcid.

Returns:
Size - number of Nucleotides

virtual void BALL::NucleicAcid::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 .

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

Reimplemented from BALL::Molecule.

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

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* BALL::NucleicAcid::get3Prime ( )

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* BALL::NucleicAcid::get5Prime ( ) const

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* BALL::NucleicAcid::get5Prime ( )

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& BALL::NucleicAcid::getID ( ) const

Retrieve the ID of the NucleicAcid.

Returns:
String the ID

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

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* BALL::NucleicAcid::getNucleotide ( Position position )

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 BALL::NucleicAcid::isValid ( ) const [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 BALL::AtomContainer.

bool BALL::NucleicAcid::operator!= ( const NucleicAcid & nucleic_acid ) const

Inequality operator.

See also:
operator ==

bool BALL::NucleicAcid::operator== ( const NucleicAcid & nucleic_acid ) const

Equality operator.

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

See also:
Object::operator ==.

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

Reads a NucleicAcid object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from BALL::Molecule.

void BALL::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 BALL::Molecule.

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

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 BALL::NucleicAcid::setID ( const String & id )

Set the ID of the NucleicAcid.

Parameters:
id the new ID

Generated on Thu Aug 6 18:30:31 2009 for BALL by doxygen 1.5.8