aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/global/mock_modules/module3_defs/test_variable.cpp
blob: a02fd15130b871bc9679afb4a41b48effcae2565 (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
#include "direct_access.h"

#include <library/cpp/yt/global/mock_modules/module3_public/test_tag.h>

#include <library/cpp/yt/global/variable.h>

namespace NYT {

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

NGlobal::TErasedStorage GetGlobal3() noexcept;

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

static NGlobal::TVariable<std::array<int, 2>> TestVariable3{
    TestTag3,
    &GetGlobal3,
    std::array{11, 22}};

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

NGlobal::TErasedStorage GetGlobal3() noexcept
{
    return NGlobal::TErasedStorage{TestVariable3.Get()};
}

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

std::array<int, 2> GetTestVariable3()
{
    return TestVariable3.Get();
}

void SetTestVariable3(std::array<int, 2> val)
{
    TestVariable3.Set(val);
}

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

} // namespace NYT