Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
provider.h
Go to the documentation of this file.
1// Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Rafael Roquetto <rafael.roquetto@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef PROVIDER_H
5#define PROVIDER_H
6
7#include <qlist.h>
8#include <qstring.h>
9#include <qstringlist.h>
10#include <qtypeinfo.h>
11
12struct Tracepoint
13{
14 struct Argument
15 {
16 QString type;
17 QString name;
18 int arrayLen;
19 };
20
21 struct Field
22 {
23 enum Type {
24 Sequence,
25 Boolean,
26 Integer,
27 IntegerHex,
28 Float,
29 String,
30 Pointer,
31 QtString,
32 QtByteArray,
33 QtUrl,
34 QtRect,
35 QtSize,
36 QtRectF,
37 QtSizeF,
38 EnumeratedType,
39 FlagType,
40 Unknown
41 };
42 Type backendType;
43 QString paramType;
44 QString name;
45 int arrayLen;
46 int enumValueSize;
47 QString seqLen;
48 };
49
50 QString name;
51 QList<Argument> args;
52 QList<Field> fields;
53};
54
55struct TraceEnum {
56 QString name;
57 struct EnumValue {
58 QString name;
59 int value;
60 int range;
61 };
64};
65
66struct TraceFlags {
67 QString name;
68 struct FlagValue {
69 QString name;
70 int value;
71 };
73};
74
75Q_DECLARE_TYPEINFO(TraceEnum, Q_RELOCATABLE_TYPE);
76Q_DECLARE_TYPEINFO(TraceFlags, Q_RELOCATABLE_TYPE);
78Q_DECLARE_TYPEINFO(Tracepoint::Field, Q_RELOCATABLE_TYPE);
79Q_DECLARE_TYPEINFO(Tracepoint, Q_RELOCATABLE_TYPE);
80
89
90Provider parseProvider(const QString &filename);
91
92#endif // PROVIDER_H
Definition qlist.h:76
static void writeMetadataGenerators(QTextStream &stream)
Definition ctf.cpp:93
static void writeEpilogue(QTextStream &stream, const QString &fileName)
Definition ctf.cpp:49
static void writeWrapper(QTextStream &stream, const Tracepoint &tracepoint, const Provider &provider)
Definition ctf.cpp:56
static void writePrologue(QTextStream &stream, const QString &fileName, const Provider &provider)
Definition ctf.cpp:16
void writeCtf(QFile &device, const Provider &p)
Definition ctf.cpp:292
QT_FORWARD_DECLARE_CLASS(QTextStream)
Provider parseProvider(const QString &filename)
Definition provider.cpp:292
#define qPrintable(string)
Definition qstring.h:1552
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:177
QStringList prefixText
Definition provider.h:85
QList< TraceEnum > enumerations
Definition provider.h:86
QList< TraceFlags > flags
Definition provider.h:87
QString name
Definition provider.h:83
QList< Tracepoint > tracepoints
Definition provider.h:84
int valueSize
Definition provider.h:63
QString name
Definition provider.h:56
QList< EnumValue > values
Definition provider.h:62
QString name
Definition provider.h:67
QList< FlagValue > values
Definition provider.h:72