+
Point of view
All features
class C_GARBAGE_COLLECTOR_TAG
Summary
Direct parents
Inherit list: TYPED_TAGGED_DATA
Insert list: COMPARABLE, HASHABLE
Class invariant
Overview
Creation features
{GC_HANDLER}
Features
{ANY}
{GC_HANDLER}
{}
{ANY}
  • infix "<=" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
    Is Current less than or equal other?
  • infix ">" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
    Is Current strictly greater than other?
  • infix ">=" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
    Is Current greater than or equal than other?
  • in_range (lower: C_GARBAGE_COLLECTOR_TAG, upper: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • compare (other: C_GARBAGE_COLLECTOR_TAG): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • three_way_comparison (other: C_GARBAGE_COLLECTOR_TAG): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • min (other: C_GARBAGE_COLLECTOR_TAG): C_GARBAGE_COLLECTOR_TAG
    Minimum of Current and other.
  • max (other: C_GARBAGE_COLLECTOR_TAG): C_GARBAGE_COLLECTOR_TAG
    Maximum of Current and other.
  • bounded_by (a_min: C_GARBAGE_COLLECTOR_TAG, a_max: C_GARBAGE_COLLECTOR_TAG): C_GARBAGE_COLLECTOR_TAG
    A value that is equal to Current if it is between the limits set by a_min and a_max.
hash_code: INTEGER_32
effective function
{ANY}
The hash-code value of Current.
ensure
  • good_hash_value: Result >= 0
is_equal (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
require
    • other /= Void
    • other /= Void
ensure
  • not Result implies tag /= other.tag and id /= other.id
  • Result implies tag = other.tag and id = 0 or other.id = 0 or id = other.id
  • Result implies hash_code = other.hash_code
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
  • trichotomy: Result = not Current < other and not other < Current
infix "<" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
effective function
{ANY}
Is Current strictly less than other?
See also >, <=, >=, min, max.
require
  • other_exists: other /= Void
ensure
  • asymmetric: Result implies not other < Current
writable attribute
{ANY}
writable attribute
{ANY}
count: INTEGER_32
writable attribute
{ANY}
item: INTEGER_32
effective function
{ANY}
set (a_tag: HASHED_STRING)
effective procedure
require
  • is_special: id = 0
ensure
increment
effective procedure
require
  • is_not_special: id > 0
ensure
make (a_tag: HASHED_STRING)
effective procedure
{}
require
  • a_tag /= Void
ensure
special
effective procedure
{}
id_provider: COUNTER
once function
{}
infix "<=" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
effective function
{ANY}
Is Current less than or equal other?
See also >=, <, >, min, max.
require
  • other_exists: other /= Void
ensure
  • definition: Result = Current < other or is_equal(other)
infix ">" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
effective function
{ANY}
Is Current strictly greater than other?
See also <, >=, <=, min, max.
require
  • other_exists: other /= Void
ensure
  • definition: Result = other < Current
infix ">=" (other: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
effective function
{ANY}
Is Current greater than or equal than other?
See also <=, >, <, min, max.
require
  • other_exists: other /= Void
ensure
  • definition: Result = other <= Current
in_range (lower: C_GARBAGE_COLLECTOR_TAG, upper: C_GARBAGE_COLLECTOR_TAG): BOOLEAN
effective function
{ANY}
Return True if Current is in range [lower..upper]
See also min, max, compare.
ensure
  • Result = Current >= lower and Current <= upper
compare (other: C_GARBAGE_COLLECTOR_TAG): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
See also min, max, in_range.
require
  • other_exists: other /= Void
ensure
  • equal_zero: Result = 0 = is_equal(other)
  • smaller_negative: Result = -1 = Current < other
  • greater_positive: Result = 1 = Current > other
three_way_comparison (other: C_GARBAGE_COLLECTOR_TAG): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
See also min, max, in_range.
require
  • other_exists: other /= Void
ensure
  • equal_zero: Result = 0 = is_equal(other)
  • smaller_negative: Result = -1 = Current < other
  • greater_positive: Result = 1 = Current > other
min (other: C_GARBAGE_COLLECTOR_TAG): C_GARBAGE_COLLECTOR_TAG
effective function
{ANY}
Minimum of Current and other.
See also max, in_range.
require
  • other /= Void
ensure
  • Result <= Current and then Result <= other
  • compare(Result) = 0 or else other.compare(Result) = 0
max (other: C_GARBAGE_COLLECTOR_TAG): C_GARBAGE_COLLECTOR_TAG
effective function
{ANY}
Maximum of Current and other.
See also min, in_range.
require
  • other /= Void
ensure
  • Result >= Current and then Result >= other
  • compare(Result) = 0 or else other.compare(Result) = 0
bounded_by (a_min: C_GARBAGE_COLLECTOR_TAG, a_max: C_GARBAGE_COLLECTOR_TAG): C_GARBAGE_COLLECTOR_TAG
effective function
{ANY}
A value that is equal to Current if it is between the limits set by a_min and a_max.
Otherwise it's a_min if Current is smaller or a_max if Current is greater It's a shortcut for Current.min(a_max).max(a_min) also known as "clamp" in the widespread C library Glib
ensure
  • correctness: Result.in_range(a_min, a_max)