Source-highlight Library
preformatter.h
1//
2// C++ Interface: preformatter
3//
4// Description:
5//
6//
7// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef PREFORMATTER_H
13#define PREFORMATTER_H
14
15#include <string>
16#include <boost/shared_ptr.hpp>
17
18namespace srchilite {
19
20class PreFormatter;
21
23typedef boost::shared_ptr<PreFormatter> PreFormatterPtr;
24
34
35public:
40
41 virtual ~PreFormatter();
42
48
54 const std::string preformat(const std::string &text);
55
56protected:
64 virtual const std::string doPreformat(const std::string &text);
65
66};
67
68}
69
70#endif
Preformats text to be generated.
Definition: preformatter.h:31
virtual const std::string doPreformat(const std::string &text)
Preformats the passed string (protected version).
Definition: preformatter.cpp:59
const std::string preformat(const std::string &text)
Preformats the passed string (public version)
Definition: preformatter.cpp:42
PreFormatterPtr decorator
the possible nested preformatter (Decorator pattern)
Definition: preformatter.h:33
void setPreFormatter(PreFormatterPtr f)
Sets the nested preformatter.
Definition: preformatter.cpp:33
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
boost::shared_ptr< PreFormatter > PreFormatterPtr
shared pointer for PreFormatter
Definition: preformatter.h:23