Doxygen
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 <map>
19 #include <string>
20 
21 class TextStream;
22 
23 /** @brief Singleton helper class to map emoji entities to other formats */
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(TextStream &t);
32  int symbol2index(const std::string &symName) const;
33 
34  private:
38  std::map<std::string,int> m_name2symGh;
39 };
40 
41 #endif
EmojiEntityMapper::m_name2symGh
std::map< std::string, int > m_name2symGh
Definition: emoji.h:38
EmojiEntityMapper::deleteInstance
static void deleteInstance()
Deletes the one and only instance of the Emoji entity mapper
Definition: emoji.cpp:1546
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
EmojiEntityMapper::EmojiEntityMapper
EmojiEntityMapper()
Definition: emoji.cpp:1522
EmojiEntityMapper::name
const char * name(int index) const
Access routine to the name of the Emoji entity
Definition: emoji.cpp:1590
EmojiEntityMapper::~EmojiEntityMapper
~EmojiEntityMapper()
Definition: emoji.cpp:1531
EmojiEntityMapper::unicode
const char * unicode(int index) const
Access routine to the unicode sequence for the Emoji entity
Definition: emoji.cpp:1580
EmojiEntityMapper::s_instance
static EmojiEntityMapper * s_instance
Definition: emoji.h:37
EmojiEntityMapper::symbol2index
int symbol2index(const std::string &symName) const
Returns a code for the requested Emoji entity name
Definition: emoji.cpp:1558
EmojiEntityMapper
Singleton helper class to map emoji entities to other formats
Definition: emoji.h:24
EmojiEntityMapper::instance
static EmojiEntityMapper * instance()
Returns the one and only instance of the Emoji entity mapper
Definition: emoji.cpp:1536
EmojiEntityMapper::writeEmojiFile
void writeEmojiFile(TextStream &t)
Writes the list of supported emojis to the given file.
Definition: emoji.cpp:1567