score
Home
Classes
Namespaces
Files
MimeVisitor.hpp
1
#pragma once
2
#include <
score/serialization/VisitorCommon.hpp
>
3
4
#include <QMimeData>
5
6
template
<
typename
T>
7
struct
MimeReader
;
8
template
<
typename
T>
9
struct
MimeWriter
;
10
11
template
<
typename
T>
12
struct
Mime
13
{
14
using
Serializer
=
MimeReader<T>
;
15
using
Deserializer
=
MimeWriter<T>
;
16
17
static
constexpr SerializationIdentifier type() {
return
4; }
18
};
19
20
// Reads into a QMimeData
21
struct
MimeDataReader
22
{
23
QMimeData& m_mime;
24
MimeDataReader
(QMimeData& p)
25
: m_mime{p}
26
{
27
}
28
};
29
30
// Writes from a QMimeData to an object.
31
struct
MimeDataWriter
32
{
33
const
QMimeData& m_mime;
34
MimeDataWriter
(
const
QMimeData& p)
35
: m_mime{p}
36
{
37
}
38
};
VisitorCommon.hpp
MimeDataReader
Definition:
MimeVisitor.hpp:22
MimeDataWriter
Definition:
MimeVisitor.hpp:32
Mime
Definition:
MimeVisitor.hpp:13
MimeReader
Definition:
MimeVisitor.hpp:7
MimeWriter< Process::ProcessData >
Definition:
ProcessMimeSerialization.hpp:56
MimeWriter
Definition:
MimeVisitor.hpp:9