aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/skiff/public.h
blob: d67c6f26ee61bcbeffef9f7ce24d07da9612e470 (plain) (blame)
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
60
61
62
63
#pragma once

#include <vector>
#include <memory>

namespace NSkiff {

////////////////////////////////////////////////////////////////////////////////

enum class EWireType
{
    Nothing  /* "nothing" */,
    Int8     /* "int8" */,
    Int16    /* "int16" */,
    Int32    /* "int32" */,
    Int64    /* "int64" */,
    Int128   /* "int128" */,
    Uint8    /* "uint8" */,
    Uint16   /* "uint16" */,
    Uint32   /* "uint32" */,
    Uint64   /* "uint64" */,
    Uint128  /* "uint128" */,
    Double   /* "double" */,
    Boolean  /* "boolean" */,
    String32 /* "string32" */,
    Yson32   /* "yson32" */,

    Tuple             /* "tuple" */,
    Variant8          /* "variant8" */,
    Variant16         /* "variant16" */,
    RepeatedVariant8  /* "repeated_variant8" */,
    RepeatedVariant16 /* "repeated_variant16" */,
};

////////////////////////////////////////////////////////////////////////////////

class TSkiffSchema;
using TSkiffSchemaPtr = std::shared_ptr<TSkiffSchema>;

using TSkiffSchemaList = std::vector<TSkiffSchemaPtr>;

class TSimpleTypeSchema;
using TSimpleTypeSchemaPtr = std::shared_ptr<TSimpleTypeSchema>;

class TSkiffValidator;

class TUncheckedSkiffParser;
class TCheckedSkiffParser;

class TUncheckedSkiffWriter;
class TCheckedSkiffWriter;

#ifdef DEBUG
using TCheckedInDebugSkiffParser = TCheckedSkiffParser;
using TCheckedInDebugSkiffWriter = TCheckedSkiffWriter;
#else
using TCheckedInDebugSkiffParser = TUncheckedSkiffParser;
using TCheckedInDebugSkiffWriter = TUncheckedSkiffWriter;
#endif

////////////////////////////////////////////////////////////////////////////////

} // namespace NSkiff