#include "reader.h" #include using namespace NYsonPull; TReader::TReader( THolder stream, EStreamType mode) : Stream_{std::move(stream)} , Impl_{MakeHolder(*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(); }