00001 // 00002 // C++ Interface: preformatter 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #ifndef PREFORMATTER_H 00013 #define PREFORMATTER_H 00014 00015 #include <string> 00016 #include <boost/shared_ptr.hpp> 00017 00018 namespace srchilite { 00019 00020 class PreFormatter; 00021 00023 typedef boost::shared_ptr<PreFormatter> PreFormatterPtr; 00024 00031 class PreFormatter { 00033 PreFormatterPtr decorator; 00034 00035 public: 00039 PreFormatter(PreFormatterPtr f = PreFormatterPtr()); 00040 00041 virtual ~PreFormatter(); 00042 00047 void setPreFormatter(PreFormatterPtr f); 00048 00054 const std::string preformat(const std::string &text); 00055 00056 protected: 00064 virtual const std::string doPreformat(const std::string &text); 00065 00066 }; 00067 00068 } 00069 00070 #endif