BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions
BALL::System Class Reference

#include <BALL/KERNEL/system.h>

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

List of all members.

Public Member Functions

bool operator== (const System &system) const
bool operator!= (const System &system) const
Constructors and Destructors
 System ()
 Default constructor.
 System (const System &system, bool deep=true)
 Copy constructor.
 System (const String &name)
 Detailled constructor.
virtual ~System ()
 Destructor.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const
void persistentRead (PersistenceManager &pm)
Assignment
void set (const System &system, bool deep=true)
Systemoperator= (const System &system)
void get (System &system, bool deep=true) const
Accessors
MoleculegetMolecule (Position position)
const MoleculegetMolecule (Position position) const
ProteingetProtein (Position position)
const ProteingetProtein (Position position) const
Size countMolecules () const
Size countFragments () const
Size countAtoms () const
Size countProteins () const
Size countChains () const
Size countSecondaryStructures () const
Size countResidues () const
Size countNucleicAcids () const
Size countNucleotides () const
void prepend (Molecule &molecule)
void append (Molecule &molecule)
void insert (Molecule &molecule)
void insertBefore (Molecule &molecule, Composite &before)
void insertAfter (Molecule &molecule, Composite &after)
bool remove (Molecule &molecule)
void spliceBefore (System &system)
void spliceAfter (System &system)
void splice (System &system)

Detailed Description

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

Definition at line 38 of file KERNEL/system.h.


Constructor & Destructor Documentation

Default constructor.

BALL::System::System ( const System system,
bool  deep = true 
)

Copy constructor.

BALL::System::System ( const String name)

Detailled constructor.

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

Destructor.


Member Function Documentation

void BALL::System::append ( Molecule molecule)

Append a molecule after the last position.

Parameters:
moleculethe molecule to append

Count the atoms in this system.

Returns:
Size the number of atoms

Reimplemented from BALL::AtomContainer.

Count the chains in this system.

Returns:
Size the number of chains

Count the fragments in this system.

Returns:
Size the number of fragments

Count the molecules in this system.

Returns:
Size the number of molecules

Count the nucleic acids in this system.

Returns:
Size the number of nucleic acids

Count the nucleotides in this system.

Returns:
Size the number of nucleotides

Count the proteins in this system.

Returns:
Size the number of proteins

Count the residues in this system.

Returns:
Size the number of residues

Count the secondary structures in this system.

Returns:
Size the number of secondary structures
void BALL::System::get ( System system,
bool  deep = true 
) const

Copying with cloning facility. The assignment is either deep or shallow (default).

Parameters:
Systemthe System to be assigned to

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.

Note:
The current implementation of this function has linear complexity
Parameters:
positionthe position of the child molecule
Returns:
Molecule* - mutable pointer to the child Molecule at position
const Molecule* BALL::System::getMolecule ( Position  position) const

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.

Note:
The current implementation of this function has linear complexity
Parameters:
positionthe position of the child molecule
Returns:
Molecule* - constant pointer to the child Molecule at position

Get a pointer to a child Protein a given position. The pointer is 0 if this instance does not have a Protein at this position.

Note:
The current implementation of this function has linear complexity
Parameters:
positionthe position of the child Protein
Returns:
Protien* - mutable pointer to the child Protein at position
const Protein* BALL::System::getProtein ( Position  position) const

Get a pointer to a child Protein a given position. The pointer is 0 if this instance does not have a Protein at this position.

Note:
The current implementation of this function has linear complexity
Parameters:
positionthe position of the child Protein
Returns:
Protien* - mutable pointer to the child Protein at position
void BALL::System::insert ( Molecule molecule)

Insert a molecule after the last position.

Parameters:
moleculethe molecule to insert
void BALL::System::insertAfter ( Molecule molecule,
Composite after 
)

Insert a molecule after a given Composite object.

Parameters:
moleculethe molecule to insert
afterthe Composite object to insert before
void BALL::System::insertBefore ( Molecule molecule,
Composite before 
)

Insert a molecule before a given Composite object.

Parameters:
moleculethe molecule to insert
beforethe Composite object to insert before
bool BALL::System::operator!= ( const System system) const

Inequality operator

See also:
operator ==
System& BALL::System::operator= ( const System system)

Assignment operator.

Parameters:
systemthe System to be copied (cloned)
Returns:
System& - this instance
bool BALL::System::operator== ( const System system) const

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

See also:
Object::operator ==

Reads a System object from a persistent stream.

Parameters:
pmthe persistence manager

Reimplemented from BALL::AtomContainer.

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

Writes a System object to a persistent stream.

Parameters:
pmthe persistence manager

Reimplemented from BALL::AtomContainer.

void BALL::System::prepend ( Molecule molecule)

Prepend a molecule at position 0.

Parameters:
moleculethe molecule to prepend

Remove a molecule.

Parameters:
moleculethe molecule to remove
void BALL::System::set ( const System system,
bool  deep = true 
)

Assignment with cloning facility. The assignment is either deep or shallow (default).

Parameters:
systemthe System to be copied (cloned)
deepmake a deep (=true) or shallow (=false) copy
void BALL::System::splice ( System system)

Move the children of system into this instance. The children are inserted using spliceBefore .

void BALL::System::spliceAfter ( System system)

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

Parameters:
systemthe system to access
void BALL::System::spliceBefore ( System system)

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

Parameters:
systemthe system to access
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines