Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em

Class EM_JOYSTICK_SUBSYSTEM


Direct ancestors

EM_SUBSYSTEM, SDL_JOYSTICK_FUNCTIONS_EXTERNAL

Creation

Features

Invariants

indexing

description

Singleton representing the Joystick subsystem.
Use EM_SHARED_SUBSYSTEMS to access this class.

date

$Date: 2005/10/23 08:56:58 $

revision

$Revision: 1.6 $

class

EM_JOYSTICK_SUBSYSTEM

inherit

EM_SUBSYSTEM

create {EM_SHARED_SUBSYSTEMS}

make
ensure
not_enabled: not is_enabled

feature -- Status report

is_enabled: BOOLEAN

-- Is the joystick subsystem enabled?

-- (From EM_SUBSYSTEM)

feature -- Subsysten management

disable

-- Disable EiffelMedia Joystick subsystem.

-- (From EM_SUBSYSTEM)

require
enabled: is_enabled
ensure then
no_active_devices: devices.count = 0
enable

-- Enable EiffelMedia Joystick subsystem.

-- (From EM_SUBSYSTEM)

require
not_enabled: not is_enabled

feature {EM_JOYSTICK} -- device administration

devices: LINKED_LIST [EM_JOYSTICK]

-- list of all active devices

register_device (a_device: EM_JOYSTICK)

-- register a new device handler

require
not_already_registered: not devices.has (a_device)
ensure
registration_success: devices.has (a_device)
unregister_device (a_device: EM_JOYSTICK)

-- unregister a device handler

require
device_registered: devices.has (a_device)
ensure
unregistration_success: not devices.has (a_device)

feature -- Subsystem management

base_disable

-- Disable basic systems.

-- (From EM_SUBSYSTEM)

base_enable

-- Enable basic systems.

-- (From EM_SUBSYSTEM)

enabled_subsystem_count: DS_CELL [INTEGER]

-- Count of enabled subsystems

-- (From EM_SUBSYSTEM)

feature -- joystick subsystem

count: INTEGER

-- joystick device count

name (a_device: INTEGER): STRING

-- return the joystick device identifier of device a_device
-- this argument is system dependent

require
subsystem_ebabled: is_enabled
name_list: DS_LINKED_LIST [STRING]

-- return a list of all device names

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end