-
Notifications
You must be signed in to change notification settings - Fork 298
/
Copy pathunknownSchema.h
59 lines (43 loc) · 1.3 KB
/
unknownSchema.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// SPDX-License-Identifier: Apache-2.0
// Copyright Contributors to the OpenTimelineIO project
#pragma once
#include "opentimelineio/serializableObject.h"
#include "opentimelineio/version.h"
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
class UnknownSchema : public SerializableObject
{
public:
struct Schema
{
static auto constexpr name = "UnknownSchema";
static int constexpr version = 1;
};
UnknownSchema(
std::string const& original_schema_name,
int original_schema_version);
std::string original_schema_name() const noexcept
{
return _original_schema_name;
}
int original_schema_version() const noexcept
{
return _original_schema_version;
}
AnyDictionary& data() noexcept
{
return _data;
}
bool read_from(Reader&) override;
void write_to(Writer&) const override;
bool is_unknown_schema() const override;
protected:
virtual ~UnknownSchema();
std::string _schema_name_for_reference() const override;
private:
std::string _original_schema_name;
int _original_schema_version;
AnyDictionary _data;
friend class TypeRegistry;
friend class SerializableObject::Writer;
};
}} // namespace opentimelineio::OPENTIMELINEIO_VERSION