CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_collection_info_values_of_t_collection.h
1#pragma once
2
3#include <system/object.h>
4#include <system/func.h>
5#include <system/details/pointer_collection_helpers.h>
6#include <system/action.h>
7#include <cstdint>
8
9#include "system/text/json/writer/utf8_json_writer.h"
10
11namespace System
12{
13namespace Text
14{
15namespace Json
16{
17namespace Serialization
18{
19enum class JsonNumberHandling;
20class JsonTypeClassifierFactoryBase;
21namespace Metadata
22{
23class JsonPolymorphismOptions;
24class JsonTypeInfoBase;
25} // namespace Metadata
26} // namespace Serialization
27} // namespace Json
28} // namespace Text
29} // namespace System
30
31namespace System {
32
33namespace Text {
34
35namespace Json {
36
37namespace Serialization {
38
39namespace Metadata {
40
41template<typename TCollection>
43{
46
47 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
48 RTTI_INFO_TEMPLATE_CLASS(ThisType, ThisTypeBaseTypesInfo);
49
50 template<typename FT0> friend class JsonCollectionInfoValues;
51
52public:
53
55
57 {
58 return pr_ObjectCreator;
59 }
60
62 {
63 pr_ObjectCreator = value;
64 }
65
67 {
68 _fastObjectCreator = value;
69 }
70
72 {
73 return _fastObjectCreator;
74 }
75
77 {
78 return pr_KeyInfo;
79 }
80
82 {
83 pr_KeyInfo = value;
84 }
85
87 {
88 return pr_ElementInfo;
89 }
90
92 {
93 pr_ElementInfo = value;
94 }
95
97 {
98 return pr_NumberHandling;
99 }
100
102 {
103 pr_NumberHandling = value;
104 }
105
107 {
108 return pr_PolymorphismOptions;
109 }
110
112 {
113 pr_PolymorphismOptions = value;
114 }
115
116 using SerializeHandlerFn = void (*)(void*, System::SharedPtr<Utf8JsonWriter>, TCollection);
117
119 {
120 return pr_SerializeHandler;
121 }
122
124 {
125 pr_SerializeHandler = value;
126 }
127
129 {
130 _fastSerializeHandler = value;
131 _fastSerializeContext = context;
132 }
133
135 {
136 return _fastSerializeHandler;
137 }
138
140 {
141 return _fastSerializeContext;
142 }
143
145 {
146 return pr_TypeClassifierFactory;
147 }
148
150 {
151 pr_TypeClassifierFactory = value;
152 }
153
154 JsonCollectionInfoValues() : pr_ElementInfo(nullptr), pr_NumberHandling((JsonNumberHandling)0)
155 {
156 }
157
158 void SetTemplateWeakPtr(uint32_t argument) override
159 {
160 ASPOSE_UNUSED(argument);
161 }
162
163protected:
164
165 #ifdef ASPOSE_GET_SHARED_MEMBERS
166 void GetSharedMembers(System::Object::shared_members_type& result) const override
167 {
168 Object::GetSharedMembers(result);
169
170 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_ObjectCreator", this->pr_ObjectCreator);
171 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_KeyInfo", this->pr_KeyInfo);
172 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_ElementInfo", this->pr_ElementInfo);
173 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_NumberHandling", this->pr_NumberHandling);
174 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_PolymorphismOptions", this->pr_PolymorphismOptions);
175 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_SerializeHandler", this->pr_SerializeHandler);
176 result.Add("System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues::pr_TypeClassifierFactory", this->pr_TypeClassifierFactory);
177 }
178 #endif
179
180private:
181
182 Func<TCollection> pr_ObjectCreator;
183 ObjectCreatorFn _fastObjectCreator = nullptr;
186 JsonNumberHandling pr_NumberHandling;
187 System::SharedPtr<JsonPolymorphismOptions> pr_PolymorphismOptions;
188 Action<System::SharedPtr<Utf8JsonWriter>, TCollection> pr_SerializeHandler;
189 SerializeHandlerFn _fastSerializeHandler = nullptr;
190 void* _fastSerializeContext = nullptr;
192
193};
194
195} // namespace Metadata
196} // namespace Serialization
197} // namespace Json
198} // namespace Text
199} // 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_collection_info_values_of_t_collection.h:43
System::SharedPtr< JsonPolymorphismOptions > get_PolymorphismOptions()
Definition: json_collection_info_values_of_t_collection.h:106
JsonCollectionInfoValues()
Definition: json_collection_info_values_of_t_collection.h:154
ObjectCreatorFn get_FastObjectCreator() const
Definition: json_collection_info_values_of_t_collection.h:71
System::SharedPtr< JsonTypeInfoBase > get_KeyInfo()
Definition: json_collection_info_values_of_t_collection.h:76
void init_NumberHandling(JsonNumberHandling value)
Definition: json_collection_info_values_of_t_collection.h:101
System::SharedPtr< Object >(*)() ObjectCreatorFn
Definition: json_collection_info_values_of_t_collection.h:54
SerializeHandlerFn get_FastSerializeHandler() const
Definition: json_collection_info_values_of_t_collection.h:134
void init_SerializeHandler(Action< System::SharedPtr< Utf8JsonWriter >, TCollection > value)
Definition: json_collection_info_values_of_t_collection.h:123
void init_ObjectCreator(Func< TCollection > value)
Definition: json_collection_info_values_of_t_collection.h:61
void init_ObjectCreatorFast(ObjectCreatorFn value)
Definition: json_collection_info_values_of_t_collection.h:66
void init_KeyInfo(System::SharedPtr< JsonTypeInfoBase > value)
Definition: json_collection_info_values_of_t_collection.h:81
void init_SerializeHandlerFast(SerializeHandlerFn value, void *context)
Definition: json_collection_info_values_of_t_collection.h:128
void(*)(void *, System::SharedPtr< Utf8JsonWriter >, TCollection) SerializeHandlerFn
Definition: json_collection_info_values_of_t_collection.h:116
void * get_FastSerializeContext() const
Definition: json_collection_info_values_of_t_collection.h:139
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_collection_info_values_of_t_collection.h:158
void init_ElementInfo(System::SharedPtr< JsonTypeInfoBase > value)
Definition: json_collection_info_values_of_t_collection.h:91
void init_TypeClassifierFactory(System::SharedPtr< JsonTypeClassifierFactoryBase > value)
Definition: json_collection_info_values_of_t_collection.h:149
Func< TCollection > get_ObjectCreator()
Definition: json_collection_info_values_of_t_collection.h:56
void init_PolymorphismOptions(System::SharedPtr< JsonPolymorphismOptions > value)
Definition: json_collection_info_values_of_t_collection.h:111
System::SharedPtr< JsonTypeInfoBase > get_ElementInfo()
Definition: json_collection_info_values_of_t_collection.h:86
Action< System::SharedPtr< Utf8JsonWriter >, TCollection > get_SerializeHandler()
Definition: json_collection_info_values_of_t_collection.h:118
JsonNumberHandling get_NumberHandling()
Definition: json_collection_info_values_of_t_collection.h:96
System::SharedPtr< JsonTypeClassifierFactoryBase > get_TypeClassifierFactory()
Definition: json_collection_info_values_of_t_collection.h:144
@ Text
Defines color adjustment information for text.
JsonNumberHandling
Definition: json_number_handling.h:16
Definition: db_command.h:9
MulticastDelegate< void(Args...)> Action
Delegate type that references methods that have no return value.
Definition: action.h:40