summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/colbase_words.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-04 23:23:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-04 23:23:45 +0000
commit15855fa84a09fd1fd486d357c38db0f2bd181e74 (patch)
treec98d1ae74abca41c776522059343eda13a7e0a31 /plugins/HistoryStats/src/colbase_words.h
parent819f8efabea6b0d7d971f9e6e4b21bbc18838874 (diff)
HistoryStats compiles ok now
git-svn-id: http://svn.miranda-ng.org/main/trunk@8399 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats/src/colbase_words.h')
-rw-r--r--plugins/HistoryStats/src/colbase_words.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/HistoryStats/src/colbase_words.h b/plugins/HistoryStats/src/colbase_words.h
new file mode 100644
index 0000000000..d42803fdea
--- /dev/null
+++ b/plugins/HistoryStats/src/colbase_words.h
@@ -0,0 +1,60 @@
+#if !defined(HISTORYSTATS_GUARD_COLBASE_WORDS_H)
+#define HISTORYSTATS_GUARD_COLBASE_WORDS_H
+
+#include "column.h"
+
+class ColBaseWords
+ : public Column
+{
+public:
+ typedef std::map<ext::string, InOut> WordMap;
+ typedef Settings::WordSet WordSet;
+ typedef Settings::ColFilterSet ColFilterSet;
+ typedef Settings::Filter Filter;
+ typedef std::vector<const Filter*> FilterVecC;
+
+protected:
+ int m_nSource;
+ int m_nMinLength;
+ int m_nMaxLength;
+ bool m_bFilterLinks;
+ ColFilterSet m_FilterWords;
+
+ OptionsCtrl::Radio m_hSource;
+ OptionsCtrl::Edit m_hMinLength;
+ OptionsCtrl::Edit m_hMaxLength;
+ OptionsCtrl::Check m_hFilterLinks;
+
+ bool m_bFilterMessages;
+ bool m_bFilterWords;
+ FilterVecC m_ActiveMessageFilter;
+ FilterVecC m_ActiveWordFilter;
+
+private:
+ void addWord(WordMap* pWords, const ext::string& word, bool bOutgoing) const;
+ void parseMsg(WordMap* pWords, const ext::string& msg, bool bOutgoing) const;
+
+protected:
+ explicit ColBaseWords();
+
+protected:
+ virtual int impl_getFeatures() const { return cfHasConfig | cfAcquiresData | cfTransformsData | cfIsColBaseWords; }
+ virtual void impl_copyConfig(const Column* pSource);
+ virtual void impl_configRead(const SettingsTree& settings);
+ virtual void impl_configWrite(SettingsTree& settings) const;
+ virtual void impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup);
+ virtual void impl_configFromUI(OptionsCtrl& Opt);
+ virtual int impl_configGetRestrictions(ext::string* pDetails) const { return crHTMLFull; }
+ virtual ext::string impl_contactDataGetUID() const;
+ virtual void impl_contactDataBeginAcquire();
+ virtual void impl_contactDataPrepare(Contact& contact) const;
+ virtual void impl_contactDataFree(Contact& contact) const;
+ virtual void impl_contactDataAcquireMessage(Contact& contact, Message& msg);
+ virtual void impl_contactDataMerge(Contact& contact, const Contact& include) const;
+
+public:
+ const ColFilterSet& getFilterWords() const { return m_FilterWords; }
+ void setFilterWords(const ColFilterSet& FilterWords) { m_FilterWords = FilterWords; }
+};
+
+#endif // HISTORYSTATS_GUARD_COLBASE_WORDS_H \ No newline at end of file