aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson/node/serialize.h
blob: 99b598a44c3125ff5ea853b929382190f888f587 (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
#pragma once

#include "node.h"

namespace NYT {

namespace NYson {
struct IYsonConsumer;
} // namespace NYson

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

void Serialize(const TString& value, NYson::IYsonConsumer* consumer);
void Serialize(const TStringBuf& value, NYson::IYsonConsumer* consumer);
void Serialize(const char* value, NYson::IYsonConsumer* consumer);
void Deserialize(TString& value, const TNode& node);

void Serialize(signed char value, NYson::IYsonConsumer* consumer);
void Serialize(short value, NYson::IYsonConsumer* consumer);
void Serialize(int value, NYson::IYsonConsumer* consumer);
void Serialize(long value, NYson::IYsonConsumer* consumer);
void Serialize(long long value, NYson::IYsonConsumer* consumer);
void Deserialize(i64& value, const TNode& node);

void Serialize(unsigned char value, NYson::IYsonConsumer* consumer);
void Serialize(unsigned short value, NYson::IYsonConsumer* consumer);
void Serialize(unsigned int value, NYson::IYsonConsumer* consumer);
void Serialize(unsigned long value, NYson::IYsonConsumer* consumer);
void Serialize(unsigned long long value, NYson::IYsonConsumer* consumer);
void Deserialize(ui64& value, const TNode& node);

void Serialize(double value, NYson::IYsonConsumer* consumer);
void Deserialize(double& value, const TNode& node);

void Serialize(bool value, NYson::IYsonConsumer* consumer);
void Deserialize(bool& value, const TNode& node);

void Serialize(const TNode& node, NYson::IYsonConsumer* consumer);
void Deserialize(TNode& value, const TNode& node);

void Serialize(const THashMap<TString, TString>& renameColumns, NYson::IYsonConsumer* consumer);

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

} // namespace NYT