Doxygen
Loading...
Searching...
No Matches
emoji.h
Go to the documentation of this file.
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#include "construct.h"
22
23class TextStream;
24
25/** @brief Singleton helper class to map emoji entities to other formats */
27{
28 public:
30 const char *name(int index) const;
31 const char *unicode(int index) const;
33 int symbol2index(const std::string &symName) const;
34
35 private:
40 std::map<std::string,int> m_name2symGh;
41};
42
43#endif
const char * unicode(int index) const
Access routine to the unicode sequence for the Emoji entity.
Definition emoji.cpp:2016
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:2026
std::map< std::string, int > m_name2symGh
Definition emoji.h:40
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1978
int symbol2index(const std::string &symName) const
Returns a code for the requested Emoji entity name.
Definition emoji.cpp:1990
void writeEmojiFile(TextStream &t)
Writes the list of supported emojis to the given file.
Definition emoji.cpp:1999
static EmojiEntityMapper * s_instance
Definition emoji.h:39
Text streaming class that buffers data.
Definition textstream.h:36
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37