OpenMS
ExperimentalDesign::SampleSection Class Reference

#include <OpenMS/METADATA/ExperimentalDesign.h>

Collaboration diagram for ExperimentalDesign::SampleSection:
[legend]

Public Member Functions

 SampleSection ()=default
 
 SampleSection (const std::vector< std::vector< String > > &content, const std::map< String, Size > &sample_to_rowindex, const std::map< String, Size > &columnname_to_columnindex)
 
std::set< StringgetSamples () const
 
void addSample (const String &sample, const std::vector< String > &content={})
 
std::set< StringgetFactors () const
 
bool hasSample (const String &sample) const
 
bool hasFactor (const String &factor) const
 
String getFactorValue (const String &sample_name, const String &factor) const
 
String getFactorValue (unsigned sample_idx, const String &factor) const
 
Size getFactorColIdx (const String &factor) const
 
String getSampleName (unsigned sample_row) const
 
unsigned getSampleRow (const String &sample) const
 
Size getContentSize () const
 returns the number of entries in content_ member More...
 

Private Attributes

std::vector< std::vector< String > > content_
 
std::map< String, Sizesample_to_rowindex_
 
std::map< String, Sizecolumnname_to_columnindex_
 

Constructor & Destructor Documentation

◆ SampleSection() [1/2]

SampleSection ( )
default

◆ SampleSection() [2/2]

SampleSection ( const std::vector< std::vector< String > > &  content,
const std::map< String, Size > &  sample_to_rowindex,
const std::map< String, Size > &  columnname_to_columnindex 
)

Member Function Documentation

◆ addSample()

void addSample ( const String sample,
const std::vector< String > &  content = {} 
)

◆ getContentSize()

Size getContentSize ( ) const

returns the number of entries in content_ member

◆ getFactorColIdx()

Size getFactorColIdx ( const String factor) const

◆ getFactors()

std::set< String > getFactors ( ) const

◆ getFactorValue() [1/2]

String getFactorValue ( const String sample_name,
const String factor 
) const

◆ getFactorValue() [2/2]

String getFactorValue ( unsigned  sample_idx,
const String factor 
) const

◆ getSampleName()

String getSampleName ( unsigned  sample_row) const

◆ getSampleRow()

unsigned getSampleRow ( const String sample) const

◆ getSamples()

std::set< String > getSamples ( ) const

◆ hasFactor()

bool hasFactor ( const String factor) const

◆ hasSample()

bool hasSample ( const String sample) const

Member Data Documentation

◆ columnname_to_columnindex_

std::map< String, Size > columnname_to_columnindex_
private

◆ content_

std::vector< std::vector < String > > content_
private

◆ sample_to_rowindex_

std::map< String, Size > sample_to_rowindex_
private