OpenMS  2.8.0
Public Member Functions | Private Attributes | List of all members
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< unsigned, Size > &sample_to_rowindex, const std::map< String, Size > &columnname_to_columnindex)
 
std::set< unsigned > getSamples () const
 
void addSample (unsigned sample, const std::vector< String > &content={})
 
std::set< StringgetFactors () const
 
bool hasSample (unsigned sample) const
 
bool hasFactor (const String &factor) const
 
String getFactorValue (unsigned sample, const String &factor) const
 
Size getFactorColIdx (const String &factor) const
 

Private Attributes

std::vector< std::vector< String > > content_
 
std::map< unsigned, 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< unsigned, Size > &  sample_to_rowindex,
const std::map< String, Size > &  columnname_to_columnindex 
)

Member Function Documentation

◆ addSample()

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

◆ getFactorColIdx()

Size getFactorColIdx ( const String factor) const

◆ getFactors()

std::set< String > getFactors ( ) const

◆ getFactorValue()

String getFactorValue ( unsigned  sample,
const String factor 
) const

◆ getSamples()

std::set< unsigned > getSamples ( ) const

◆ hasFactor()

bool hasFactor ( const String factor) const

◆ hasSample()

bool hasSample ( unsigned  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< unsigned, Size > sample_to_rowindex_
private