class IP_ADDRESS

All features

The host represented by its address. Currently only IPv4 is supported.

Direct parents

conformant parents

ADDRESS

Summary

creation features

exported features

Details

make (ip_a: INTEGER, ip_b: INTEGER, ip_c: INTEGER, ip_d: INTEGER)

require

  • ip_a.in_range(0, 255)
  • ip_b.in_range(0, 255)
  • ip_c.in_range(0, 255)
  • ip_d.in_range(0, 255)

a: INTEGER
b: INTEGER
c: INTEGER
d: INTEGER

The four parts of an IP address. Example: 192.168.0.1 will be represented:

  a = 192
  b = 168
  c = 0
  d = 1

hash_code: INTEGER

The hash-code value of Current.

ensure

  • good_hash_value: Result >= 0

ip: IP_ADDRESS

The resolved address

ensure

  • conservative: Result = ip

out: STRING

Create a new string containing terse printable representation of current object.

make (ip_a: INTEGER, ip_b: INTEGER, ip_c: INTEGER, ip_d: INTEGER)

require

  • ip_a.in_range(0, 255)
  • ip_b.in_range(0, 255)
  • ip_c.in_range(0, 255)
  • ip_d.in_range(0, 255)

deferred is_equal (other: IP_ADDRESS): BOOLEAN

Is other attached to an object considered equal to current object ?

require

  • other /= Void

ensure

  • Result implies hash_code = other.hash_code
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)