htmlentity.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 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 HTMLENTITY_H
16 #define HTMLENTITY_H
17 
18 #include <qdict.h>
19 #include "docparser.h"
20 
21 class FTextStream;
22 
23 /** @brief Singleton helper class to map html entities to other formats */
25 {
26  public:
27  static HtmlEntityMapper *instance();
28  static void deleteInstance();
29  DocSymbol::SymType name2sym(const QCString &symName) const;
30  const char *utf8(DocSymbol::SymType symb,bool useInPrintf=FALSE) const;
31  const char *html(DocSymbol::SymType symb,bool useInPrintf=FALSE) const;
32  const char *xml(DocSymbol::SymType symb) const;
33  const char *docbook(DocSymbol::SymType symb) const;
34  const char *latex(DocSymbol::SymType symb) const;
35  const char *man(DocSymbol::SymType symb) const;
36  const char *rtf(DocSymbol::SymType symb) const;
37  const DocSymbol::PerlSymb *perl(DocSymbol::SymType symb) const;
39  private:
40  void validate();
44  QDict<int> *m_name2sym;
45 };
46 
47 #endif
const char * man(DocSymbol::SymType symb) const
Access routine to the man code of the HTML entity.
Definition: htmlentity.cpp:437
static HtmlEntityMapper * s_instance
Definition: htmlentity.h:43
void writeXMLSchema(FTextStream &t)
Definition: htmlentity.cpp:477
QDict< int > * m_name2sym
Definition: htmlentity.h:44
DocSymbol::SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
Definition: htmlentity.cpp:471
const bool FALSE
Definition: qglobal.h:370
const char * xml(DocSymbol::SymType symb) const
Access routine to the XML code of the HTML entity.
Definition: htmlentity.cpp:404
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
const char * latex(DocSymbol::SymType symb) const
Access routine to the LaTeX code of the HTML entity.
Definition: htmlentity.cpp:426
void validate()
Routine to check if the entries of the html_entities are numbered correctly.
Definition: htmlentity.cpp:493
static void deleteInstance()
Definition: htmlentity.cpp:351
const DocSymbol::PerlSymb * perl(DocSymbol::SymType symb) const
Access routine to the perl struct with the perl code of the HTML entity.
Definition: htmlentity.cpp:460
const char * docbook(DocSymbol::SymType symb) const
Access routine to the docbook code of the HTML entity.
Definition: htmlentity.cpp:415
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
Definition: htmlentity.cpp:386
const char * rtf(DocSymbol::SymType symb) const
Access routine to the RTF code of the HTML entity.
Definition: htmlentity.cpp:448
Singleton helper class to map html entities to other formats.
Definition: htmlentity.h:24
const char * utf8(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the UTF8 code of the HTML entity.
Definition: htmlentity.cpp:366