CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
uri_converter.h
1#pragma once
2
3#include <system/uri.h>
4#include <system/object.h>
5#include <system/details/pointer_collection_helpers.h>
6#include <cstdint>
7
8#include "system/text/json/serialization/converters/value/json_primitive_converter.h"
9
10namespace System
11{
12namespace Text
13{
14namespace Json
15{
16class JsonSerializerOptions;
17namespace Serialization
18{
19enum class JsonNumberHandling;
20enum class JsonValueType : uint8_t;
21} // namespace Serialization
22class Utf8JsonReader;
23class Utf8JsonWriter;
24} // namespace Json
25} // namespace Text
26class TypeInfo;
27} // namespace System
28
29namespace System {
30
31namespace Text {
32
33namespace Json {
34
35namespace Serialization {
36
37namespace Converters {
38
39class UriConverter final : public JsonPrimitiveConverter<System::SharedPtr<Uri>>
40{
41 typedef UriConverter ThisType;
43
44 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
45 RTTI_INFO_DECL();
46
47public:
48
54 void SetTemplateWeakPtr(uint32_t argument) override;
55
56private:
57
58 static System::SharedPtr<Uri> ReadCore(Utf8JsonReader& reader);
59
60};
61
62} // namespace Converters
63} // namespace Serialization
64} // namespace Json
65} // namespace Text
66} // 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
System::SharedPtr< Uri > Read(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
void Write(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< Uri > value, System::SharedPtr< JsonSerializerOptions > options) override
JsonValueType GetSupportedJsonValueTypes(JsonNumberHandling _) override
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, System::SharedPtr< Uri > value, System::SharedPtr< JsonSerializerOptions > options, bool isWritingExtensionDataProperty) override
System::SharedPtr< Uri > ReadAsPropertyNameCore(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) 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