Patronum
Loading...
Searching...
No Matches
PFeature.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef FEaTURE_H
9#define FEaTURE_H
10
11#include <QString>
12#include <QVariant>
13#include <QHash>
14#include <Patronum_global.h>
15
16namespace Patronum {
17
22{
23public:
24 explicit Feature() = default;
25 explicit Feature(const QString& cmd, const QString& arg = {},
26 const QString& description = "", const QString& example = "");
27
32 QString cmd() const;
33
38 void setCmd(const QString &cmd);
39
45 QString arg() const;
46
51 void setArg(const QString &arg);
52
53 PATRONUM_LIBRARYSHARED_EXPORT friend QDataStream& operator<<(QDataStream& stream, const Feature& obj);
54 PATRONUM_LIBRARYSHARED_EXPORT friend QDataStream& operator>>(QDataStream& stream, Feature& obj);
55 PATRONUM_LIBRARYSHARED_EXPORT friend bool operator==(const Feature& left, const Feature& right);
56
62 QString description() const;
63
68 void setDescription(const QString &description);
69
74 QString example() const;
75
80 void setExample(const QString &example);
81
86 QString toString() const;
87
88
89private:
90 QString _cmd;
91 QString _description;
92 QString _example;
93 QString _arg;
94};
95
96uint PATRONUM_LIBRARYSHARED_EXPORT qHash(const Feature& feature);
97
98
99}
100
101#endif // FEaTURE_H
#define PATRONUM_LIBRARYSHARED_EXPORT
The Feature class it is atomic type for describe service command.
Definition PFeature.h:22
The Patronum namespace - It is main name space of Patronum Library. The Patronum library support the ...
uint qHash(const Feature &feature)
Definition PFeature.cpp:79
bool operator==(const Feature &left, const Feature &right)
Definition PFeature.cpp:75
QDataStream & operator>>(QDataStream &stream, Feature &obj)
Definition PFeature.cpp:67
QDataStream & operator<<(QDataStream &stream, const Feature &obj)
Definition PFeature.cpp:61