BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Protected Attributes
BALL::Selectable Class Reference

#include <BALL/CONCEPT/selectable.h>

Inheritance diagram for BALL::Selectable:
BALL::Composite BALL::Atom BALL::AtomContainer BALL::Bond BALL::PDBAtom BALL::SmilesParser::SPAtom BALL::Chain BALL::Fragment BALL::Molecule BALL::SecondaryStructure BALL::System BALL::SmilesParser::SPBond

List of all members.

Public Member Functions

Constructors and Destructors
 Selectable ()
 Selectable (const Selectable &selectable, bool deep=true)
virtual ~Selectable ()
virtual void clear ()
Assignment
void set (const Selectable &selectable, bool deep=true)
const Selectableoperator= (const Selectable &selectable)
void get (Selectable &selectable, bool deep=true) const
void swap (Selectable &selectable)
virtual void select ()
virtual void deselect ()
virtual void setSelected (bool selected)
Predicates
bool isSelected () const
bool operator== (const Selectable &selectable) const
bool operator!= (const Selectable &selectable) const
Storable interface.
void write (PersistenceManager &pm) const
bool read (PersistenceManager &pm)
Debugging and Diagnostics
virtual void dump (::std::ostream &s=std::cout, Size depth=0) const

Protected Attributes

bool selected_

Detailed Description

Selectable Concept. Selectable implements the ability of objects to be selected. It is used in the BALL kernel to mark parts of the kernel objects for special operations. In principle, Selectable provides a boolean flag and defines an interface to access this flag.

Interface: Storable

Definition at line 36 of file selectable.h.


Constructor & Destructor Documentation

Default Constructor. Creates a new selectable object and sets its state to unselected.

BALL::Selectable::Selectable ( const Selectable selectable,
bool  deep = true 
)

Copy constructor. Creates a copy of selectable object.

Parameters:
selectablethe Selectable object to be copied
deepignored
virtual BALL::Selectable::~Selectable ( ) [virtual]

Destructor. The destructor has no functionality.


Member Function Documentation

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

Clear the selection flag. Clear resets the selection flag to unselected.

Reimplemented in BALL::Atom, BALL::Bond, BALL::PDBAtom, BALL::Composite, BALL::Residue, BALL::Nucleotide, BALL::SecondaryStructure, BALL::AtomContainer, BALL::NucleicAcid, and BALL::Protein.

virtual void BALL::Selectable::deselect ( ) [virtual]

Deselect the object. The internal flag is set to false.

Reimplemented in BALL::Composite.

virtual void BALL::Selectable::dump ( ::std::ostream &  s = std::cout,
Size  depth = 0 
) const [virtual]
void BALL::Selectable::get ( Selectable selectable,
bool  deep = true 
) const

Copy the contents of this object into another.

Parameters:
selectablethe object to be assigned to
deepignored

Get the object state.

Returns:
bool true, if the object is selected, false otherwise
bool BALL::Selectable::operator!= ( const Selectable selectable) const

Inequality operator

const Selectable& BALL::Selectable::operator= ( const Selectable selectable)

Assignment operator. Assigns the contents of another Selectable object to this object.

Parameters:
selectablethe object to be copied
bool BALL::Selectable::operator== ( const Selectable selectable) const

Equality operator

Persistent stream reading. This method reads a boolean variable from the persistent stream using the readPrimitive method of the PersistenceManager.

Parameters:
pmthe persistence manager
virtual void BALL::Selectable::select ( ) [virtual]

Accessors Select the object. The internal flag is set to true.

Reimplemented in BALL::Composite.

void BALL::Selectable::set ( const Selectable selectable,
bool  deep = true 
)

Assign the contents of another selectable object to this object.

Parameters:
selectablethe object whose contents are to be copied
deepignored
virtual void BALL::Selectable::setSelected ( bool  selected) [inline, virtual]

For faster access

Definition at line 123 of file selectable.h.

void BALL::Selectable::swap ( Selectable selectable)

Swap the contents of two objects.

Parameters:
selectablethe object to swap contents with

Persistent stream writing. This method writes a boolean variable to the persistent stream using the writePrimitive method of the PersistenceManager.

Parameters:
pmthe persistence manager

Member Data Documentation

Definition at line 184 of file selectable.h.

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