writer.cpp 823 B

123456789101112131415161718192021222324252627282930
  1. #include "writer.h"
  2. #include <library/cpp/yson_pull/detail/writer.h>
  3. using namespace NYsonPull;
  4. TWriter NYsonPull::MakeBinaryWriter(
  5. THolder<NOutput::IStream> stream,
  6. EStreamType mode) {
  7. return NYsonPull::NDetail::make_writer<NYsonPull::NDetail::TBinaryWriterImpl>(
  8. std::move(stream),
  9. mode);
  10. }
  11. TWriter NYsonPull::MakeTextWriter(
  12. THolder<NOutput::IStream> stream,
  13. EStreamType mode) {
  14. return NYsonPull::NDetail::make_writer<NYsonPull::NDetail::TTextWriterImpl>(
  15. std::move(stream),
  16. mode);
  17. }
  18. TWriter NYsonPull::MakePrettyTextWriter(
  19. THolder<NOutput::IStream> stream,
  20. EStreamType mode,
  21. size_t indent_size) {
  22. return NYsonPull::NDetail::make_writer<NYsonPull::NDetail::TPrettyWriterImpl>(
  23. std::move(stream),
  24. mode,
  25. indent_size);
  26. }