00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _TMWSERV_SLANGSFILTER_H_
00022 #define _TMWSERV_SLANGSFILTER_H_
00023
00024 #include <list>
00025 #include <string>
00026
00027 namespace utils
00028 {
00029
00033 class StringFilter
00034 {
00035 public:
00039 StringFilter();
00040
00041 ~StringFilter();
00042
00049 bool
00050 loadSlangFilterList();
00051
00058 void
00059 writeSlangFilterList();
00060
00065 bool
00066 filterContent(const std::string& text);
00067
00071 bool
00072 isEmailValid(const std::string& email);
00073
00079 bool
00080 findDoubleQuotes(const std::string& text);
00081
00082 private:
00083 typedef std::list<std::string> Slangs;
00084 typedef Slangs::iterator SlangIterator;
00085 Slangs mSlangs;
00086 bool mInitialized;
00087 };
00088
00089 }
00090
00091 extern utils::StringFilter *stringFilter;
00092
00093 #endif