| KD SOAP 1.9.1

KDQName.h
1 /*
2 This file is part of KDE.
3
4 Copyright (c) 2005 Tobias Koenig <tokoe@kde.org>
5 based on wsdlpull parser by Vivek Krishna
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21 */
22
23 #ifndef KDQNAME_H
24 #define KDQNAME_H
25
26 #include <QString>
27 #include <QList>
28 #include <QHash>
29 #include <QMetaType>
30
31 class KDSoapValue;
32
33 #include "KDSoapGlobal.h"
34
35 class KDSOAP_EXPORT KDQName
36 {
37 public:
38 typedef QList<KDQName> List;
39
40 KDQName();
41
42 // Create a KDQName with prefix+localname
43 explicit KDQName( const QString &name );
44
45 // Create a KDQName with namespace+localname
46 KDQName( const QString &nameSpace, const QString &localName );
47
48 void operator=( const QString &name );
49
50 QString localName() const;
51 QString prefix() const;
52 QString qname() const;
53
54 void setNameSpace( const QString &nameSpace );
55 QString nameSpace() const;
56
57 bool operator==( const KDQName& ) const;
58 bool operator!=( const KDQName& ) const;
59
60 bool isEmpty() const;
61
65 static KDQName fromSoapValue(const KDSoapValue &value);
66
70 KDSoapValue toSoapValue(const QString &name, const QString &typeNameSpace = QString(), const QString &typeName = QString()) const;
71
72 private:
73 void parse( const QString& );
74
75 QString mNameSpace;
76 QString mLocalName;
77 QString mPrefix;
78 };
79
80 Q_DECLARE_METATYPE(KDQName)
81
82 inline uint qHash(const KDQName& qn) { return qHash(qn.nameSpace())^qHash(qn.localName()); }
83
84 QDebug operator<<(QDebug dbg, const KDQName &qn);
85
86 #endif
KDSoapValue
Definition: KDSoapValue.h:77

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/