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

tdecore

  • tdecore
tdeunicodedata.h
1 #ifndef TDEUNICODEDATA_H
2 #define TDEUNICODEDATA_H
3 
4 #include "tdelibs_export.h"
5 
6 #include <cstddef>
7 
8 class TDECORE_EXPORT TDEUnicodeData
9 {
10  public:
11  //
12  // Unicode categories and subcategories
13  // (see tdeunicodedata_categories.cpp for the actual data)
14  //
15 
16  struct Subcategory
17  {
18  char32_t index;
19  const char *name;
20  };
21 
22  struct Category
23  {
24  char32_t index;
25  const char *name;
26  const Subcategory *subcategories;
27  size_t subcategories_size;
28  };
29 
30  static TDEUnicodeData *instance();
31 
32  // Returns the category (Unicode block) containing codepoint, or nullptr
33  // if none applies. The arrays are sorted, so this is a binary search.
34  const Category *findCategory(char32_t codepoint) const;
35 
36  // Returns the subcategory of the category containing codepoint, or
37  // nullptr if none applies.
38  const Subcategory *findSubcategory(char32_t codepoint) const;
39 
40  // Returns the subcategory of the given category containing codepoint,
41  // or nullptr if none applies. Use this when the containing category is
42  // already known to avoid re-searching the category list.
43  const Subcategory *findSubcategory(const Category *category, char32_t codepoint) const;
44 
45  const Category *categoryList() const { return m_categories; }
46  size_t categoryCount() const { return m_categories_size; }
47  private:
48  TDEUnicodeData();
49  TDEUnicodeData(const TDEUnicodeData &) = delete;
50  TDEUnicodeData &operator=(const TDEUnicodeData &) = delete;
51 
52  const Category *m_categories;
53  size_t m_categories_size;
54 
55  static TDEUnicodeData *s_instance;
56 };
57 
58 #endif // TDEUNICODEDATA_H
KNotifyClient::instance
TDEInstance * instance()
Shortcut to KNotifyClient::Instance::current() :)
Definition: knotifyclient.cpp:280
KStdAction::name
const char * name(StdAction id)

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.9.1
This website is maintained by Timothy Pearson.