kdevplatform/language/duchain
#include <stringhelpers.h>
Public Member Functions | |
ParamIterator (const QString &parens, const QString &source, int start=0) | |
~ParamIterator () | |
operator bool () const | |
QString | operator* () |
ParamIterator & | operator++ () |
uint | position () const |
QString | prefix () const |
Detailed Description
Can be used to iterate through different kinds of parameters, for example template-parameters.
Definition at line 110 of file stringhelpers.h.
Constructor & Destructor Documentation
◆ ParamIterator()
KDevelop::ParamIterator::ParamIterator | ( | const QString & | parens, |
const QString & | source, | ||
int | start = 0 |
||
) |
- Parameters
-
parens Should be a string containing the two parens between which the parameters are searched. Example: "<>" or "()" Optionally it can also contain one third end-character. If that end-character is encountered in the prefix, the iteration will be stopped.
Example: When "<>:" is given, ParamIterator will only parse the first identifier of a C++ scope
The whole search should be stopped when: A) The end-sign is found on the top-level B) A closing-brace of parameters was found
Definition at line 531 of file stringhelpers.cpp.
◆ ~ParamIterator()
|
default |
Member Function Documentation
◆ operator bool()
KDevelop::ParamIterator::operator bool | ( | ) | const |
Returns whether there is a current found parameter.
Definition at line 602 of file stringhelpers.cpp.
◆ operator*()
QString KDevelop::ParamIterator::operator* | ( | ) |
Returns current found parameter.
Definition at line 595 of file stringhelpers.cpp.
◆ operator++()
ParamIterator & KDevelop::ParamIterator::operator++ | ( | ) |
Definition at line 578 of file stringhelpers.cpp.
◆ position()
uint KDevelop::ParamIterator::position | ( | ) | const |
Definition at line 616 of file stringhelpers.cpp.
◆ prefix()
QString KDevelop::ParamIterator::prefix | ( | ) | const |
Returns the text in front of the first opening-paren(if none found then the whole text)
Definition at line 609 of file stringhelpers.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:18 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.