• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdeunicodecharinfo.cpp
1 #include "tdeunicodecharinfo.h"
2 
3 #include "tdeunicodedata.h"
4 
5 TDEUnicodeCharInfo::TDEUnicodeCharInfo(char32_t ch)
6  : m_codepoint(ch),
7  m_category(nullptr),
8  m_subcategory(nullptr)
9 {
10 }
11 
12 TDEUnicodeCharInfo::TDEUnicodeCharInfo(TQChar ch)
13  : m_codepoint(ch.unicode()),
14  m_category(nullptr),
15  m_subcategory(nullptr)
16 {
17 }
18 
19 char32_t TDEUnicodeCharInfo::codepoint() const
20 {
21  return m_codepoint;
22 }
23 
24 const TDEUnicodeData::Category *TDEUnicodeCharInfo::category() const
25 {
26  if (!m_category)
27  m_category = TDEUnicodeData::instance()->findCategory(m_codepoint);
28  return m_category;
29 }
30 
31 const TDEUnicodeData::Subcategory *TDEUnicodeCharInfo::subcategory() const
32 {
33  if (!m_subcategory)
34  {
35  // Reuse the cached category to avoid re-searching the category list.
36  const TDEUnicodeData::Category *cat = category();
37  m_subcategory = cat
38  ? TDEUnicodeData::instance()->findSubcategory(cat, m_codepoint)
39  : nullptr;
40  }
41  return m_subcategory;
42 }

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.17
This website is maintained by Timothy Pearson.