Imported Upstream version 1.8.15
[platform/upstream/doxygen.git] / src / emoji.h
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2018 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 #ifndef EMOJIENTITY_H
16 #define EMOJIENTITY_H
17
18 #include <qdict.h>
19 #include <qfile.h>
20
21 class FTextStream;
22
23 /** @brief Singleton helper class to map emoji entities to other formats */
24 class EmojiEntityMapper
25 {
26   public:
27     static EmojiEntityMapper *instance();
28     static void deleteInstance();
29     const char *name(int index) const;
30     const char *unicode(int index) const;
31     void writeEmojiFile(QFile &file);
32     int symbol2index(const QCString &symName) const;
33
34   private:
35     EmojiEntityMapper();
36    ~EmojiEntityMapper();
37     static EmojiEntityMapper *s_instance;
38     QDict<int> *m_name2symGh;
39 };
40
41 #endif