CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_property_info_values_of_t.h
1#pragma once
2
3#include <system/type_info.h>
4#include <system/string.h>
5#include <system/nullable.h>
6#include <system/func.h>
7#include <system/details/pointer_collection_helpers.h>
8#include <system/action.h>
9#include <cstdint>
10
11#include "system/text/json/serialization/json_ignore_condition.h"
12#include "system/text/json/serialization/json_number_handling.h"
13
14namespace System
15{
16namespace Text
17{
18namespace Json
19{
20namespace Serialization
21{
22template <typename> class JsonConverter;
23class JsonConverterBase;
24namespace Metadata
25{
26class JsonTypeInfoBase;
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 JsonPropertyInfoValues;
53
54public:
55
57 {
58 return pr_IsProperty;
59 }
60
61 void init_IsProperty(bool value)
62 {
63 pr_IsProperty = value;
64 }
65
67 {
68 return pr_IsPublic;
69 }
70
71 void init_IsPublic(bool value)
72 {
73 pr_IsPublic = value;
74 }
75
77 {
78 return pr_IsVirtual;
79 }
80
81 void init_IsVirtual(bool value)
82 {
83 pr_IsVirtual = value;
84 }
85
87 {
88 return pr_DeclaringType;
89 }
90
92 {
93 pr_DeclaringType = value;
94 }
95
97 {
98 return pr_PropertyTypeInfo;
99 }
100
102 {
103 pr_PropertyTypeInfo = value;
104 }
105
107 {
108 return pr_Converter;
109 }
110
112 {
113 pr_Converter = value;
114 }
115
118
120 {
121 return pr_Getter;
122 }
123
125 {
126 pr_Getter = value;
127 }
128
130 {
131 _fastGetter = value;
132 }
133
135 {
136 return _fastGetter;
137 }
138
140 {
141 return pr_Setter;
142 }
143
145 {
146 pr_Setter = value;
147 }
148
150 {
151 _fastSetter = value;
152 }
153
155 {
156 return _fastSetter;
157 }
158
160 {
161 return pr_IgnoreCondition;
162 }
163
165 {
166 pr_IgnoreCondition = value;
167 }
168
170 {
171 return pr_HasJsonInclude;
172 }
173
174 void init_HasJsonInclude(bool value)
175 {
176 pr_HasJsonInclude = value;
177 }
178
180 {
181 return pr_IsExtensionData;
182 }
183
184 void init_IsExtensionData(bool value)
185 {
186 pr_IsExtensionData = value;
187 }
188
190 {
191 return pr_NumberHandling;
192 }
193
195 {
196 pr_NumberHandling = value;
197 }
198
200 {
201 return pr_PropertyName;
202 }
203
205 {
206 pr_PropertyName = value;
207 }
208
210 {
211 return pr_JsonPropertyName;
212 }
213
215 {
216 pr_JsonPropertyName = value;
217 }
218
220 bool isProperty,
221 bool isPublic,
222 bool isVirtual,
223 TypeInfo declaringType,
228 Nullable<JsonIgnoreCondition> ignoreCondition,
229 bool hasJsonInclude,
230 bool isExtensionData,
231 Nullable<JsonNumberHandling> numberHandling,
232 String propertyName,
233 String jsonPropertyName)
234 : pr_IsProperty(isProperty)
235 , pr_IsPublic(isPublic)
236 , pr_IsVirtual(isVirtual)
237 , pr_DeclaringType(declaringType)
238 , pr_PropertyTypeInfo(propertyTypeInfo)
239 , pr_Converter(converter)
240 , pr_Getter(getter)
241 , pr_Setter(setter)
242 , pr_IgnoreCondition(ignoreCondition)
243 , pr_HasJsonInclude(hasJsonInclude)
244 , pr_IsExtensionData(isExtensionData)
245 , pr_NumberHandling(numberHandling)
246 , pr_PropertyName(propertyName)
247 , pr_JsonPropertyName(jsonPropertyName)
248 {
249 }
250
251 JsonPropertyInfoValues() : pr_IsProperty(false), pr_IsPublic(false), pr_IsVirtual(false), pr_DeclaringType(nullptr)
252 , pr_PropertyTypeInfo(nullptr), pr_HasJsonInclude(false), pr_IsExtensionData(false), pr_PropertyName(nullptr)
253 {
254 }
255
256 void SetTemplateWeakPtr(uint32_t argument) override
257 {
258 ASPOSE_UNUSED(argument);
259 }
260
261protected:
262
263 #ifdef ASPOSE_GET_SHARED_MEMBERS
264 void GetSharedMembers(System::Object::shared_members_type& result) const override
265 {
266 Object::GetSharedMembers(result);
267
268 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_DeclaringType", this->pr_DeclaringType);
269 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_PropertyTypeInfo", this->pr_PropertyTypeInfo);
270 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_Converter", this->pr_Converter);
271 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_Getter", this->pr_Getter);
272 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_Setter", this->pr_Setter);
273 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_IgnoreCondition", this->pr_IgnoreCondition);
274 result.Add("System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues::pr_NumberHandling", this->pr_NumberHandling);
275 }
276 #endif
277
278private:
279
280 bool pr_IsProperty;
281 bool pr_IsPublic;
282 bool pr_IsVirtual;
283 TypeInfo pr_DeclaringType;
284 System::SharedPtr<JsonTypeInfoBase> pr_PropertyTypeInfo;
286 Func<System::SharedPtr<Object>, T> pr_Getter;
288 GetterFn _fastGetter = nullptr;
289 SetterFn _fastSetter = nullptr;
290 Nullable<JsonIgnoreCondition> pr_IgnoreCondition;
291 bool pr_HasJsonInclude;
292 bool pr_IsExtensionData;
293 Nullable<JsonNumberHandling> pr_NumberHandling;
294 String pr_PropertyName;
295 String pr_JsonPropertyName;
296};
297
298} // namespace Metadata
299} // namespace Serialization
300} // namespace Json
301} // namespace Text
302} // namespace System
Function delegate. This type should be allocated on stack and passed to functions by value or by refe...
Definition: func.h:82
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
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
Definition: json_property_info_values_of_t.h:45
System::SharedPtr< JsonConverterBase > get_Converter()
Definition: json_property_info_values_of_t.h:106
String get_JsonPropertyName()
Definition: json_property_info_values_of_t.h:209
void init_PropertyName(String value)
Definition: json_property_info_values_of_t.h:204
T(*)(System::SharedPtr< Object >) GetterFn
Definition: json_property_info_values_of_t.h:116
bool get_HasJsonInclude()
Definition: json_property_info_values_of_t.h:169
bool get_IsPublic()
Definition: json_property_info_values_of_t.h:66
void init_GetterFast(GetterFn value)
Definition: json_property_info_values_of_t.h:129
Nullable< JsonNumberHandling > get_NumberHandling()
Definition: json_property_info_values_of_t.h:189
JsonPropertyInfoValues()
Definition: json_property_info_values_of_t.h:251
bool get_IsVirtual()
Definition: json_property_info_values_of_t.h:76
void init_PropertyTypeInfo(System::SharedPtr< JsonTypeInfoBase > value)
Definition: json_property_info_values_of_t.h:101
void init_Converter(System::SharedPtr< JsonConverterBase > value)
Definition: json_property_info_values_of_t.h:111
void init_Setter(Action< System::SharedPtr< Object >, T > value)
Definition: json_property_info_values_of_t.h:144
SetterFn get_FastSetter() const
Definition: json_property_info_values_of_t.h:154
void init_HasJsonInclude(bool value)
Definition: json_property_info_values_of_t.h:174
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_property_info_values_of_t.h:256
void init_DeclaringType(TypeInfo value)
Definition: json_property_info_values_of_t.h:91
GetterFn get_FastGetter() const
Definition: json_property_info_values_of_t.h:134
TypeInfo get_DeclaringType()
Definition: json_property_info_values_of_t.h:86
bool get_IsProperty()
Definition: json_property_info_values_of_t.h:56
String get_PropertyName()
Definition: json_property_info_values_of_t.h:199
void init_IsProperty(bool value)
Definition: json_property_info_values_of_t.h:61
void init_Getter(Func< System::SharedPtr< Object >, T > value)
Definition: json_property_info_values_of_t.h:124
void init_IgnoreCondition(Nullable< JsonIgnoreCondition > value)
Definition: json_property_info_values_of_t.h:164
System::SharedPtr< JsonTypeInfoBase > get_PropertyTypeInfo()
Definition: json_property_info_values_of_t.h:96
void init_IsPublic(bool value)
Definition: json_property_info_values_of_t.h:71
Action< System::SharedPtr< Object >, T > get_Setter()
Definition: json_property_info_values_of_t.h:139
void init_JsonPropertyName(String value)
Definition: json_property_info_values_of_t.h:214
JsonPropertyInfoValues(bool isProperty, bool isPublic, bool isVirtual, TypeInfo declaringType, System::SharedPtr< JsonTypeInfoBase > propertyTypeInfo, System::SharedPtr< JsonConverterBase > converter, Func< System::SharedPtr< Object >, T > getter, Action< System::SharedPtr< Object >, T > setter, Nullable< JsonIgnoreCondition > ignoreCondition, bool hasJsonInclude, bool isExtensionData, Nullable< JsonNumberHandling > numberHandling, String propertyName, String jsonPropertyName)
Definition: json_property_info_values_of_t.h:219
void init_IsVirtual(bool value)
Definition: json_property_info_values_of_t.h:81
bool get_IsExtensionData()
Definition: json_property_info_values_of_t.h:179
Nullable< JsonIgnoreCondition > get_IgnoreCondition()
Definition: json_property_info_values_of_t.h:159
void(*)(System::SharedPtr< Object >, T) SetterFn
Definition: json_property_info_values_of_t.h:117
void init_NumberHandling(Nullable< JsonNumberHandling > value)
Definition: json_property_info_values_of_t.h:194
void init_SetterFast(SetterFn value)
Definition: json_property_info_values_of_t.h:149
Func< System::SharedPtr< Object >, T > get_Getter()
Definition: json_property_info_values_of_t.h:119
void init_IsExtensionData(bool value)
Definition: json_property_info_values_of_t.h:184
Represents a particular type and provides information about it.
Definition: type_info.h:109
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9
MulticastDelegate< void(Args...)> Action
Delegate type that references methods that have no return value.
Definition: action.h:40