CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
socket_address.h
1
2#pragma once
3
4#include <system/string.h>
5#include <system/shared_ptr.h>
6#include <system/object.h>
7#include <cstdint>
8
9#include <net/sockets/address_family.h>
10
11namespace System {
12namespace Net {
13
18class ASPOSECPP_SHARED_CLASS SocketAddress : public System::Object
19{
21 typedef SocketAddress ThisType;
24
26 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
28 ASPOSECPP_SHARED_RTTI_INFO_DECL();
29
30public:
33 ASPOSECPP_SHARED_API Sockets::AddressFamily get_Family();
36 ASPOSECPP_SHARED_API int32_t get_Size();
37
41 ASPOSECPP_SHARED_API uint8_t idx_get(int32_t offset);
45 ASPOSECPP_SHARED_API void idx_set(int32_t offset, uint8_t value);
46
49 ASPOSECPP_SHARED_API SocketAddress(Sockets::AddressFamily family);
53 ASPOSECPP_SHARED_API SocketAddress(Sockets::AddressFamily family, int32_t size);
54
58 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> comparand) override;
60 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
62 ASPOSECPP_SHARED_API String ToString() const override;
63};
64} // namespace Net
65} // namespace System
Used to store serialized information about the EndPoint class instances. Objects of this class should...
Definition: socket_address.h:19
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
void idx_set(int32_t offset, uint8_t value)
Sets a value of the underlying buffer at the specified index.
bool Equals(System::SharedPtr< Object > comparand) override
Compares objects using C# Object.Equals semantics.
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
uint8_t idx_get(int32_t offset)
Gets a value of the underlying buffer at the specified index.
Sockets::AddressFamily get_Family()
Returns the address family.
int32_t get_Size()
Returns the underlying buffer size.
SocketAddress(Sockets::AddressFamily family)
Constructs a new instance.
SocketAddress(Sockets::AddressFamily family, int32_t size)
Constructs a new instance.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
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:122
AddressFamily
Enumerates the address families.
Definition: address_family.h:12
Definition: db_command.h:9