Class DS_LINKABLE PreviousNext

note
description:

    "Linkable cells with a reference to their right neighbor"

library:    "Gobo Eiffel Structure Library"
author:     "Eric Bezault <ericb@gobosoft.com>"
copyright:  "Copyright (c) 1999, Eric Bezault and others"
license:    "MIT License"
class interface
DS_LINKABLE [G]
inherit
DS_CELL [G]
create
make (v: G)
        -- Insert v in cell.
        -- (From DS_CELL.)
    ensure
        inserted: item = v
feature -- Access
item: G
        -- Content of cell
        -- (From DS_CELL.)
right: like Current
        -- Right neighbor
feature -- Element change
put, make (v: G)
        -- Insert v in cell.
        -- (From DS_CELL.)
    ensure
        inserted: item = v
put_right (other: like Current)
        -- Put other to right of cell.
    require
        other_not_void: other /= Void
    ensure
        linked: right = other
forget_right
        -- Remove right neighbor.
    ensure
        forgotten: right = Void
end -- class DS_LINKABLE

Copyright © 1999, Eric Bezault
mailto:
ericb@gobosoft.com
http:
//www.gobosoft.com
Last Updated: 8 August 1999

HomeTocPreviousNext