INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Set of sockets used with `select%' operation. Identical to `FD_SET%' structure."
project: "Visual Eiffel Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: sockets
class ESL_SOCKETS_SET
inherit

ESL_SOCKETS_CONST
redefine
copy,
is_equal
end
creation

make
feature -- Creation

make
ensure
well_done: (socket_storage /= void) and then (socket_storage.count = fd_setsize) and then (raw_storage /= void) and then (raw_storage.count = fd_setsize + 1)
feature -- Operations

add (socket: ESL_SOCKET)
-- Add `socket' to set
require
valid_entry: (socket /= void) and then socket.is_valid

remove (socket: ESL_SOCKET)
-- Remove `socket' from set
require
valid_entry: socket /= void

clear
-- Clear the set
ensure
well_done: is_empty
feature -- Queries

count: INTEGER

is_empty: BOOLEAN

has (socket: ESL_SOCKET): BOOLEAN
-- Is `socket' contained in the set?
require
valid_entry: socket /= void
feature -- Duplication

copy (other: like Current)
-- Update current object using fields of object attached
-- to 'other', so as to yield equal objects
feature -- Comparison

is_equal (other: like Current): BOOLEAN
-- Is 'other' attached to an object considered equal
-- to current object?
invariant

proper_count: (count >= 0) and (count <= fd_setsize)
end -- class ESL_SOCKETS_SET

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES