OSDN Git Service

Rename boardmanager.cpp and boardmanager.h
[kita/kita.git] / src / libkita / threadinfo.h
1 /***************************************************************************
2 *   Copyright (C) 2003 by Hideki Ikemoto                                  *
3 *   ikemo@users.sourceforge.jp                                            *
4 *                                                                         *
5 *   This program is free software; you can redistribute it and/or modify  *
6 *   it under the terms of the GNU General Public License as published by  *
7 *   the Free Software Foundation; either version 2 of the License, or     *
8 *   (at your option) any later version.                                   *
9 ***************************************************************************/
10 #ifndef KITATHREADINFO_H
11 #define KITATHREADINFO_H
12
13 #include <QtCore/QMap>
14
15 #include <kdemacros.h>
16
17 namespace Kita
18 {
19     /**
20      * 
21      * Hideki Ikemoto
22      **/
23     class KDE_EXPORT ThreadInfo
24     {
25     public:
26         static ThreadInfo* getInstance();
27         static void setReadNum(const QString& url, int num);
28         static int readNum(const QString& url);
29         static void replace(const QString& fromUrl, const QString& toUrl);
30         static void removeThreadInfo(const QString& url);
31         KDE_EXPORT friend QDataStream& operator<<(QDataStream& s, ThreadInfo& c);
32         KDE_EXPORT friend QDataStream& operator>>(QDataStream& s, ThreadInfo& c);
33     private:
34         ThreadInfo();
35         ~ThreadInfo();
36         QMap<QString, int> m_readDict;
37         QMap<QString, int> m_resNumDict;
38         static ThreadInfo* instance;
39     };
40 }
41
42 #endif