00001 // 00002 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 00003 // 00004 // Copyright: See COPYING file that comes with this distribution 00005 // 00006 00007 #ifndef SRCUNTABIFIER_H 00008 #define SRCUNTABIFIER_H 00009 00010 #include "preformatter.h" 00011 00012 namespace srchilite { 00013 00014 using std::string; 00015 00019 class Untabifier : public PreFormatter { 00020 public: 00021 00022 Untabifier(unsigned int nSpacesPerTab, PreFormatterPtr f = PreFormatterPtr()) : 00023 PreFormatter(f), nSpacesPerTab_(nSpacesPerTab), n_(0) { 00024 } 00025 00026 virtual const string doPreformat(const std::string &text); 00027 00028 private: 00029 00031 const int nSpacesPerTab_; 00032 00034 unsigned int n_; 00035 }; 00036 00037 } 00038 00039 #endif // SRCUNTABIFIER_H