aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme/util/utils.h
blob: 6d38164dec4635d188b0121dc3f702a471028aad (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
#pragma once

#include <library/cpp/scheme/scheme.h> 

#include <util/generic/strbuf.h>
#include <util/ysaveload.h>

namespace NScUtils {

void CopyField(const NSc::TValue& from, NSc::TValue& to);

template <typename... Args>
void CopyField(const NSc::TValue& from, NSc::TValue& to, TStringBuf path, Args... args) {
    CopyField(from[path], to[path], args...);
}

} // namespace NScUtils

template<>
struct TSerializer<NSc::TValue> {
    static void Save(IOutputStream* out, const NSc::TValue& v);
    static void Load(IInputStream* in, NSc::TValue& v);
};