Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Attributes | Private Member Functions

SampleTreatment Class Reference
[Metadata]

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

#include <OpenMS/METADATA/SampleTreatment.h>

Inheritance diagram for SampleTreatment:
MetaInfoInterface Digestion Modification Tagging

List of all members.

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.

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.


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

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.

const String& getComment (  )  const

returns the description of the sample treatment

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.

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.

void setComment ( const String comment  ) 

sets the description of the sample treatment


Member Data Documentation

String comment_ [protected]
String type_ [protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:56 using doxygen 1.7.1