KCharMacroExpander
#include <KMacroExpanderBase>
Public Member Functions | |
KCharMacroExpander (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) |
bool | expandMacrosShellQuote (QString &str, int &pos) |
void | setEscapeChar (QChar c) |
Protected Member Functions | |
int | expandEscapedMacro (const QString &str, int pos, QStringList &ret) override |
virtual bool | expandMacro (QChar chr, QStringList &ret)=0 |
int | expandPlainMacro (const QString &str, int pos, QStringList &ret) override |
Protected Member Functions inherited from KMacroExpanderBase |
Detailed Description
Abstract base class for single char macro substitutors.
Use this instead of the functions in the KMacroExpander namespace if speculatively pre-filling the substitution map would be too expensive.
See KWordMacroExpander for a sample application.
Definition at line 246 of file kmacroexpander.h.
Constructor & Destructor Documentation
◆ KCharMacroExpander()
|
inlineexplicit |
Constructor.
- Parameters
-
c escape char indicating start of macros, or QChar::null for none
Definition at line 253 of file kmacroexpander.h.
Member Function Documentation
◆ expandEscapedMacro()
|
overrideprotectedvirtual |
Not to be called or reimplemented.
Reimplemented from KMacroExpanderBase.
Definition at line 250 of file kmacroexpander.cpp.
◆ expandMacro()
|
protectedpure virtual |
Return substitution list ret
for single-character macro chr
.
- Parameters
-
chr 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
◆ expandPlainMacro()
|
overrideprotectedvirtual |
Not to be called or reimplemented.
Reimplemented from KMacroExpanderBase.
Definition at line 242 of file kmacroexpander.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.