CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
utf8_json_writer_cache.h
1#pragma once
2
3#include <system/object.h>
4#include <cstdint>
5
6namespace System
7{
8namespace Buffers
9{
10template <typename> class IBufferWriter;
11} // namespace Buffers
12namespace Text
13{
14namespace Json
15{
16class JsonSerializerOptions;
17class JsonWriterOptions;
18class PooledByteBufferWriter;
19class Utf8JsonWriter;
20} // namespace Json
21} // namespace Text
22} // namespace System
23
24namespace System {
25
26namespace Text {
27
28namespace Json {
29
31{
33
34private:
35
36 class ThreadLocalState final : public System::Object
37 {
38 typedef ThreadLocalState ThisType;
39 typedef System::Object BaseType;
40
41 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
42 RTTI_INFO_DECL();
43
44 public:
45
48 int32_t RentedWriters;
49
50 ThreadLocalState();
51
52 protected:
53
54 #ifdef ASPOSE_GET_SHARED_MEMBERS
55 void GetSharedMembers(System::Object::shared_members_type& result) const override;
56 #endif
57
58 };
59
60public:
61
63 static ASPOSECPP_SHARED_API System::SharedPtr<Utf8JsonWriter> RentWriterAndBuffer(JsonWriterOptions options, int32_t defaultBufferSize, System::SharedPtr<PooledByteBufferWriter>& bufferWriter);
66 static ASPOSECPP_SHARED_API void ReturnWriter(System::SharedPtr<Utf8JsonWriter> writer);
67
68private:
69
70 static thread_local System::SharedPtr<Utf8JsonWriterCache::ThreadLocalState> t_threadLocalState;
71
72public:
74};
75
76} // namespace Json
77} // namespace Text
78} // 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_writer_options.h:31
Definition: utf8_json_writer_cache.h:31
static System::SharedPtr< Utf8JsonWriter > RentWriterAndBuffer(System::SharedPtr< JsonSerializerOptions > options, System::SharedPtr< PooledByteBufferWriter > &bufferWriter)
static System::SharedPtr< Utf8JsonWriter > RentWriter(System::SharedPtr< JsonSerializerOptions > options, System::SharedPtr< Buffers::IBufferWriter< uint8_t > > bufferWriter)
static void ReturnWriter(System::SharedPtr< Utf8JsonWriter > writer)
static void ReturnWriterAndBuffer(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< PooledByteBufferWriter > bufferWriter)
static System::SharedPtr< Utf8JsonWriter > RentWriterAndBuffer(JsonWriterOptions options, int32_t defaultBufferSize, System::SharedPtr< PooledByteBufferWriter > &bufferWriter)
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9