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

System Class Reference
[Molecular Datastructures]

System class. More...

#include <system.h>

Inheritance diagram for System:

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

Public Member Functions

bool operator== (const System &system) const throw ()
 Equality operator.
bool operator!= (const System &system) const throw ()
 Inequality operator.
Constructors and Destructors
 System () throw ()
 Default constructor.
 System (const System &system, bool deep=true) throw ()
 Copy constructor.
 System (const String &name) throw ()
 Detailled constructor.
virtual ~System () throw ()
 Destructor.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
 Writes a System object to a persistent stream.
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
 Reads a System object from a persistent stream.
Assignment
void set (const System &system, bool deep=true) throw ()
 Assignment with cloning facility.
Systemoperator= (const System &system) throw ()
 Assignment operator.
void get (System &system, bool deep=true) const throw ()
 Copying with cloning facility.
Accessors
MoleculegetMolecule (Position position) throw ()
 Get a pointer to a child Molecule at a given position.
const MoleculegetMolecule (Position position) const throw ()
 Get a pointer to a child Molecule at a given position.
Size countMolecules () const throw ()
 Count the molecules in this system.
Size countFragments () const throw ()
 Count the fragments in this system.
Size countAtoms () const throw ()
 Count the atoms in this system.
Size countProteins () const throw ()
 Count the proteins in this system.
Size countChains () const throw ()
 Count the chains in this system.
Size countSecondaryStructures () const throw ()
 Count the secondary structures in this system.
Size countResidues () const throw ()
 Count the residues in this system.
Size countNucleicAcids () const throw ()
 Count the nucleic acids in this system.
Size countNucleotides () const throw ()
 Count the nucleotides in this system.
void prepend (Molecule &molecule) throw ()
 Prepend a molecule at position 0.
void append (Molecule &molecule) throw ()
 Append a molecule after the last position.
void insert (Molecule &molecule) throw ()
 Insert a molecule after the last position.
void insertBefore (Molecule &molecule, Composite &before) throw ()
 Insert a molecule before a given Composite object.
void insertAfter (Molecule &molecule, Composite &after) throw ()
 Insert a molecule after a given Composite object.
bool remove (Molecule &molecule) throw ()
 Remove a molecule.
void spliceBefore (System &system) throw ()
 Move the children of system into this instance.
void spliceAfter (System &system) throw ()
 Move the children of system into this instance.
void splice (System &system) throw ()
 Move the children of system into this instance.

Detailed Description

System class.

This class is used to represent a system, i.e., a collection of molecules.


Member Function Documentation

void System::append Molecule molecule  )  throw ()
 

Append a molecule after the last position.

Parameters:
molecule the molecule to append

Size System::countAtoms  )  const throw ()
 

Count the atoms in this system.

Returns:
Size the number of atoms

Reimplemented from AtomContainer.

Size System::countChains  )  const throw ()
 

Count the chains in this system.

Returns:
Size the number of chains

Size System::countFragments  )  const throw ()
 

Count the fragments in this system.

Returns:
Size the number of fragments

Size System::countMolecules  )  const throw ()
 

Count the molecules in this system.

Returns:
Size the number of molecules

Size System::countNucleicAcids  )  const throw ()
 

Count the nucleic acids in this system.

Returns:
Size the number of nucleic acids

Size System::countNucleotides  )  const throw ()
 

Count the nucleotides in this system.

Returns:
Size the number of nucleotides

Size System::countProteins  )  const throw ()
 

Count the proteins in this system.

Returns:
Size the number of proteins

Size System::countResidues  )  const throw ()
 

Count the residues in this system.

Returns:
Size the number of residues

Size System::countSecondaryStructures  )  const throw ()
 

Count the secondary structures in this system.

Returns:
Size the number of secondary structures

void System::get System system,
bool  deep = true
const throw ()
 

Copying with cloning facility.

The assignment is either deep or shallow (default).

Parameters:
System the System to be assigned to

const Molecule* System::getMolecule Position  position  )  const throw ()
 

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

The pointer is 0 if this instance does not have a Molecule at this position.

Parameters:
position the position of the child molecule
Returns:
Molecule* - constant pointer to the child molecule at position

Molecule* System::getMolecule Position  position  )  throw ()
 

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

The pointer is 0 if this instance does not have a Molecule at this position.

Parameters:
position the position of the child molecule
Returns:
Molecule* - mutable pointer to the child molecule at position

void System::insert Molecule molecule  )  throw ()
 

Insert a molecule after the last position.

Parameters:
molecule the molecule to insert

void System::insertAfter Molecule molecule,
Composite after
throw ()
 

Insert a molecule after a given Composite object.

Parameters:
molecule the molecule to insert
after the Composite object to insert before

void System::insertBefore Molecule molecule,
Composite before
throw ()
 

Insert a molecule before a given Composite object.

Parameters:
molecule the molecule to insert
before the Composite object to insert before

bool System::operator!= const System system  )  const throw ()
 

Inequality operator.

See also:
operator ==

System& System::operator= const System system  )  throw ()
 

Assignment operator.

Parameters:
system the System to be copied (cloned)
Returns:
System& - this instance

bool System::operator== const System system  )  const throw ()
 

Equality operator.

Two instance of System are equal if they have the same handle.

See also:
Object::operator ==

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

Reads a System object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from AtomContainer.

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

Writes a System object to a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from AtomContainer.

void System::prepend Molecule molecule  )  throw ()
 

Prepend a molecule at position 0.

Parameters:
molecule the molecule to prepend

bool System::remove Molecule molecule  )  throw ()
 

Remove a molecule.

Parameters:
molecule the molecule to remove

void System::set const System system,
bool  deep = true
throw ()
 

Assignment with cloning facility.

The assignment is either deep or shallow (default).

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

void System::splice System system  )  throw ()
 

Move the children of system into this instance.

The children are inserted using spliceBefore .

void System::spliceAfter System system  )  throw ()
 

Move the children of system into this instance.

Cut all children of system and append them after the children of this instance.

Parameters:
system the system to access

void System::spliceBefore System system  )  throw ()
 

Move the children of system into this instance.

Cut all children of system and prepend them before the children of this instance.

Parameters:
system the system to access