#include <OpenMS/DATASTRUCTURES/StringList.h>
Public Types | |
Type definitions | |
typedef iterator | Iterator |
Mutable iterator. More... | |
typedef const_iterator | ConstIterator |
Non-mutable iterator. More... | |
typedef reverse_iterator | ReverseIterator |
Mutable reverse iterator. More... | |
typedef const_reverse_iterator | ConstReverseIterator |
Non-mutable reverse iterator. More... | |
Public Member Functions | |
template<typename StringType > | |
StringList & | operator<< (const StringType &string) |
Operator for appending entries with less code. More... | |
bool | contains (const String &s) const |
Returns if a string is contained in the list. More... | |
void | toUpper () |
Transforms all contained strings to upper case. More... | |
void | toLower () |
Transforms all contained strings to lower case. More... | |
String | concatenate (const String &glue="") const |
Concatenate the string elements and putting the glue string between elements. More... | |
Constructors and assignment operators | |
StringList () | |
Default constructor. More... | |
StringList (const StringList &rhs) | |
Copy constructor. More... | |
StringList (const std::vector< String > &rhs) | |
Constructor from vector<String> More... | |
StringList (const std::vector< std::string > &rhs) | |
Constructor from vector<string> More... | |
StringList (const QStringList &rhs) | |
Constructor from QStringList. More... | |
StringList & | operator= (const StringList &rhs) |
Assignment operator. More... | |
StringList & | operator= (const std::vector< String > &rhs) |
Assignment operator from vector<String> More... | |
StringList & | operator= (const std::vector< std::string > &rhs) |
Assignment operator vector<string> More... | |
Search methods | |
Iterator | search (const Iterator &start, const String &text, bool trim=false) |
Searches for the first line that starts with text beginning at line start . More... | |
Iterator | search (const String &text, bool trim=false) |
Searches for the first line that starts with text . More... | |
Iterator | searchSuffix (const Iterator &start, const String &text, bool trim=false) |
Searches for the first line that ends with text beginning at line start . More... | |
Iterator | searchSuffix (const String &text, bool trim=false) |
Searches for the first line that ends with text . More... | |
ConstIterator | search (const ConstIterator &start, const String &text, bool trim=false) const |
Searches for the first line that starts with text beginning at line start . More... | |
ConstIterator | search (const String &text, bool trim=false) const |
Searches for the first line that starts with text . More... | |
ConstIterator | searchSuffix (const ConstIterator &start, const String &text, bool trim=false) const |
Searches for the first line that ends with text beginning at line start . More... | |
ConstIterator | searchSuffix (const String &text, bool trim=false) const |
Searches for the first line that ends with text . More... | |
Static Public Member Functions | |
static StringList | create (const String &list, const char splitter= ',') |
Returns a list that is created by splitting the given (comma-separated) string (String are not trimmed!) More... | |
static StringList | create (const char *const *list, UInt size) |
Returns a list that is created from an array of char*. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const StringList &p) |
output stream operator More... | |
Additional Inherited Members | |
![]() | |
T | elements |
STL member. More... | |
String list.
This class is based on std::vector<String> but adds some methods for convenience.
typedef const_iterator ConstIterator |
Non-mutable iterator.
typedef const_reverse_iterator ConstReverseIterator |
Non-mutable reverse iterator.
typedef iterator Iterator |
Mutable iterator.
typedef reverse_iterator ReverseIterator |
Mutable reverse iterator.
StringList | ( | ) |
Default constructor.
StringList | ( | const StringList & | rhs | ) |
Copy constructor.
StringList | ( | const std::vector< String > & | rhs | ) |
Constructor from vector<String>
StringList | ( | const std::vector< std::string > & | rhs | ) |
Constructor from vector<string>
StringList | ( | const QStringList & | rhs | ) |
Constructor from QStringList.
Concatenate the string elements and putting the glue
string between elements.
Referenced by RNPxlReportRow::getString(), and RNPxlReportRowHeader::getString().
bool contains | ( | const String & | s | ) | const |
Returns if a string is contained in the list.
Referenced by HasActivationMethod< SpectrumType >::operator()().
|
static |
Returns a list that is created by splitting the given (comma-separated) string (String are not trimmed!)
Referenced by XMLHandler::attributeAsStringList_(), FeatureFinderAlgorithmIsotopeWavelet< OpenMS::Peak2D, FeatureType >::FeatureFinderAlgorithmIsotopeWavelet(), FeatureFinderAlgorithmMRM< PeakType, FeatureType >::FeatureFinderAlgorithmMRM(), FeatureFinderAlgorithmPicked< PeakType, FeatureType >::FeatureFinderAlgorithmPicked(), FeatureFinderAlgorithmSH< PeakType, FeatureType >::FeatureFinderAlgorithmSH(), IDEvaluationBase::getSupportedImageFormats(), TOPPViewBase::initializeDefaultParameters_(), LevMarqFitter1D::LevMarqFitter1D(), ModelFitter< PeakType, FeatureType >::ModelFitter(), MorphologicalFilter::MorphologicalFilter(), SignalToNoiseEstimatorMeanIterative< Container >::SignalToNoiseEstimatorMeanIterative(), SignalToNoiseEstimatorMedian< OpenMS::OpenMS::MSSpectrum< PeakT > >::SignalToNoiseEstimatorMedian(), SimpleExtender< PeakType, FeatureType >::SimpleExtender(), TOPPASBase::TOPPASBase(), TOPPViewBase::TOPPViewBase(), and TraceFitter< PeakType >::TraceFitter().
|
static |
Returns a list that is created from an array of char*.
|
inline |
Operator for appending entries with less code.
StringList& operator= | ( | const StringList & | rhs | ) |
Assignment operator.
StringList& operator= | ( | const std::vector< String > & | rhs | ) |
Assignment operator from vector<String>
StringList& operator= | ( | const std::vector< std::string > & | rhs | ) |
Assignment operator vector<string>
Searches for the first line that starts with text
beginning at line start
.
start | the line to start the search in |
text | the text to find |
trim | whether the line is trimmed before |
Searches for the first line that starts with text
.
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function but the search is start at the beginning of the file
ConstIterator search | ( | const ConstIterator & | start, |
const String & | text, | ||
bool | trim = false |
||
) | const |
Searches for the first line that starts with text
beginning at line start
.
start | the line to start the search in |
text | the text to find |
trim | whether the line is trimmed before |
ConstIterator search | ( | const String & | text, |
bool | trim = false |
||
) | const |
Searches for the first line that starts with text
.
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function but the search is start at the beginning of the file
Searches for the first line that ends with text
beginning at line start
.
start | the line to start the search in |
text | the text to find |
trim | whether the line is trimmed before |
Searches for the first line that ends with text
.
This is an overloaded member function, provided for convenience.
It behaves essentially like searchSuffix(const Iterator&, const String&, bool) but the search starts at the beginning of the file
ConstIterator searchSuffix | ( | const ConstIterator & | start, |
const String & | text, | ||
bool | trim = false |
||
) | const |
Searches for the first line that ends with text
beginning at line start
.
start | the line to start the search in |
text | the text to find |
trim | whether the line is trimmed before |
ConstIterator searchSuffix | ( | const String & | text, |
bool | trim = false |
||
) | const |
Searches for the first line that ends with text
.
This is an overloaded member function, provided for convenience.
It behaves essentially like searchSuffix(const Iterator&, const String&, bool) but the search starts at the beginning of the file
void toLower | ( | ) |
Transforms all contained strings to lower case.
void toUpper | ( | ) |
Transforms all contained strings to upper case.
|
friend |
output stream operator
OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:29 using doxygen 1.8.5 |