CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_object_info_values_of_t.h
1#pragma once
2
3#include <system/func.h>
4#include <system/details/pointer_collection_helpers.h>
5#include <system/array.h>
6#include <system/action.h>
7#include <cstdint>
8
9#include "system/text/json/serialization/json_serializer_context.h"
10#include "system/text/json/writer/utf8_json_writer.h"
11
12namespace System
13{
14namespace Text
15{
16namespace Json
17{
18namespace Serialization
19{
20enum class JsonNumberHandling;
21class JsonTypeClassifierFactoryBase;
22namespace Metadata
23{
24class JsonParameterInfoValues;
25class JsonPolymorphismOptions;
26class JsonPropertyInfoBase;
27} // namespace Metadata
28} // namespace Serialization
29} // namespace Json
30} // namespace Text
31} // namespace System
32
33namespace System {
34
35namespace Text {
36
37namespace Json {
38
39namespace Serialization {
40
41namespace Metadata {
42
43template<typename T>
45{
48
49 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
50 RTTI_INFO_TEMPLATE_CLASS(ThisType, ThisTypeBaseTypesInfo);
51
52 template<typename FT0> friend class JsonObjectInfoValues;
53
54public:
55
57
59 {
60 return pr_ObjectCreator;
61 }
62
64 {
65 pr_ObjectCreator = value;
66 }
67
69 {
70 _fastObjectCreator = value;
71 }
72
74 {
75 return _fastObjectCreator;
76 }
77
79 {
80 return pr_ObjectWithParameterizedConstructorCreator;
81 }
82
84 {
85 pr_ObjectWithParameterizedConstructorCreator = value;
86 }
87
89
91 {
92 return pr_PropertyMetadataInitializer;
93 }
94
96 {
97 pr_PropertyMetadataInitializer = value;
98 }
99
101 {
102 _fastPropertyMetadataInitializer = value;
103 }
104
106 {
107 return _fastPropertyMetadataInitializer;
108 }
109
111 {
112 return pr_ConstructorParameterMetadataInitializer;
113 }
114
116 {
117 pr_ConstructorParameterMetadataInitializer = value;
118 }
119
121 {
122 return pr_NumberHandling;
123 }
124
126 {
127 pr_NumberHandling = value;
128 }
129
131 {
132 return pr_PolymorphismOptions;
133 }
134
136 {
137 pr_PolymorphismOptions = value;
138 }
139
141
143 {
144 return pr_SerializeHandler;
145 }
146
148 {
149 pr_SerializeHandler = value;
150 }
151
153 {
154 _fastSerializeHandler = value;
155 _fastSerializeContext = context;
156 }
157
159 {
160 return _fastSerializeHandler;
161 }
162
164 {
165 return _fastSerializeContext;
166 }
167
169 {
170 return pr_TypeClassifierFactory;
171 }
172
174 {
175 pr_TypeClassifierFactory = value;
176 }
177
179 Func<T> objectCreator,
180 Func<System::SharedPtr<Array<System::SharedPtr<Object>>>, T> objectWithParameterizedConstructorCreator,
182 Func<System::SharedPtr<Array<System::SharedPtr<JsonParameterInfoValues>>>> constructorParameterMetadataInitializer,
183 JsonNumberHandling numberHandling,
185 Action<System::SharedPtr<Utf8JsonWriter>, T> serializeHandler,
187 : pr_ObjectCreator(objectCreator)
188 , pr_ObjectWithParameterizedConstructorCreator(objectWithParameterizedConstructorCreator)
189 , pr_PropertyMetadataInitializer(propertyMetadataInitializer)
190 , pr_ConstructorParameterMetadataInitializer(constructorParameterMetadataInitializer)
191 , pr_NumberHandling(numberHandling)
192 , pr_PolymorphismOptions(polymorphismOptions)
193 , pr_SerializeHandler(serializeHandler)
194 , pr_TypeClassifierFactory(typeClassifierFactory)
195 {
196 }
197
198 JsonObjectInfoValues() : pr_NumberHandling((JsonNumberHandling)0)
199 {
200 }
201
202 void SetTemplateWeakPtr(uint32_t argument) override
203 {
204 ASPOSE_UNUSED(argument);
205 }
206
207protected:
208
209 #ifdef ASPOSE_GET_SHARED_MEMBERS
210 void GetSharedMembers(System::Object::shared_members_type& result) const override
211 {
212 Object::GetSharedMembers(result);
213
214 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_ObjectCreator", this->pr_ObjectCreator);
215 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_ObjectWithParameterizedConstructorCreator", this->pr_ObjectWithParameterizedConstructorCreator);
216 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_PropertyMetadataInitializer", this->pr_PropertyMetadataInitializer);
217 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_ConstructorParameterMetadataInitializer", this->pr_ConstructorParameterMetadataInitializer);
218 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_NumberHandling", this->pr_NumberHandling);
219 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_PolymorphismOptions", this->pr_PolymorphismOptions);
220 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_SerializeHandler", this->pr_SerializeHandler);
221 result.Add("System::Text::Json::Serialization::Metadata::JsonObjectInfoValues::pr_TypeClassifierFactory", this->pr_TypeClassifierFactory);
222 }
223 #endif
224
225private:
226
227 Func<T> pr_ObjectCreator;
228 ObjectCreatorFn _fastObjectCreator = nullptr;
229 Func<System::SharedPtr<Array<System::SharedPtr<Object>>>, T> pr_ObjectWithParameterizedConstructorCreator;
231 PropertyMetadataInitializerFn _fastPropertyMetadataInitializer = nullptr;
232 Func<System::SharedPtr<Array<System::SharedPtr<JsonParameterInfoValues>>>> pr_ConstructorParameterMetadataInitializer;
233 JsonNumberHandling pr_NumberHandling;
234 System::SharedPtr<JsonPolymorphismOptions> pr_PolymorphismOptions;
235 Action<System::SharedPtr<Utf8JsonWriter>, T> pr_SerializeHandler;
236 SerializeHandlerFn _fastSerializeHandler = nullptr;
237 void* _fastSerializeContext = nullptr;
239
240};
241
242} // namespace Metadata
243} // namespace Serialization
244} // namespace Json
245} // namespace Text
246} // namespace System
Class that represents an array data structure. Objects of this class should only be allocated using S...
Definition: array.h:296
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_object_info_values_of_t.h:45
void init_PropertyMetadataInitializer(Func< System::SharedPtr< JsonSerializerContext >, System::SharedPtr< Array< System::SharedPtr< JsonPropertyInfoBase > > > > value)
Definition: json_object_info_values_of_t.h:95
void init_SerializeHandlerFast(SerializeHandlerFn value, void *context)
Definition: json_object_info_values_of_t.h:152
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_object_info_values_of_t.h:202
void init_NumberHandling(JsonNumberHandling value)
Definition: json_object_info_values_of_t.h:125
SerializeHandlerFn get_FastSerializeHandler() const
Definition: json_object_info_values_of_t.h:158
JsonObjectInfoValues()
Definition: json_object_info_values_of_t.h:198
void init_ObjectWithParameterizedConstructorCreator(Func< System::SharedPtr< Array< System::SharedPtr< Object > > >, T > value)
Definition: json_object_info_values_of_t.h:83
PropertyMetadataInitializerFn get_FastPropertyMetadataInitializer() const
Definition: json_object_info_values_of_t.h:105
Func< System::SharedPtr< JsonSerializerContext >, System::SharedPtr< Array< System::SharedPtr< JsonPropertyInfoBase > > > > get_PropertyMetadataInitializer()
Definition: json_object_info_values_of_t.h:90
System::SharedPtr< Object >(*)() ObjectCreatorFn
Definition: json_object_info_values_of_t.h:56
void init_SerializeHandler(Action< System::SharedPtr< Utf8JsonWriter >, T > value)
Definition: json_object_info_values_of_t.h:147
ObjectCreatorFn get_FastObjectCreator() const
Definition: json_object_info_values_of_t.h:73
void init_PolymorphismOptions(System::SharedPtr< JsonPolymorphismOptions > value)
Definition: json_object_info_values_of_t.h:135
Func< System::SharedPtr< Array< System::SharedPtr< Object > > >, T > get_ObjectWithParameterizedConstructorCreator()
Definition: json_object_info_values_of_t.h:78
System::SharedPtr< Array< System::SharedPtr< JsonPropertyInfoBase > > >(*)(System::SharedPtr< JsonSerializerOptions >) PropertyMetadataInitializerFn
Definition: json_object_info_values_of_t.h:88
void init_TypeClassifierFactory(System::SharedPtr< JsonTypeClassifierFactoryBase > value)
Definition: json_object_info_values_of_t.h:173
void(*)(void *, System::SharedPtr< Utf8JsonWriter >, T) SerializeHandlerFn
Definition: json_object_info_values_of_t.h:140
void init_ConstructorParameterMetadataInitializer(Func< System::SharedPtr< Array< System::SharedPtr< JsonParameterInfoValues > > > > value)
Definition: json_object_info_values_of_t.h:115
void init_PropertyMetadataInitializerFast(PropertyMetadataInitializerFn value)
Definition: json_object_info_values_of_t.h:100
Action< System::SharedPtr< Utf8JsonWriter >, T > get_SerializeHandler()
Definition: json_object_info_values_of_t.h:142
void init_ObjectCreator(Func< T > value)
Definition: json_object_info_values_of_t.h:63
Func< T > get_ObjectCreator()
Definition: json_object_info_values_of_t.h:58
void init_ObjectCreatorFast(ObjectCreatorFn value)
Definition: json_object_info_values_of_t.h:68
JsonObjectInfoValues(Func< T > objectCreator, Func< System::SharedPtr< Array< System::SharedPtr< Object > > >, T > objectWithParameterizedConstructorCreator, Func< System::SharedPtr< JsonSerializerContext >, System::SharedPtr< Array< System::SharedPtr< JsonPropertyInfoBase > > > > propertyMetadataInitializer, Func< System::SharedPtr< Array< System::SharedPtr< JsonParameterInfoValues > > > > constructorParameterMetadataInitializer, JsonNumberHandling numberHandling, System::SharedPtr< JsonPolymorphismOptions > polymorphismOptions, Action< System::SharedPtr< Utf8JsonWriter >, T > serializeHandler, System::SharedPtr< JsonTypeClassifierFactoryBase > typeClassifierFactory)
Definition: json_object_info_values_of_t.h:178
void * get_FastSerializeContext() const
Definition: json_object_info_values_of_t.h:163
Func< System::SharedPtr< Array< System::SharedPtr< JsonParameterInfoValues > > > > get_ConstructorParameterMetadataInitializer()
Definition: json_object_info_values_of_t.h:110
JsonNumberHandling get_NumberHandling()
Definition: json_object_info_values_of_t.h:120
System::SharedPtr< JsonPolymorphismOptions > get_PolymorphismOptions()
Definition: json_object_info_values_of_t.h:130
System::SharedPtr< JsonTypeClassifierFactoryBase > get_TypeClassifierFactory()
Definition: json_object_info_values_of_t.h:168
@ 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