CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
stream_read_buffer_state.h
1#pragma once
2
3#include <system/io/stream.h>
4#include <system/array.h>
5#include <cstdint>
6
7namespace System
8{
9namespace Buffers
10{
11template <typename> class ReadOnlySequence;
12} // namespace Buffers
13namespace Text
14{
15namespace Json
16{
17class JsonReaderState;
18class Utf8JsonReader;
19} // namespace Json
20} // namespace Text
21} // namespace System
22
23namespace System {
24
25namespace Text {
26
27namespace Json {
28
29namespace Serialization {
30
31class ASPOSECPP_SHARED_CLASS StreamReadBufferState : public System::Object, public System::Details::BoxableObjectBase
32{
35
36 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
37 ASPOSECPP_SHARED_RTTI_INFO_DECL();
38
39public:
40
42
43public:
44
45 ASPOSECPP_SHARED_API bool get_IsFinalBlock();
47
48 ASPOSECPP_SHARED_API StreamReadBufferState(int32_t initialBufferSize);
49
50 ASPOSECPP_SHARED_API void Read(System::SharedPtr<IO::Stream> stream);
51 ASPOSECPP_SHARED_API void Advance(int64_t bytesConsumed);
52 ASPOSECPP_SHARED_API void GetReader(JsonReaderState jsonReaderState, Utf8JsonReader& reader);
53 ASPOSECPP_SHARED_API void Dispose();
54
55 ASPOSECPP_SHARED_API StreamReadBufferState();
56
57 ASPOSECPP_SHARED_API bool operator ==(const StreamReadBufferState& other) const;
58 ASPOSECPP_SHARED_API bool operator !=(const StreamReadBufferState& other) const;
59
60protected:
61
62 #ifdef ASPOSE_GET_SHARED_MEMBERS
63 void GetSharedMembers(System::Object::shared_members_type& result) const override;
64 #endif
65
66private:
67
69 uint8_t _offset;
70 int32_t _count;
71 int32_t _maxCount;
72 bool _isFirstBlock;
73 bool _isFinalBlock;
74 static const int32_t UnsuccessfulReadCountThreshold = 5;
75 int32_t _unsuccessfulReadCount;
76
77 void ProcessReadBytes();
78
79};
80
81} // namespace Serialization
82} // namespace Json
83} // namespace Text
84} // namespace System
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: json_reader_state.h:31
Definition: stream_read_buffer_state.h:32
void GetReader(JsonReaderState jsonReaderState, Utf8JsonReader &reader)
void Read(System::SharedPtr< IO::Stream > stream)
Buffers::ReadOnlySequence< uint8_t > get_Bytes()
Definition: utf8_json_reader.h:78
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9
bool operator!=(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:173
bool operator==(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:167