Konsole::ExtendedCharTable
#include <Character.h>
Public Member Functions | |
ExtendedCharTable () | |
ushort | createExtendedChar (ushort *unicodePoints, ushort length) |
std::span< const ushort > | lookupExtendedChar (ushort hash, ushort &length) const |
Static Public Attributes | |
static ExtendedCharTable | instance |
Detailed Description
A table which stores sequences of unicode characters, referenced by hash keys.
The hash key itself is the same size as a unicode character ( ushort ) so that it can occupy the same space in a structure.
Definition at line 171 of file Character.h.
Constructor & Destructor Documentation
◆ ExtendedCharTable()
|
default |
Constructs a new character table.
Member Function Documentation
◆ createExtendedChar()
ushort ExtendedCharTable::createExtendedChar | ( | ushort * | unicodePoints, |
ushort | length ) |
Adds a sequences of unicode characters to the table and returns a hash code which can be used later to look up the sequence using lookupExtendedChar()
If the same sequence already exists in the table, the hash of the existing sequence will be returned.
- Parameters
-
unicodePoints An array of unicode character points length Length of unicodePoints
Definition at line 401 of file Emulation.cpp.
◆ lookupExtendedChar()
std::span< const ushort > ExtendedCharTable::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 createExtendedChar().
- Parameters
-
hash The hash key returned by createExtendedChar() length This variable is set to the length of the character sequence.
- Returns
- A unicode character sequence of size
length
.
Definition at line 431 of file Emulation.cpp.
Member Data Documentation
◆ instance
|
static |
The global ExtendedCharTable instance.
Definition at line 203 of file Character.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.