BALL::NucleicAcid Class Reference
[Molecular Datastructures]

#include <BALL/KERNEL/nucleicAcid.h>

Inheritance diagram for BALL::NucleicAcid:
BALL::Molecule BALL::AtomContainer BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable

List of all members.


Public Types

Enums
enum  Property { NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES }

Public Member Functions

bool operator== (const NucleicAcid &nucleic_acid) const
bool operator!= (const NucleicAcid &nucleic_acid) const
Constructors and Destructors
 NucleicAcid ()
 NucleicAcid (const NucleicAcid &nucleic_acid, bool deep=true)
 NucleicAcid (const String &name, const String &id=BALL_NUCLEICACID_DEFAULT_ID)
virtual ~NucleicAcid ()
virtual void clear ()
virtual void destroy ()
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
Assignment Methods
void set (const NucleicAcid &nucleic_acid, bool deep=true)
NucleicAcidoperator= (const NucleicAcid &nucleic_acid)
void get (NucleicAcid &nucleic_acid, bool deep=true) const
void swap (NucleicAcid &nucleic_acid)
Accessors


NucleotidegetNucleotide (Position position)
const NucleotidegetNucleotide (Position position) const
Nucleotideget3Prime ()
const Nucleotideget3Prime () const
Nucleotideget5Prime ()
const Nucleotideget5Prime () const
void setID (const String &id)
const StringgetID () const
Size countNucleotides () const
Debugging and Diagnostics
virtual bool isValid () const
virtual void dump (std::ostream &s=std::cout, Size depth=0) const

Private Attributes

String id_

Detailed Description

Nucleic acid class.


Member Enumeration Documentation

Properties

Enumerator:
NUMBER_OF_PROPERTIES 

Reimplemented from BALL::Molecule.


Constructor & Destructor Documentation

BALL::NucleicAcid::NucleicAcid (  ) 

Default constructor.

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

Copy constructor.

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

Detailed constructor.

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

Destructor.


Member Function Documentation

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

Clear the contents of the nucleic acid.

Reimplemented from BALL::AtomContainer.

Size BALL::NucleicAcid::countNucleotides (  )  const

Return the number of Nucleotides contained in this instance NucleicAcid.

Returns:
Size - number of Nucleotides
virtual void BALL::NucleicAcid::destroy (  )  [virtual]

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

Reimplemented from BALL::AtomContainer.

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.

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

Assign a NucleicAcid object from another.

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 ==
NucleicAcid& BALL::NucleicAcid::operator= ( const NucleicAcid nucleic_acid  ) 

Assignment 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
void BALL::NucleicAcid::swap ( NucleicAcid nucleic_acid  ) 

Swap the contents of two NucleicAcid objects.


Member Data Documentation