CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
i_buffer_writer.h
1
2#pragma once
3
4#include <system/object.h>
5#include <cstdint>
6
7namespace System
8{
9template <typename> class Memory;
10template <typename> class Span;
11} // namespace System
12
13namespace System {
14
15namespace Buffers {
16
22template <typename T>
23class IBufferWriter : virtual public System::Object
24{
25 RTTI_INFO_TEMPLATE_CLASS(System::Buffers::IBufferWriter<T>, System::BaseTypesInfo<System::Object>);
26
27public:
30 virtual void Advance(int32_t count) = 0;
31
35 virtual System::Memory<T> GetMemory(int32_t sizeHint = 0) = 0;
36
40 virtual System::Span<T> GetSpan(int32_t sizeHint = 0) = 0;
41};
42
43} // namespace Buffers
44} // namespace System
Represents a sink for data, into which a consumer can write data. Objects of this class should only b...
Definition: i_buffer_writer.h:24
virtual System::Span< T > GetSpan(int32_t sizeHint=0)=0
Returns a Span that can be written to, and is guaranteed to have at least sizeHint elements.
virtual void Advance(int32_t count)=0
Notifies the IBufferWriter implementation that count elements were written to the output.
virtual System::Memory< T > GetMemory(int32_t sizeHint=0)=0
Returns a Memory that can be written to, and is guaranteed to have at least sizeHint elements.
Represents a mutable memory segment backed by an array.
Definition: memory.h:159
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Represents a contiguous region of arbitrary memory similar to C++20's std::span.
Definition: span.h:375
Definition: db_command.h:9