Source-highlight Library
srcuntabifier.h
1//
2// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3//
4// Copyright: See COPYING file that comes with this distribution
5//
6
7#ifndef SRCUNTABIFIER_H
8#define SRCUNTABIFIER_H
9
10#include "preformatter.h"
11
12namespace srchilite {
13
14using std::string;
15
19class Untabifier : public PreFormatter {
20public:
21
22 Untabifier(unsigned int nSpacesPerTab, PreFormatterPtr f = PreFormatterPtr()) :
23 PreFormatter(f), nSpacesPerTab_(nSpacesPerTab), n_(0) {
24 }
25
26 virtual const string doPreformat(const std::string &text);
27
28private:
29
31 const int nSpacesPerTab_;
32
34 unsigned int n_;
35};
36
37}
38
39#endif // SRCUNTABIFIER_H
Preformats text to be generated.
Definition: preformatter.h:31
PerFormratter to convert tabs to spaces before generation.
Definition: srcuntabifier.h:19
const int nSpacesPerTab_
the number of spaces corresponding to a tab char
Definition: srcuntabifier.h:31
virtual const string doPreformat(const std::string &text)
Preformats the passed string (protected version).
Definition: srcuntabifier.cpp:25
unsigned int n_
the counter of characters
Definition: srcuntabifier.h:34
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
boost::shared_ptr< PreFormatter > PreFormatterPtr
shared pointer for PreFormatter
Definition: preformatter.h:23