Doxygen
Loading...
Searching...
No Matches
DocEmoji Class Reference

Node representing an emoji. More...

#include <src/docnode.h>

+ Inheritance diagram for DocEmoji:
+ Collaboration diagram for DocEmoji:

Public Member Functions

 DocEmoji (DocParser *parser, DocNodeVariant *parent, const QCString &symName)
 
QCString name () const
 
int index () const
 
- Public Member Functions inherited from DocNode
 DocNode (DocParser *parser, DocNodeVariant *parent)
 
 ~DocNode ()=default
 
DocNodeVariantparent ()
 
const DocNodeVariantparent () const
 
DocNodeVariantthisVariant ()
 
const DocNodeVariantthisVariant () const
 
void setThisVariant (DocNodeVariant *thisVariant)
 
DocParserparser ()
 
const DocParserparser () const
 
void setParent (DocNodeVariant *parent)
 
bool isPreformatted () const
 

Private Attributes

QCString m_symName
 
int m_index = 0
 

Additional Inherited Members

- Protected Types inherited from DocNode
enum  RefType { Unknown , Anchor , Section , Table }
 
- Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)
 

Detailed Description

Node representing an emoji.

Definition at line 321 of file docnode.h.

Constructor & Destructor Documentation

◆ DocEmoji()

DocEmoji::DocEmoji ( DocParser * parser,
DocNodeVariant * parent,
const QCString & symName )

Definition at line 159 of file docnode.cpp.

159 :
160 DocNode(parser,parent), m_symName(symName), m_index(-1)
161{
162 QCString locSymName = symName;
163 size_t len=locSymName.length();
164 if (len>0)
165 {
166 if (locSymName.at(len-1)!=':') locSymName.append(":");
167 if (locSymName.at(0)!=':') locSymName.prepend(":");
168 }
169 m_symName = locSymName;
171 if (m_index==-1)
172 {
173 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Found unsupported emoji symbol '%s'",qPrint(m_symName));
174 }
175}
int m_index
Definition docnode.h:330
QCString m_symName
Definition docnode.h:329
DocNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:84
DocParser * parser()
Definition docnode.h:97
DocNodeVariant * parent()
Definition docnode.h:89
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
QCString & prepend(const char *s)
Definition qcstring.h:407
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:567
QCString & append(char c)
Definition qcstring.h:381
#define warn_doc_error(file, line, fmt,...)
Definition message.h:74
const char * qPrint(const char *s)
Definition qcstring.h:661

References QCString::append(), QCString::at(), DocNode::DocNode(), EmojiEntityMapper::instance(), QCString::length(), m_index, m_symName, DocNode::parent(), DocNode::parser(), QCString::prepend(), qPrint(), EmojiEntityMapper::symbol2index(), and warn_doc_error.

Member Function Documentation

◆ index()

◆ name()

Member Data Documentation

◆ m_index

int DocEmoji::m_index = 0
private

Definition at line 330 of file docnode.h.

Referenced by DocEmoji(), and index().

◆ m_symName

QCString DocEmoji::m_symName
private

Definition at line 329 of file docnode.h.

Referenced by DocEmoji(), and name().


The documentation for this class was generated from the following files: