KD SOAP API Documentation  2.2
KDQName.h
Go to the documentation of this file.
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: MIT
8  */
9 
10 #ifndef KDQNAME_H
11 #define KDQNAME_H
12 
13 #include <QHash>
14 #include <QList>
15 #include <QMetaType>
16 #include <QString>
17 
18 class KDSoapValue;
19 
20 #include "KDSoapGlobal.h"
21 
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)
70 {
71  return qHash(qn.nameSpace()) ^ qHash(qn.localName());
72 }
73 
74 KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDQName &qn);
75 
76 #endif
KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDQName &qn)
Definition: KDQName.cpp:117
uint qHash(const KDQName &qn)
Definition: KDQName.h:69
#define KDSOAP_EXPORT
Definition: KDSoapGlobal.h:22
QList< KDQName > List
Definition: KDQName.h:25

© 2010-2024 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/
Generated by doxygen 1.9.1