KItinerary::KnowledgeDb::AlphaId

Search for usage in LXR

KItinerary::KnowledgeDb::AlphaId< T, N > Class Template Reference

#include <alphaid.h>

Inheritance diagram for KItinerary::KnowledgeDb::AlphaId< T, N >:

Public Member Functions

constexpr AlphaId (const char s[N])
 
 AlphaId (QStringView s)
 
constexpr bool isValid () const
 
constexpr bool operator!= (AlphaId< T, N > other) const
 
constexpr bool operator< (AlphaId< T, N > rhs) const
 
constexpr bool operator== (AlphaId< T, N > other) const
 
QString toString () const
 
constexpr T value () const
 

Detailed Description

template<typename T, int N>
class KItinerary::KnowledgeDb::AlphaId< T, N >

Compact storage for fixed-size identifiers consisting out of uppercase latin letters, such as IATA airport codes or ISO 3166 country codes.

Definition at line 34 of file alphaid.h.

Constructor & Destructor Documentation

◆ AlphaId() [1/2]

template<typename T , int N>
KItinerary::KnowledgeDb::AlphaId< T, N >::AlphaId ( const char s[N])
inlineexplicitconstexpr

Create identifier from a literal.

Definition at line 39 of file alphaid.h.

◆ AlphaId() [2/2]

template<typename T , int N>
KItinerary::KnowledgeDb::AlphaId< T, N >::AlphaId ( QStringView s)
inlineexplicit

Create identifier from a QString.

Definition at line 50 of file alphaid.h.

Member Function Documentation

◆ isValid()

template<typename T , int N>
bool KItinerary::KnowledgeDb::AlphaId< T, N >::isValid ( ) const
inlineconstexpr

Returns true if this is a valid identifier.

Definition at line 56 of file alphaid.h.

◆ operator!=()

template<typename T , int N>
bool KItinerary::KnowledgeDb::AlphaId< T, N >::operator!= ( AlphaId< T, N > other) const
inlineconstexpr

Definition at line 69 of file alphaid.h.

◆ operator<()

template<typename T , int N>
bool KItinerary::KnowledgeDb::AlphaId< T, N >::operator< ( AlphaId< T, N > rhs) const
inlineconstexpr

Definition at line 61 of file alphaid.h.

◆ operator==()

template<typename T , int N>
bool KItinerary::KnowledgeDb::AlphaId< T, N >::operator== ( AlphaId< T, N > other) const
inlineconstexpr

Definition at line 65 of file alphaid.h.

◆ toString()

template<typename T , int N>
QString KItinerary::KnowledgeDb::AlphaId< T, N >::toString ( ) const
inline

Returns a string representation of this identifier.

Definition at line 75 of file alphaid.h.

◆ value()

template<typename T , int N>
T KItinerary::KnowledgeDb::AlphaId< T, N >::value ( ) const
inlineconstexpr

for std::hash

Definition at line 81 of file alphaid.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.