CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_encoded_text.h
1#pragma once
2
3#include <system/iequatable.h>
4#include <system/array.h>
5#include <cstdint>
6
7namespace System
8{
9template <typename> class ReadOnlySpan;
10namespace Text
11{
12namespace Encodings
13{
14namespace Web
15{
16class JavaScriptEncoder;
17} // namespace Web
18} // namespace Encodings
19} // namespace Text
20} // namespace System
21
22namespace System {
23
24namespace Text {
25
26namespace Json {
27
28class ASPOSECPP_SHARED_CLASS JsonEncodedText : public IEquatable<JsonEncodedText>, public System::Details::BoxableObjectBase
29{
32
33 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
34 ASPOSECPP_SHARED_RTTI_INFO_DECL();
35
36public:
37
39
40public:
41
43 ASPOSECPP_SHARED_API String get_Value();
44
45 static ASPOSECPP_SHARED_API JsonEncodedText Encode(String value, System::SharedPtr<Encodings::Web::JavaScriptEncoder> encoder = nullptr);
48 ASPOSECPP_SHARED_API bool Equals(JsonEncodedText other) override;
49 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> obj) override;
50 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
51
52 ASPOSECPP_SHARED_API bool operator==(const JsonEncodedText& other) const;
53
54 ASPOSECPP_SHARED_API bool operator!=(const JsonEncodedText& other) const;
55
56 ASPOSECPP_SHARED_API JsonEncodedText();
57
58 ASPOSECPP_SHARED_API String ToString() const override;
59
60protected:
61
64
65 #ifdef ASPOSE_GET_SHARED_MEMBERS
66 void GetSharedMembers(System::Object::shared_members_type& result) const override;
67 #endif
68
69private:
70
72
73 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(JsonEncodedText, CODEPORTING_ARGS(System::SharedPtr<Array<uint8_t>> utf8Value));
74
77 String ToString_NonConst();
78
79};
80
81} // namespace Json
82} // namespace Text
83} // namespace System
Class that represents an array data structure. Objects of this class should only be allocated using S...
Definition: array.h:296
Defines a method that determines the equality of two objects. Objects of this class should only be al...
Definition: iequatable.h:18
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_encoded_text.h:29
static JsonEncodedText Encode(String value, System::SharedPtr< Encodings::Web::JavaScriptEncoder > encoder=nullptr)
bool Equals(System::SharedPtr< Object > obj) override
ReadOnlySpan< uint8_t > get_EncodedUtf8Bytes()
bool operator==(const JsonEncodedText &other) const
bool Equals(JsonEncodedText other) override
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
bool operator!=(const JsonEncodedText &other) const
static JsonEncodedText Encode(ReadOnlySpan< char16_t > value, System::SharedPtr< Encodings::Web::JavaScriptEncoder > encoder=nullptr)
System::SharedPtr< Array< uint8_t > > _utf8Value
Definition: json_encoded_text.h:62
String _value
Definition: json_encoded_text.h:63
static JsonEncodedText Encode(ReadOnlySpan< uint8_t > utf8Value, System::SharedPtr< Encodings::Web::JavaScriptEncoder > encoder=nullptr)
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9