#include <OpenMS/DATASTRUCTURES/StringList.h>
Public Types | |
Type definitions | |
| typedef iterator | Iterator |
| Mutable iterator. | |
| typedef const_iterator | ConstIterator |
| Non-mutable iterator. | |
| typedef reverse_iterator | ReverseIterator |
| Mutable reverse iterator. | |
| typedef const_reverse_iterator | ConstReverseIterator |
| Non-mutable reverse iterator. | |
Public Member Functions | |
| template<typename StringType > | |
| StringList & | operator<< (const StringType &string) |
| Operator for appending entries with less code. | |
| bool | contains (const String &s) const |
| Returns if a string is contained in the list. | |
| void | toUpper () |
| Transforms all contained strings to upper case. | |
| void | toLower () |
| Transforms all contained strings to lower case. | |
| String | concatenate (const String &glue="") const |
Concatenate the string elements and putting the glue string between elements. | |
Constructors and assignment operators | |
| 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. | |
| 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> | |
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. | |
| Iterator | search (const String &text, bool trim=false) |
Searches for the first line that starts with text. | |
| Iterator | searchSuffix (const Iterator &start, const String &text, bool trim=false) |
Searches for the first line that ends with text beginning at line start. | |
| Iterator | searchSuffix (const String &text, bool trim=false) |
Searches for the first line that ends with text. | |
| 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. | |
| ConstIterator | search (const String &text, bool trim=false) const |
Searches for the first line that starts with text. | |
| 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. | |
| ConstIterator | searchSuffix (const String &text, bool trim=false) const |
Searches for the first line that ends with text. | |
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!). | |
| static StringList | create (const char *const *list, UInt size) |
| Returns a list that is created from an array of char*. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const StringList &p) |
| output stream operator | |
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 RNPxlReportRowHeader::getString(), and RNPxlReportRow::getString().
| bool contains | ( | const String & | s | ) | const |
Returns if a string is contained in the list.
Referenced by HasActivationMethod< SpectrumType >::operator()().
| static StringList create | ( | const String & | list, | |
| const char | splitter = ',' | |||
| ) | [static] |
Returns a list that is created by splitting the given (comma-separated) string (String are not trimmed!).
Referenced by XMLHandler::attributeAsStringList_(), FeatureFinderAlgorithmIsotopeWavelet< PeakType, 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::MSSpectrum< PeakT > >::SignalToNoiseEstimatorMedian(), SimpleExtender< PeakType, FeatureType >::SimpleExtender(), TOPPASBase::TOPPASBase(), TOPPViewBase::TOPPViewBase(), and TraceFitter< PeakType >::TraceFitter().
| static StringList create | ( | const char *const * | list, | |
| UInt | size | |||
| ) | [static] |
Returns a list that is created from an array of char*.
| StringList& operator<< | ( | const StringType & | string | ) | [inline] |
Operator for appending entries with less code.
| StringList& operator= | ( | const std::vector< String > & | rhs | ) |
Assignment operator from vector<String>
| StringList& operator= | ( | const StringList & | rhs | ) |
Assignment operator.
| StringList& operator= | ( | const std::vector< std::string > & | rhs | ) |
Assignment operator vector<string>
| 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
| 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 |
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
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
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 |
| void toLower | ( | ) |
Transforms all contained strings to lower case.
| void toUpper | ( | ) |
Transforms all contained strings to upper case.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const StringList & | p | |||
| ) | [friend] |
output stream operator
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1 |