Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

SampleTreatment Class Reference
[Metadata]

#include <OpenMS/METADATA/SampleTreatment.h>

Inheritance diagram for SampleTreatment:

MetaInfoInterface Digestion Modification Tagging

List of all members.


Detailed Description

Base class for sample treatments (Digestion, Modification, Tagging, ...).

Virtual base class for all sample treatments.

The type of the treatment can be determined through the getType() method.

Public Member Functions

 SampleTreatment (const String &type)
 Constructor.
 SampleTreatment (const SampleTreatment &)
 Copy constructor.
virtual ~SampleTreatment ()
 destructor
SampleTreatmentoperator= (const SampleTreatment &)
 Assignment operator.
virtual bool operator== (const SampleTreatment &rhs) const
 Equality operator.
const StringgetType () const
 return the treatment type
const StringgetComment () const
 returns the description of the sample treatment
void setComment (const String &comment)
 sets the description of the sample treatment
virtual SampleTreatmentclone () const =0
 A clone methode.

Protected Attributes

String type_
String comment_

Private Member Functions

 SampleTreatment ()
 Default constructor hidden to force setting of a type.


Constructor & Destructor Documentation

SampleTreatment ( const String type  ) 

Constructor.

Use a unique type string for each treatment type

SampleTreatment ( const SampleTreatment  ) 

Copy constructor.

Note:
Do not forget to call it when you derive a class from SampleTreatment!

virtual ~SampleTreatment (  )  [virtual]

destructor

SampleTreatment (  )  [private]

Default constructor hidden to force setting of a type.


Member Function Documentation

SampleTreatment& operator= ( const SampleTreatment  ) 

Assignment operator.

Note:
Do not forget to call it when you derive a class from SampleTreatment!

virtual bool operator== ( const SampleTreatment rhs  )  const [virtual]

Equality operator.

The equality operators of derived classes also take a SampleTreatment reference as argument. They check the type and cast the reference to the right type if the type matches.

Note:
Do not forget to call it when you derive a class from SampleTreatment!

Reimplemented in Digestion, Modification, and Tagging.

const String& getType (  )  const

return the treatment type

The type_ has to be set in the default constructor. It is used to determine the kind of sample treatment, when only a pointer to this base class is available.

const String& getComment (  )  const

returns the description of the sample treatment

void setComment ( const String comment  ) 

sets the description of the sample treatment

virtual SampleTreatment* clone (  )  const [pure virtual]

A clone methode.

clone method that creates a copy and retuns a pointer (base class pointer). Used to copy sample treatments when only a pointer to this base class is available.

Implemented in Digestion, Modification, and Tagging.


Member Data Documentation

String type_ [protected]

String comment_ [protected]


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:47 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1