CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
int_16_converter.h
1#pragma once
2
3#include <system/details/pointer_collection_helpers.h>
4#include <cstdint>
5
6#include "system/text/json/serialization/converters/value/json_primitive_converter.h"
7
8namespace System
9{
10namespace Text
11{
12namespace Json
13{
14class JsonSerializerOptions;
15namespace Serialization
16{
17enum class JsonNumberHandling;
18enum class JsonValueType : uint8_t;
19} // namespace Serialization
20class Utf8JsonReader;
21class Utf8JsonWriter;
22} // namespace Json
23} // namespace Text
24class TypeInfo;
25} // namespace System
26
27namespace System {
28
29namespace Text {
30
31namespace Json {
32
33namespace Serialization {
34
35namespace Converters {
36
37class Int16Converter final : public JsonPrimitiveConverter<int16_t>
38{
41
42 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
43 RTTI_INFO_DECL();
44
45public:
46
48
49 int16_t Read(Utf8JsonReader& reader, const System::TypeInfo& typeToConvert, System::SharedPtr<JsonSerializerOptions> options) override;
52 void WriteAsPropertyNameCore(System::SharedPtr<Utf8JsonWriter> writer, int16_t value, System::SharedPtr<JsonSerializerOptions> options, bool isWritingExtensionDataProperty) override;
56 void SetTemplateWeakPtr(uint32_t argument) override;
57
58};
59
60} // namespace Converters
61} // namespace Serialization
62} // namespace Json
63} // namespace Text
64} // namespace System
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
void WriteAsPropertyNameCore(System::SharedPtr< Utf8JsonWriter > writer, int16_t value, System::SharedPtr< JsonSerializerOptions > options, bool isWritingExtensionDataProperty) override
JsonValueType GetSupportedJsonValueTypes(JsonNumberHandling numberHandling) override
int16_t ReadNumberWithCustomHandling(Utf8JsonReader &reader, JsonNumberHandling handling, System::SharedPtr< JsonSerializerOptions > options) override
void Write(System::SharedPtr< Utf8JsonWriter > writer, int16_t value, System::SharedPtr< JsonSerializerOptions > options) override
int16_t Read(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
int16_t ReadAsPropertyNameCore(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
void WriteNumberWithCustomHandling(System::SharedPtr< Utf8JsonWriter > writer, int16_t value, JsonNumberHandling handling) override
Definition: utf8_json_reader.h:78
Represents a particular type and provides information about it.
Definition: type_info.h:109
@ Text
Defines color adjustment information for text.
@ TypeInfo
Specifies that the member is a type.
JsonValueType
Definition: json_value_type.h:15
JsonNumberHandling
Definition: json_number_handling.h:16
Definition: db_command.h:9