9#ifndef QTSMITHY_SHAPEID_H
10#define QTSMITHY_SHAPEID_H
15#if (QT_VERSION_CHECK(6, 0, 0) <= QT_VERSION) && (QT_VERSION < QT_VERSION_CHECK(6, 1, 0))
19#include <QCoreApplication>
24QTSMITHY_BEGIN_NAMESPACE
36 ShapeId(
const QString &shapeId);
61 bool operator==(
const ShapeId &other)
const;
65 ShapeIdPrivate * d_ptr;
72#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
73QTSMITHY_EXPORT uint qHash(
const ShapeId &key, uint seed = 0);
75QTSMITHY_EXPORT
size_t qHash(
const ShapeId &key,
size_t seed = 0);
78typedef QHash<ShapeId, QString> ShapeIdStringMap;
The ShapeId class provides a Qt representation of a Smithy Shape ID.
Definition shapeid.h:29
QString nameSpace() const
Returns the Shape ID's namespace, if it has one, otherwise a null string.
Definition shapeid.cpp:123
bool isValid() const
Returns true if this object represents a valid, non-empty Smithy Shape ID.
Definition shapeid.cpp:281
void setMemberName(const QString &name)
Set the Shape ID's member name to name, which may be an empty or null string.
Definition shapeid.cpp:145
QString absoluteShapeId() const
Returns this object as an absolute Smithy Shape ID if this object has a namespace,...
Definition shapeid.cpp:185
QString toString() const
Returns this object as an absolute Smithy Shape ID if this object has a namespace,...
Definition shapeid.cpp:214
ShapeId()
Constructs an empty ShapeId object.
Definition shapeid.cpp:27
ShapeId & operator=(const ShapeId &shapeId)
Assigns the specified shapeId to this object.
Definition shapeid.cpp:72
bool isRootShapeId() const
Returns true if this Shape ID is a root Shape ID, false otherwise.
Definition shapeid.cpp:259
bool hasMemberName() const
Returns true if this Shape ID has a non-empty member name, otherwise false otherwise.
Definition shapeid.cpp:236
QString shapeName() const
Returns the Shape ID's shape name, if it has one, otherwise a null string.
Definition shapeid.cpp:136
void setNameSpace(const QString &name)
Set the Shape ID's namespace to name, which may be an empty or null string.
Definition shapeid.cpp:154
QString memberName() const
Returns the Shape ID's member name, if it has one, otherwise a null string.
Definition shapeid.cpp:114
QString relativeShapeId() const
Returns this object as a relative Smithy Shape ID, that one without a leading namespace.
Definition shapeid.cpp:198
bool hasNameSpace() const
Returns true if this Shape ID has a non-empty namespace, otherwise false otherwise.
Definition shapeid.cpp:225
void setShapeName(const QString &name)
Set the Shape ID's shape name to name.
Definition shapeid.cpp:166
bool isAbsoluteRootShapeId() const
Returns true if this Shape ID is a root Shape ID, and has a namespace, false otherwise.
Definition shapeid.cpp:247
bool isRelativeShapeId() const
Returns true if this Shape ID is a relative Shape ID, false otherwise.
Definition shapeid.cpp:271
Global QtSmithy library macros.