45 class SampleTreatment;
64 enum SampleState {SAMPLENULL, SOLID, LIQUID, GAS, SOLUTION,
EMULSION, SUSPENSION, SIZE_OF_SAMPLESTATE};
66 static const std::string NamesOfSampleState[SIZE_OF_SAMPLESTATE];
Base class for sample treatments (Digestion, Modification, Tagging, ...)
Definition: SampleTreatment.h:53
Meta information about the sample.
Definition: Sample.h:61
String comment_
Definition: Sample.h:169
void setOrganism(const String &organism)
sets the sample name
Sample & operator=(Sample &&) &=default
Move assignment operator.
bool operator==(const Sample &rhs) const
Equality operator.
double mass_
Definition: Sample.h:172
void setComment(const String &comment)
sets the comment (may contain newline characters)
double getConcentration() const
returns the concentration (in g/l) (default: 0.0)
void setConcentration(double concentration)
sets the concentration (in g/l)
Sample & operator=(const Sample &source)
Assignment operator.
String number_
Definition: Sample.h:168
SampleState
state of aggregation of the sample
Definition: Sample.h:64
@ EMULSION
Definition: Sample.h:64
String name_
Definition: Sample.h:167
Sample(const Sample &source)
Copy constructor.
double concentration_
Definition: Sample.h:174
Sample(Sample &&)=default
Move constructor.
void setName(const String &name)
sets the sample name
String organism_
Definition: Sample.h:170
Int countTreatments() const
returns the number of sample treatments
void setState(SampleState state)
sets the state of aggregation
SampleTreatment & getTreatment(UInt position)
returns a mutable reference to the sample treatment at the given position
const String & getOrganism() const
returns the sample name (default: "")
double getVolume() const
returns the volume (in ml) (default: 0.0)
void removeTreatment(UInt position)
removes the sample treatment at the given position
std::vector< Sample > & getSubsamples()
returns a mutable reference to the vector of subsamples that were combined to create this sample
const SampleTreatment & getTreatment(UInt position) const
returns a const reference to the sample treatment at the given position
void setNumber(const String &number)
sets the sample number (e.g. sample ID)
void setMass(double mass)
sets the mass (in gram)
const std::vector< Sample > & getSubsamples() const
returns a const reference to the vector of subsamples that were combined to create this sample
void setVolume(double volume)
sets the volume (in ml)
const String & getName() const
returns the sample name (default: "")
std::list< SampleTreatment * > treatments_
Definition: Sample.h:180
const String & getNumber() const
returns the sample number (default: "")
const String & getComment() const
returns the comment (default: "")
SampleState getState() const
returns the state of aggregation (default: SAMPLENULL)
void addTreatment(const SampleTreatment &treatment, Int before_position=-1)
adds a sample treatment before the given position (default is the end of the list)....
SampleState state_
Definition: Sample.h:171
Sample()
Default constructor.
double volume_
Definition: Sample.h:173
double getMass() const
returns the mass (in gram) (default: 0.0)
std::vector< Sample > subsamples_
Definition: Sample.h:175
void setSubsamples(const std::vector< Sample > &subsamples)
sets the vector of subsamples that were combined to create this sample
A more convenient string class.
Definition: String.h:60
int Int
Signed integer type.
Definition: Types.h:102
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
static String number(double d, UInt n)
Definition: StringUtils.h:196
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47