KDECore
#include <KMacroExpanderBase>
Public Member Functions | |
KWordMacroExpander (QChar c=QLatin1Char('%')) | |
Public Member Functions inherited from KMacroExpanderBase | |
KMacroExpanderBase (QChar c=QLatin1Char('%')) | |
virtual | ~KMacroExpanderBase () |
QChar | escapeChar () const |
void | expandMacros (QString &str) |
bool | expandMacrosShellQuote (QString &str, int &pos) |
bool | expandMacrosShellQuote (QString &str) |
void | setEscapeChar (QChar c) |
Protected Member Functions | |
virtual int | expandEscapedMacro (const QString &str, int pos, QStringList &ret) |
virtual bool | expandMacro (const QString &str, QStringList &ret)=0 |
virtual int | expandPlainMacro (const QString &str, int pos, QStringList &ret) |
Detailed Description
Abstract base class for simple word macro substitutors.
Use this instead of the functions in the KMacroExpander namespace if speculatively pre-filling the substitution map would be too expensive.
A typical application:
Alternatively MyClass could inherit from KWordMacroExpander directly.
Definition at line 217 of file kmacroexpander.h.
Constructor & Destructor Documentation
|
inlineexplicit |
Constructor.
- Parameters
-
c escape char indicating start of macros, or QChar::null for none
Definition at line 224 of file kmacroexpander.h.
Member Function Documentation
|
protectedvirtual |
Not to be called or reimplemented.
Reimplemented from KMacroExpanderBase.
Definition at line 285 of file kmacroexpander.cpp.
|
protectedpure virtual |
Return substitution list ret
for string macro str
.
- Parameters
-
str the macro to expand ret return variable reference. It is guaranteed to be empty when expandMacro is entered.
- Returns
true
iffchr
was a recognized macro name
|
protectedvirtual |
Not to be called or reimplemented.
Reimplemented from KMacroExpanderBase.
Definition at line 270 of file kmacroexpander.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.