indexing
description: "Abstraction for objects whos position can be set."
status: "See notice at end of class"
keywords: "position, width, height"
date: "$Date$"
revision: "$Revision$"
deferred class interface
EV_POSITIONABLE
feature
data: ANY
EV_ANY
feature
height: INTEGER
minimum_height
EV_POSITIONED
require EV_POSITIONED
not_destroyed: not is_destroyed
ensure EV_POSITIONED
bridge_ok: Result = implementation.height
minimum_height: INTEGER
height
EV_POSITIONED
require EV_POSITIONED
not_destroyed: not is_destroyed
ensure EV_POSITIONED
bridge_ok: Result = implementation.minimum_height
positive_or_zero: Result >= 0
minimum_width: INTEGER
width
EV_POSITIONED
require EV_POSITIONED
not_destroyed: not is_destroyed
ensure EV_POSITIONED
bridge_ok: Result = implementation.minimum_width
positive_or_zero: Result >= 0
width: INTEGER
minimum_width
EV_POSITIONED
require EV_POSITIONED
not_destroyed: not is_destroyed
ensure EV_POSITIONED
bridge_ok: Result = implementation.width
x_position: INTEGER
x_position
EV_POSITIONED
require EV_POSITIONED
not_destroyed: not is_destroyed
ensure EV_POSITIONED
bridge_ok: Result = implementation.x_position
y_position: INTEGER
y_position
EV_POSITIONED
require EV_POSITIONED
not_destroyed: not is_destroyed
ensure EV_POSITIONED
bridge_ok: Result = implementation.y_position
feature
set_height (a_height: INTEGER)
a_heightheight
require
a_height_positive_or_zero: a_height >= 0
ensure
height_assigned: height = minimum_height or else height = a_height
set_position (a_x, a_y: INTEGER)
a_xx_positiona_yy_position
ensure
x_position_assigned: x_position = a_x
y_position_assigned: y_position = a_y
set_size (a_width, a_height: INTEGER)
a_widthwidtha_heightheight
require
a_width_positive_or_zero: a_width >= 0
a_height_positive_or_zero: a_height >= 0
ensure
width_assigned: width = minimum_width or else width = a_width
height_assigned: height = minimum_height or else height = a_height
set_width (a_width: INTEGER)
a_widthwidth
require
a_width_positive_or_zero: a_width >= 0
ensure
width_assigned: width = minimum_width or else width = a_width
set_x_position (a_x: INTEGER)
a_xx_position
ensure
x_position_assigned: x_position = a_x
set_y_position (a_y: INTEGER)
a_yy_position
ensure
y_position_assigned: y_position = a_y
feature
set_data (some_data: like data)
some_datadata
EV_ANY
require EV_ANY
not_destroyed: not is_destroyed
ensure EV_ANY
data_assigned: data = some_data
feature
copy (other: like Current)
other
EV_ANY
require ANY
other_not_void: other /= void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
feature
destroy
Current
EV_ANY
ensure EV_ANY
is_destroyed: is_destroyed
feature
is_destroyed: BOOLEAN
Current
EV_ANY
ensure EV_ANY
bridge_ok: Result = implementation.is_destroyed
invariant
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
EV_POSITIONED
width_not_negative: is_usable implies width >= 0
height_not_negative: is_usable implies height >= 0
minimum_width_not_negative: is_usable implies minimum_width >= 0
minimum_height_not_negative: is_usable implies minimum_height >= 0
EV_ANY
is_initialized: is_initialized
is_coupled: implementation /= void and then implementation.interface = Current
default_create_called: default_create_called
end -- EV_POSITIONABLE