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() =defaultfunction 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() constfunction isValid
inline bool isValid() constfunction toString
inline QString const & toString() constfunction toStdString
inline std::string toStdString() constfunction clear
inline void clear()function operator<=>
inline auto operator<=>(
StrongStringId const & other
) constfunction operator==
inline bool operator==(
StrongStringId const & other
) constPublic 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