StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
reader.hxx
1#pragma once
2
3#include <StormByte/buffer/simple.hxx>
4#include <StormByte/clonable.hxx>
5
20namespace StormByte::Buffer {
37 class STORMBYTE_PUBLIC Reader: public Clonable<Reader> {
38 public:
45 Reader() noexcept = default;
46
51 Reader(const Reader& other) = default;
52
57 Reader(Reader&& other) noexcept = default;
58
65 virtual ~Reader() noexcept = default;
66
72 Reader& operator=(const Reader& other) = default;
73
79 Reader& operator=(Reader&& other) noexcept = default;
80
102 virtual Expected<Buffer::Simple, Buffer::Exception> Read(const size_t& min = 0) const noexcept = 0;
103 };
104}
Base exception class for buffer-related errors.
Definition exception.hxx:29
Abstract base class for implementing external data readers.
Definition reader.hxx:37
Reader() noexcept=default
Default constructor.
A lightweight class for storing and manipulating simple byte buffers.
Definition simple.hxx:36
A class that can be cloned.
Definition clonable.hxx:29
Namespace for buffer-related components in the StormByte library.
Namespace for read-related utilities in the StormByte library.
Namespace for buffer-related components in the StormByte library.
Definition consumer.hxx:19
std::conditional_t< is_reference< T >::value, std::expected< std::reference_wrapper< std::remove_reference_t< T > >, std::shared_ptr< E > >, std::expected< T, std::shared_ptr< E > > > Expected
Expected type with support for reference types.
Definition expected.hxx:32