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

em.network.multiplayer

Class EM_NET_OBJECT_TYPES


Known direct descendants

EM_NET_PROTOCOL, EM_NET_GROUP

Creation

Features

Invariants

indexing

description

Type manager for all network objects and events.

This manager registers all predefined network objects and events.

If you want create your own network objects, you need to subclass this class and redefine
the empty register feature. Look at the make_and_initialize_factory creation procedure
for a sample of how to register object types.
Afterwards, you've to instanciate the subclass(es) of EM_NET_BASE with your new EM_NET_OBJECT_TYPES as
generic parameter.

Every type ID must be unique. Type IDs between 0 and 99 are predefined and must not be used.
Use type ID's starting from 100 upwards for your own objects. These boundaries are set in the
EM_NET_OBJECT_FACTORY trough lowest_system_id and highest_system_id.

date

$Date: 2005/10/26 15:18:48 $

revision

$Revision: 1.28 $

class

EM_NET_OBJECT_TYPES

create

make_and_initialize_factory (an_object_factory: EM_NET_OBJECT_FACTORY)

-- Register system object creation procedures in an_object_factory.

ensure
factory_initialized: net_object_factory.is_initialized

feature -- Registration

register

-- Register user object creation procedures.
-- Redefine this feature to add user objects and events.

feature -- EM_NET_EVENT_CONTAINER_OBJECT

create_em_net_event_container_object: EM_NET_EVENT_CONTAINER_OBJECT

-- return an instance of the class EM_NET_EVENT_OBJECT

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_TIME_OBJECT

create_em_net_time_object: EM_NET_TIME_OBJECT

-- return an instance of the class EM_NET_EVENT_OBJECT

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_STATUS_REQUEST

em_net_status_request: INTEGER

-- If you change this value, you need to change the binary string in
-- "resources/tools/highscore_server/serverstatus.php" accordingly

create_em_net_status_request: EM_NET_STATUS_REQUEST

-- return an instance of the class EM_NET_STATUS_REQUEST

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_STATUS_MESSAGE

create_em_net_status_message: EM_NET_STATUS_MESSAGE

-- return an instance of the class EM_NET_STATUS_REQUEST

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_TIME_SYNC_REQUEST

create_em_net_time_sync_request: EM_NET_TIME_SYNC_REQUEST

-- return an instance of the class EM_NET_TIME_SYNC_REQUEST

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_TIME_SYNC_RESPONSE

create_em_net_time_sync_response: EM_NET_TIME_SYNC_RESPONSE

-- return an instance of the class EM_NET_TIME_SYNC_RESPONSE

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_SERVER_DISCOVERY_RESPONSE

create_em_net_server_discovery_response: EM_NET_SERVER_DISCOVERY_RESPONSE

-- return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_SERVER_DISCOVERY

create_em_net_server_discovery: EM_NET_SERVER_DISCOVERY

-- return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_2PC_ACK

em_net_2pc_ack: INTEGER
create_em_net_2pc_ack: EM_NET_2PC_ACK

-- Return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_JOIN_REQUEST

create_em_net_join_request: EM_NET_JOIN_REQUEST

-- return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_JOIN_RESPONSE

create_em_net_join_response: EM_NET_JOIN_RESPONSE

-- return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_CREATE_OBJECT_REQUEST

create_em_net_create_object_request: EM_NET_CREATE_OBJECT_REQUEST

-- Return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_CREATE_OBJECT_RESPONSE

create_em_net_create_object_response: EM_NET_CREATE_OBJECT_RESPONSE

-- Return an intance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_DESTROY_OBJECT_REQUEST

create_em_net_destroy_object_request: EM_NET_DESTROY_OBJECT_REQUEST

-- Return an instance of the class

ensure
an_object_has_been_generated: Result /= Void

feature -- EM_NET_DESTROY_OBJECT_RESPONSE

create_em_net_destroy_object_response: EM_NET_DESTROY_OBJECT_RESPONSE

-- Return an intance of the class

ensure
an_object_has_been_generated: Result /= Void
create_em_net_leave_event: EM_NET_LEAVE_EVENT

-- Return an intance of the class

ensure
an_object_has_been_generated: Result /= Void

feature {EM_NET_OBJECT_TYPES} -- Implementation

invariant

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

end