20#ifndef _CHARTRANSLATOR_H
21#define _CHARTRANSLATOR_H
23#define NUM_OF_CHARS 256
26#include <boost/regex.hpp>
28#include "preformatter.h"
57 virtual const std::string
doPreformat(
const std::string &text);
82typedef boost::shared_ptr<CharTranslator> CharTranslatorPtr;
Translates specific character sequences into corresponding ones; it can also use regular expression f...
Definition: chartranslator.h:39
boost::regex * reg_exp
the actual regular expression
Definition: chartranslator.h:48
const std::string toString() const
returns a string representation: what we translate and into what we translate
Definition: chartranslator.h:77
std::string translation_exp
the translation regular expression (for buffering)
Definition: chartranslator.h:44
virtual const std::string doPreformat(const std::string &text)
The actual preformatting (char translation)
Definition: chartranslator.cc:55
bool bol
whether we are at the beginning of a new line
Definition: chartranslator.h:50
CharTranslator(PreFormatterPtr f=PreFormatterPtr())
Definition: chartranslator.cc:31
unsigned int counter
keeps track of the translation patterns added
Definition: chartranslator.h:42
std::string translation_format
the corresponding translated regular expression (for buffering)
Definition: chartranslator.h:46
void set_translation(const std::string &s1, const std::string &s2)
Adds a translation pair.
Definition: chartranslator.cc:40
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
boost::shared_ptr< PreFormatter > PreFormatterPtr
shared pointer for PreFormatter
Definition: preformatter.h:20