|
60 | 60 | //////////////////////////////////////// |
61 | 61 | %nspace la::networkInterface::IPAddress; |
62 | 62 | %ignore la::networkInterface::IPAddress::IPAddress(IPAddress&&); // Ignore move constructor |
| 63 | +%ignore la::networkInterface::IPAddress::operator=(IPAddress const&); // Ignore copy assignment operator |
| 64 | +%ignore la::networkInterface::IPAddress::operator=(IPAddress&&); // Ignore move assignment operator |
63 | 65 | %ignore la::networkInterface::IPAddress::operator bool; // Ignore bool operator (equivalent to isValid) |
64 | 66 | %ignore la::networkInterface::IPAddress::operator value_type_v4; // Ignore value_type_v4 operator (equivalent to getIPV4) |
65 | 67 | %ignore la::networkInterface::IPAddress::operator value_type_v6; // Ignore value_type_v6 operator (equivalent to getIPV6) |
|
70 | 72 | %ignore la::networkInterface::IPAddress::hash; // Ignore hash (not needed) |
71 | 73 | %rename("toString") la::networkInterface::IPAddress::operator std::string; |
72 | 74 | %typemap(csattributes) la::networkInterface::IPAddress "[System.Diagnostics.DebuggerDisplay(\"{toString()}\")]" // Better debug display |
| 75 | +%ignore operator==(IPAddress const& lhs, IPAddress const& rhs); // Redefined in %extend |
| 76 | +%ignore operator!=(IPAddress const& lhs, IPAddress const& rhs); // Ignored |
| 77 | +%ignore operator<(IPAddress const& lhs, IPAddress const& rhs); // Ignored |
| 78 | +%ignore operator<=(IPAddress const& lhs, IPAddress const& rhs); // Ignored |
| 79 | +%ignore operator+(IPAddress const& lhs, std::uint32_t const value); // Ignored |
| 80 | +%ignore operator-(IPAddress const& lhs, std::uint32_t const value); // Ignored |
73 | 81 | %ignore operator++(IPAddress& lhs); // Redefined in %extend |
74 | 82 | %ignore operator--(IPAddress& lhs); // Redefined in %extend |
75 | 83 | %ignore operator&(IPAddress const& lhs, IPAddress const& rhs); // Redefined in %extend |
|
126 | 134 | // IPAddressInfo |
127 | 135 | //////////////////////////////////////// |
128 | 136 | %nspace la::networkInterface::IPAddressInfo; |
| 137 | +%ignore operator==(IPAddressInfo const& lhs, IPAddressInfo const& rhs); // Ignored |
| 138 | +%ignore operator!=(IPAddressInfo const& lhs, IPAddressInfo const& rhs); // Ignored |
| 139 | +%ignore operator<(IPAddressInfo const& lhs, IPAddressInfo const& rhs); // Ignored |
| 140 | +%ignore operator<=(IPAddressInfo const& lhs, IPAddressInfo const& rhs); // Ignored |
129 | 141 |
|
130 | 142 | //////////////////////////////////////// |
131 | 143 | // Interface |
132 | 144 | //////////////////////////////////////// |
133 | 145 | %nspace la::networkInterface::Interface; |
| 146 | +%ignore operator==(Interface const& lhs, Interface const& rhs); // Redefined in %extend |
| 147 | +%ignore operator!=(Interface const& lhs, Interface const& rhs); // Ignored |
134 | 148 | // Extend the struct |
135 | 149 | %extend la::networkInterface::Interface |
136 | 150 | { |
|
148 | 162 | // Provide a more native Equals() method |
149 | 163 | bool Equals(la::networkInterface::Interface const& other) const noexcept |
150 | 164 | { |
151 | | - return $self->id == other.id && $self->description == other.description && $self->alias == other.alias && $self->macAddress == other.macAddress && $self->ipAddressInfos == other.ipAddressInfos && $self->gateways == other.gateways && $self->type == other.type && $self->isEnabled == other.isEnabled && $self->isConnected == other.isConnected && $self->isVirtual == other.isVirtual; |
| 165 | + return *$self == other; |
152 | 166 | } |
153 | 167 | #endif |
154 | 168 | }; |
|
0 commit comments