KD SOAP  1.10.0
KDQName.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2005 Tobias Koenig <tokoe@kde.org>
5  based on wsdlpull parser by Vivek Krishna
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8  */
9 
10 #ifndef KDQNAME_H
11 #define KDQNAME_H
12 
13 #include <QString>
14 #include <QList>
15 #include <QHash>
16 #include <QMetaType>
17 
18 class KDSoapValue;
19 
20 #include "KDSoapGlobal.h"
21 
22 class KDSOAP_EXPORT KDQName
23 {
24  public:
25  typedef QList<KDQName> List;
26 
27  KDQName();
28 
29  // Create a KDQName with prefix+localname
30  explicit KDQName( const QString &name );
31 
32  // Create a KDQName with namespace+localname
33  KDQName( const QString &nameSpace, const QString &localName );
34 
35  void operator=( const QString &name );
36 
37  QString localName() const;
38  QString prefix() const;
39  QString qname() const;
40 
41  void setNameSpace( const QString &nameSpace );
42  QString nameSpace() const;
43 
44  bool operator==( const KDQName& ) const;
45  bool operator!=( const KDQName& ) const;
46 
47  bool isEmpty() const;
48 
52  static KDQName fromSoapValue(const KDSoapValue &value);
53 
57  KDSoapValue toSoapValue(const QString &name, const QString &typeNameSpace = QString(), const QString &typeName = QString()) const;
58 
59  private:
60  void parse( const QString& );
61 
62  QString mNameSpace;
63  QString mLocalName;
64  QString mPrefix;
65 };
66 
67 Q_DECLARE_METATYPE(KDQName)
68 
69 inline uint qHash(const KDQName& qn) { return qHash(qn.nameSpace())^qHash(qn.localName()); }
70 
71 QDebug operator<<(QDebug dbg, const KDQName &qn);
72 
73 #endif
Definition: KDSoapValue.h:69

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/