ManaPlus
chatobject.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2012-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef RESOURCES_CHATOBJECT_H
23 #define RESOURCES_CHATOBJECT_H
24 
26 
27 #include <map>
28 #include <string>
29 
30 #include "localconsts.h"
31 
33 {
34  ChatObject();
35 
36  ~ChatObject();
37 
39 
40  void update();
41 
42  static ChatObject *findByName(const std::string &name);
43 
44  static ChatObject *findById(const int id);
45 
47  int chatId;
48  uint16_t maxUsers;
49  uint16_t currentUsers;
50  uint8_t type;
51  std::string title;
52 
53  static std::map<std::string, ChatObject*> chatNameMap;
54  static std::map<int, ChatObject*> chatIdMap;
55 };
56 
57 #endif // RESOURCES_CHATOBJECT_H
int BeingId
Definition: beingid.h:30
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
static ChatObject * findByName(const std::string &name)
Definition: chatobject.cpp:55
std::string title
Definition: chatobject.h:51
static std::map< int, ChatObject * > chatIdMap
Definition: chatobject.h:54
uint16_t maxUsers
Definition: chatobject.h:48
static ChatObject * findById(const int id)
Definition: chatobject.cpp:64
int chatId
Definition: chatobject.h:47
void update()
Definition: chatobject.cpp:49
static std::map< std::string, ChatObject * > chatNameMap
Definition: chatobject.h:53
uint8_t type
Definition: chatobject.h:50
BeingId ownerId
Definition: chatobject.h:46
uint16_t currentUsers
Definition: chatobject.h:49