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