• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • kde-4.14
  • applications
  • konsole
  • src
ExtendedCharTable.h
Go to the documentation of this file.
1 /*
2  This file is part of Konsole, an X terminal.
3 
4  Copyright 2007-2008 by Robert Knight <robertknight@gmail.com>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301 USA.
20 */
21 
22 #ifndef EXTENDEDCHARTABLE_H
23 #define EXTENDEDCHARTABLE_H
24 
25 // Qt
26 #include <QtCore/QHash>
27 
28 namespace Konsole
29 {
36 class ExtendedCharTable
37 {
38 public:
40  ExtendedCharTable();
41  ~ExtendedCharTable();
42 
54  ushort createExtendedChar(const ushort* unicodePoints , ushort length);
65  ushort* lookupExtendedChar(ushort hash , ushort& length) const;
66 
68  static ExtendedCharTable instance;
69 private:
70  // calculates the hash key of a sequence of unicode points of size 'length'
71  ushort extendedCharHash(const ushort* unicodePoints , ushort length) const;
72  // tests whether the entry in the table specified by 'hash' matches the
73  // character sequence 'unicodePoints' of size 'length'
74  bool extendedCharMatch(ushort hash , const ushort* unicodePoints , ushort length) const;
75  // internal, maps hash keys to character sequence buffers. The first ushort
76  // in each value is the length of the buffer, followed by the ushorts in the buffer
77  // themselves.
78  QHash<ushort, ushort*> extendedCharTable;
79 };
80 }
81 #endif // end of EXTENDEDCHARTABLE_H
Konsole::ExtendedCharTable::~ExtendedCharTable
~ExtendedCharTable()
Definition: ExtendedCharTable.cpp:40
Konsole::ExtendedCharTable::createExtendedChar
ushort createExtendedChar(const ushort *unicodePoints, ushort length)
Adds a sequences of unicode characters to the table and returns a hash code which can be used later t...
Definition: ExtendedCharTable.cpp:53
Konsole::ExtendedCharTable::instance
static ExtendedCharTable instance
The global ExtendedCharTable instance.
Definition: ExtendedCharTable.h:68
Konsole::ExtendedCharTable
A table which stores sequences of unicode characters, referenced by hash keys.
Definition: ExtendedCharTable.h:36
QHash< ushort, ushort * >
Konsole::ExtendedCharTable::lookupExtendedChar
ushort * lookupExtendedChar(ushort hash, ushort &length) const
Looks up and returns a pointer to a sequence of unicode characters which was added to the table using...
Definition: ExtendedCharTable.cpp:113
Konsole::ExtendedCharTable::ExtendedCharTable
ExtendedCharTable()
Constructs a new character table.
Definition: ExtendedCharTable.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal