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 <QList>
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 void setArg(const QString &arg);
47
48 PATRONUM_LIBRARYSHARED_EXPORT friend QDataStream& operator<<(QDataStream& stream, const Feature& obj);
49 PATRONUM_LIBRARYSHARED_EXPORT friend QDataStream& operator>>(QDataStream& stream, Feature& obj);
50 PATRONUM_LIBRARYSHARED_EXPORT friend bool operator==(const Feature& left, const Feature& right);
51
57 QString description() const;
58
63 void setDescription(const QString &description);
64
69 QString example() const;
70
75 void setExample(const QString &example);
76
81 QString toString() const;
82
87 unsigned int id() const;
88
89private:
90
91 unsigned int _id;
92 QString _cmd;
93 QString _description;
94 QString _example;
95 QString _arg;
96};
97
98uint PATRONUM_LIBRARYSHARED_EXPORT qHash(const Feature& feature);
99
100
101}
102
103#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:85
bool operator==(const Feature &left, const Feature &right)
Definition PFeature.cpp:80
QDataStream & operator>>(QDataStream &stream, Feature &obj)
Definition PFeature.cpp:72
QDataStream & operator<<(QDataStream &stream, const Feature &obj)
Definition PFeature.cpp:66