Skip to main content

EditorLib::StrongStringId

EditorLib::StrongStringId

CRTP base for strong string types. More…

#include <StrongTypes.hpp>

Public Functions

Name
StrongStringId() =default
StrongStringId(QString v)
StrongStringId(char const * v)
StrongStringId(std::string const & v)
bool isEmpty() const
bool isValid() const
QString const & toString() const
std::string toStdString() const
void clear()
auto operator<=>(StrongStringId const & other) const
bool operator==(StrongStringId const & other) const

Public Attributes

Name
QString value

Friends

Name
size_t qHash(StrongStringId const & id, size_t seed =0)

Detailed Description

template <typename Derived >
struct EditorLib::StrongStringId;

CRTP base for strong string types.

Provides common operations while preventing accidental mixing of different ID types. All strong types are copyable, movable, and can be used as keys in both std:: and Qt containers.

Public Functions Documentation

function StrongStringId

StrongStringId() =default

function StrongStringId

inline explicit StrongStringId(
    QString v
)

function StrongStringId

inline explicit StrongStringId(
    char const * v
)

function StrongStringId

inline explicit StrongStringId(
    std::string const & v
)

function isEmpty

inline bool isEmpty() const

function isValid

inline bool isValid() const

function toString

inline QString const & toString() const

function toStdString

inline std::string toStdString() const

function clear

inline void clear()

function operator<=>

inline auto operator<=>(
    StrongStringId const & other
) const

function operator==

inline bool operator==(
    StrongStringId const & other
) const

Public Attributes Documentation

variable value

QString value;

Friends

friend qHash

friend size_t qHash(
    StrongStringId const & id,

    size_t seed =0
);

Updated on 2026-11-13 at 20:25:42 +0000