blob: 9c732b8ea85cab7fad4afbd5b440840f7429183f (
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
|
#include "reader.h"
#include <library/cpp/yson_pull/detail/reader.h>
using namespace NYsonPull;
TReader::TReader(
THolder<NInput::IStream> stream,
EStreamType mode)
: Stream_{std::move(stream)}
, Impl_{MakeHolder<NDetail::reader_impl>(*Stream_, mode)} {
}
TReader::TReader(TReader&& other) noexcept
: Stream_{std::move(other.Stream_)}
, Impl_{std::move(other.Impl_)} {
}
TReader::~TReader() {
}
const TEvent& TReader::NextEvent() {
return Impl_->next_event();
}
const TEvent& TReader::LastEvent() const noexcept {
return Impl_->last_event();
}
|