File indexing completed on 2024-04-28 03:52:08

0001 /*
0002  * BluezQt - Asynchronous BlueZ wrapper library
0003  *
0004  * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <mincequi@web.de>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007  */
0008 
0009 #ifndef METHOD_H
0010 #define METHOD_H
0011 
0012 #include "Comment.h"
0013 #include "Parameter.h"
0014 
0015 class Method
0016 {
0017 public:
0018     struct Tags {
0019         bool isOptional = false;
0020         bool isDeprecated = false;
0021         bool isExperimental = false;
0022     };
0023 
0024     Method();
0025 
0026     bool finalize();
0027 
0028     QString name() const;
0029     QList<Parameter> inParameters() const;
0030     QList<Parameter> outParameters() const;
0031     Parameter outParameter() const;
0032     Tags tags() const;
0033     QStringList comment() const;
0034 
0035 private:
0036     QString guessOutParameterName() const;
0037 
0038     QString m_name;
0039     QStringList m_inParameterStrings;
0040     QStringList m_outParameterStrings;
0041     Parameter m_outParameter;
0042     QStringList m_stringTags;
0043     QString m_limitation;
0044     Comment m_comment;
0045 
0046     // finalized members
0047     Tags m_tags;
0048     QList<Parameter> m_inParameters;
0049     QList<Parameter> m_outParameters;
0050 
0051     friend class Methods;
0052 };
0053 
0054 #endif // METHOD_H