note description : "Generic class for actors" author : "Martino Trosi & Matteo Cortonesi" date : "Spring 2009" reviewer : "Mohammad Seyed Alavi" revision : "1.0.1" deferred class ACTOR inherit SHARED_RANDOM redefine out end feature {FANEUIL_HALL} -- Creation procedure make_with_hall (a_id: INTEGER; a_hall: separate HALL) -- Creation procedure. require a_id_positive: a_id > 0 a_hall_not_void: a_hall /= Void do id := a_id hall := a_hall create random.set_seed (a_id) ensure id_set: id = a_id hall_set: hall = a_hall end feature -- Access id: INTEGER -- Id of the actor out: STRING -- Printable representation once Result := type + "-" + id.out end feature {FANEUIL_HALL} -- Basic operations live -- Live. do from until over loop step end end feature {NONE} -- Implementation hall: separate HALL -- Faneuil Hall type: STRING -- Actor type deferred end over: BOOLEAN -- Is life over? step -- Do a process step. deferred end invariant id_positive: id > 0 end