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>
36 ShapeId(
const QString &shapeId);
61 bool operator==(
const ShapeId &other)
const;
72#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
78typedef QHash<ShapeId, QString> ShapeIdStringMap;
The ShapeIdPrivate class provides private implementation for ShapeId.
The ShapeId class provides a Qt representation of a Smithy Shape ID.
QString nameSpace() const
Returns the Shape ID's namespace, if it has one, otherwise a null string.
bool isValid() const
Returns true if this object represents a valid, non-empty Smithy Shape ID.
void setMemberName(const QString &name)
Set the Shape ID's member name to name, which may be an empty or null string.
QString absoluteShapeId() const
Returns this object as an absolute Smithy Shape ID if this object has a namespace,...
QString toString() const
Returns this object as an absolute Smithy Shape ID if this object has a namespace,...
ShapeId()
Constructs an empty ShapeId object.
ShapeId & operator=(const ShapeId &shapeId)
Assigns the specified shapeId to this object.
bool isRootShapeId() const
Returns true if this Shape ID is a root Shape ID, false otherwise.
bool hasMemberName() const
Returns true if this Shape ID has a non-empty member name, otherwise false otherwise.
QString shapeName() const
Returns the Shape ID's shape name, if it has one, otherwise a null string.
void setNameSpace(const QString &name)
Set the Shape ID's namespace to name, which may be an empty or null string.
QString memberName() const
Returns the Shape ID's member name, if it has one, otherwise a null string.
QString relativeShapeId() const
Returns this object as a relative Smithy Shape ID, that one without a leading namespace.
bool hasNameSpace() const
Returns true if this Shape ID has a non-empty namespace, otherwise false otherwise.
void setShapeName(const QString &name)
Set the Shape ID's shape name to name.
bool isAbsoluteRootShapeId() const
Returns true if this Shape ID is a root Shape ID, and has a namespace, false otherwise.
bool isRelativeShapeId() const
Returns true if this Shape ID is a relative Shape ID, false otherwise.
Global QtSmithy library macros.
#define QTSMITHY_EXPORT
QtSmithy library export/import macro.
#define QTSMITHY_BEGIN_NAMESPACE
Macro for starting the QtSmithy library's top-most namespace (if one is defined).
#define QTSMITHY_DECLARE_TEST(Class)
Macro for forward-delcaring a related unit test class, but only when QT_TESTLIB_LIB is defined.
#define QTSMITHY_BEFRIEND_TEST(Class)
Macro for befriending a related unit test class, but only when QT_TESTLIB_LIB is defined.
#define QTSMITHY_END_NAMESPACE
Macro for ending the QtSmithy library's top-most namespace (if one is defined).