KVIrc  4.9.2
DeveloperAPIs
KviRegisteredChannel.h
Go to the documentation of this file.
1 #ifndef _KVI_REGCHAN_H_
2 #define _KVI_REGCHAN_H_
3 //=============================================================================
4 //
5 // File : KviRegisteredChannel.h
6 // Creation date : Sat Jun 29 01:01:15 2002 GMT by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "kvi_settings.h"
28 #include "KviHeapObject.h"
29 #include "KviCString.h"
30 #include "KviPointerList.h"
31 
32 #include <QHash>
33 
35 {
37 
38 public:
39  KviRegisteredChannel(const QString & szName, const QString & szNetMask);
41 
42 protected:
43  QString m_szName;
44  QString m_szNetMask;
45  QHash<QString, QString> * m_pPropertyDict;
46 
47 public:
48  QHash<QString, QString> * propertyDict() { return m_pPropertyDict; }
49 
50  const QString & name() { return m_szName; }
51 
52  const QString & netMask() { return m_szNetMask; }
53 
54  QString property(const QString & szName) { return m_pPropertyDict->value(szName); }
55 
56  void setProperty(const QString & szName, const QString & szValue) { m_pPropertyDict->insert(szName, szValue); }
57 
58  void removeProperty(const QString & szName) { m_pPropertyDict->remove(szName); }
59 };
60 
62 
63 #endif //_KVI_REGCHAN_H_
Definition: KviHeapObject.h:124
KVILIB_API_TYPEDEF KviPointerList< KviRegisteredChannel > KviRegisteredChannelList
Definition: KviRegisteredChannel.h:61
QString property(const QString &szName)
Definition: KviRegisteredChannel.h:54
void removeProperty(const QString &szName)
Definition: KviRegisteredChannel.h:58
QString m_szName
Definition: KviRegisteredChannel.h:43
const QString & name()
Definition: KviRegisteredChannel.h:50
#define KVILIB_API_TYPEDEF
Definition: kvi_settings.h:126
QHash< QString, QString > * propertyDict()
Definition: KviRegisteredChannel.h:48
C++ Template based double linked pointer list class.
A template double linked list of pointers.
Definition: KviPointerList.h:55
Heap Object.
QHash< QString, QString > * m_pPropertyDict
Definition: KviRegisteredChannel.h:45
Definition: KviRegisteredChannel.h:34
const QString & netMask()
Definition: KviRegisteredChannel.h:52
This file contains compile time settings.
Definition: KviRegisteredChannelDataBase.h:35
QString m_szNetMask
Definition: KviRegisteredChannel.h:44
void setProperty(const QString &szName, const QString &szValue)
Definition: KviRegisteredChannel.h:56
#define KVILIB_API
Definition: kvi_settings.h:125