• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

KCharMacroExpander Class Reference

Abstract base class for single char macro substitutors. More...

#include <KMacroExpanderBase>

Inheritance diagram for KCharMacroExpander:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 KCharMacroExpander (QChar c=QLatin1Char('%'))

Protected Member Functions

virtual int expandEscapedMacro (const QString &str, int pos, QStringList &ret)
virtual bool expandMacro (QChar chr, QStringList &ret)=0
virtual int expandPlainMacro (const QString &str, int pos, QStringList &ret)

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.

Author:
Oswald Buddenhagen <ossi@kde.org>

Definition at line 253 of file kmacroexpander.h.


Constructor & Destructor Documentation

KCharMacroExpander::KCharMacroExpander ( QChar  c = QLatin1Char('%')  )  [inline, explicit]

Constructor.

Parameters:
c escape char indicating start of macros, or QChar::null for none

Definition at line 260 of file kmacroexpander.h.


Member Function Documentation

int KCharMacroExpander::expandEscapedMacro ( const QString &  str,
int  pos,
QStringList &  ret 
) [protected, virtual]

For internal use only.

Not to be called or reimplemented.

Reimplemented from KMacroExpanderBase.

Definition at line 254 of file kmacroexpander.cpp.

virtual bool KCharMacroExpander::expandMacro ( QChar  chr,
QStringList &  ret 
) [protected, pure 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 iff chr was a recognized macro name

int KCharMacroExpander::expandPlainMacro ( const QString &  str,
int  pos,
QStringList &  ret 
) [protected, virtual]

For internal use only.

Not to be called or reimplemented.

Reimplemented from KMacroExpanderBase.

Definition at line 246 of file kmacroexpander.cpp.


The documentation for this class was generated from the following files:
  • kmacroexpander.h
  • kmacroexpander.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal