BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions | Private Attributes
BALL::NucleicAcid Class Reference

#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
void persistentRead (PersistenceManager &pm)
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.

Definition at line 27 of file nucleicAcid.h.


Member Enumeration Documentation

Properties

Enumerator:
NUMBER_OF_PROPERTIES 

Reimplemented from BALL::Molecule.

Definition at line 40 of file nucleicAcid.h.


Constructor & Destructor Documentation

Default constructor.

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

Copy constructor.

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.

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.

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

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

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

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

Retrieve the ID of the NucleicAcid.

Returns:
String the ID

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:
positionthe position of the child Nucleotide
Returns:
Nucleotide* - mutable pointer to the child Nucleotide at positon

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:
positionthe position of the child Nucleotide
Returns:
Nucleotide* - constant 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 ==.

Reads a NucleicAcid object from a persistent stream.

Parameters:
pmthe persistence manager

Reimplemented from BALL::Molecule.

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

Writes a NucleicAcid object to a persistent stream.

Parameters:
pmthe 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_acidthe NucleicAcid to be copied (cloned)
deepmake a deep (=true) or shallow (=false) copy
void BALL::NucleicAcid::setID ( const String id)

Set the ID of the NucleicAcid.

Parameters:
idthe new ID
void BALL::NucleicAcid::swap ( NucleicAcid nucleic_acid)

Swap the contents of two NucleicAcid objects.


Member Data Documentation

Definition at line 231 of file nucleicAcid.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines