Source-highlight Library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
srchilite::PreFormatter Class Reference

Preformats text to be generated. More...

#include <preformatter.h>

Inheritance diagram for srchilite::PreFormatter:
Inheritance graph
[legend]

Public Member Functions

 
  Sets the nested preformatter. More...
 
const std::string  preformat (const std::string &text)
  Preformats the passed string (public version) More...
 

Protected Member Functions

virtual const std::string  doPreformat (const std::string &text)
  Preformats the passed string (protected version). More...
 

Private Attributes

  the possible nested preformatter (Decorator pattern)
 

Detailed Description

Preformats text to be generated.

This implements the Decorator pattern, thus yielding a chain of preformatters

Author
Lorenzo Bettini

Constructor & Destructor Documentation

srchilite::PreFormatter::PreFormatter ( PreFormatterPtr  f = PreFormatterPtr() )
Parameters
f the nested decorated preformatter

Member Function Documentation

const string srchilite::PreFormatter::doPreformat ( const std::string &  text )
protectedvirtual

Preformats the passed string (protected version).

The subclasses must redefine this method to perform the preformatting. The default implementation does not perform any preformatting.

Parameters
text the string to be preformatted
Returns
the preformatted string

Reimplemented in srchilite::CharTranslator, and srchilite::Untabifier.

const string srchilite::PreFormatter::preformat ( const std::string &  text )

Preformats the passed string (public version)

Parameters
text the string to be preformatted
Returns
the preformatted string
void srchilite::PreFormatter::setPreFormatter ( PreFormatterPtr  f )

Sets the nested preformatter.

Parameters
f the nested (decorated) preformatter

The documentation for this class was generated from the following files:
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/preformatter.h
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/preformatter.cpp

AltStyle によって変換されたページ (->オリジナル) /