diff --git a/1-base/lace/source/events/interface/lace-observer.ads b/1-base/lace/source/events/interface/lace-observer.ads index 4c9b8bf..d7d357b 100644 --- a/1-base/lace/source/events/interface/lace-observer.ads +++ b/1-base/lace/source/events/interface/lace-observer.ads @@ -49,7 +49,7 @@ is -- Operations -- - procedure receive (Self : access Item; the_Event : in Event.item'Class := event.null_Event; + procedure receive (Self : access Item; the_Event : in Event.item'Class; from_Subject : in event.subject_Name) is abstract; -- -- Accepts an Event from a Subject. diff --git a/1-base/lace/source/events/interface/lace-subject.ads b/1-base/lace/source/events/interface/lace-subject.ads index b10c119..f430d7a 100644 --- a/1-base/lace/source/events/interface/lace-subject.ads +++ b/1-base/lace/source/events/interface/lace-subject.ads @@ -61,11 +61,11 @@ is -- Emit -- - procedure emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event) is abstract; + procedure emit (Self : access Item; the_Event : in Event.item'Class) is abstract; -- -- Communication errors are ignored. - function emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event) + function emit (Self : access Item; the_Event : in Event.item'Class) return Observer_views is abstract; -- -- Observers who cannot be communicated with are returned. diff --git a/1-base/lace/source/events/lace-event.ads b/1-base/lace/source/events/lace-event.ads index 8ada8f1..6fc45c0 100644 --- a/1-base/lace/source/events/lace-event.ads +++ b/1-base/lace/source/events/lace-event.ads @@ -9,9 +9,7 @@ package lace.Event is pragma Pure; - type Item is tagged null record; - - null_Event : constant Event.item; + type Item is tagged private; subtype subject_Name is String; @@ -35,5 +33,13 @@ is private - null_Event : constant Event.item := (others => <>); + + type sequence_Id is range 0 .. 2**32 - 1; + + + type Item is tagged + record + s_Id : sequence_Id; + end record; + end lace.Event; diff --git a/1-base/lace/source/events/mixin/lace-make_observer.adb b/1-base/lace/source/events/mixin/lace-make_observer.adb index b6a99d5..22d89bf 100644 --- a/1-base/lace/source/events/mixin/lace-make_observer.adb +++ b/1-base/lace/source/events/mixin/lace-make_observer.adb @@ -63,7 +63,7 @@ is -- overriding - procedure receive (Self : access Item; the_Event : in Event.item'Class := Event.null_Event; + procedure receive (Self : access Item; the_Event : in Event.item'Class; from_Subject : in Event.subject_Name) is begin @@ -184,7 +184,7 @@ is -- procedure receive (Self : access Item'Class; - the_Event : in Event.item'Class := Event.null_Event; + the_Event : in Event.item'Class; from_Subject : in Event.subject_Name) is use event_response_Maps, diff --git a/1-base/lace/source/events/mixin/lace-make_observer.ads b/1-base/lace/source/events/mixin/lace-make_observer.ads index dfee279..4dad8f7 100644 --- a/1-base/lace/source/events/mixin/lace-make_observer.ads +++ b/1-base/lace/source/events/mixin/lace-make_observer.ads @@ -48,7 +48,7 @@ is -- overriding - procedure receive (Self : access Item; the_Event : in Event.item'Class := event.null_Event; + procedure receive (Self : access Item; the_Event : in Event.item'Class; from_Subject : in Event.subject_Name); overriding procedure respond (Self : access Item); @@ -120,7 +120,7 @@ private -- procedure receive (Self : access Item'Class; - the_Event : in Event.item'Class := Event.null_Event; + the_Event : in Event.item'Class; from_Subject : in Event.subject_Name); private diff --git a/1-base/lace/source/events/mixin/lace-make_subject.adb b/1-base/lace/source/events/mixin/lace-make_subject.adb index 2105a41..4501e23 100644 --- a/1-base/lace/source/events/mixin/lace-make_subject.adb +++ b/1-base/lace/source/events/mixin/lace-make_subject.adb @@ -102,7 +102,7 @@ is overriding - procedure emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event) + procedure emit (Self : access Item; the_Event : in Event.item'Class) is begin if Self.Emitter = null @@ -145,7 +145,7 @@ is overriding - function emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event) + function emit (Self : access Item; the_Event : in Event.item'Class) return subject.Observer_views is use lace.Event.utility; diff --git a/1-base/lace/source/events/mixin/lace-make_subject.ads b/1-base/lace/source/events/mixin/lace-make_subject.ads index 7418f02..a5243ae 100644 --- a/1-base/lace/source/events/mixin/lace-make_subject.ads +++ b/1-base/lace/source/events/mixin/lace-make_subject.ads @@ -59,10 +59,10 @@ is -- overriding - procedure emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event); -- TODO: Rid default. + procedure emit (Self : access Item; the_Event : in Event.item'Class); overriding - function emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event) -- TODO: Rid default. + function emit (Self : access Item; the_Event : in Event.item'Class) return subject.Observer_views; overriding @@ -109,8 +109,8 @@ private - ----------------- - -- Safe observers + ------------------ + -- Safe observers. -- protected type safe_Observers @@ -132,10 +132,9 @@ private - --------------- - -- Subject Item + ---------------- + -- Subject Item. -- - type event_Emitter_view is access all event_Emitter.item'Class; type event_Sender_view is access all event_Sender .item'Class; diff --git a/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.adb b/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.adb index 8fee071..e95ed47 100644 --- a/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.adb +++ b/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.adb @@ -23,7 +23,7 @@ is -- overriding - procedure receive (Self : access Item; the_Event : in Event.item'Class := Event.null_Event; + procedure receive (Self : access Item; the_Event : in Event.item'Class; from_Subject : in Event.subject_Name) is begin diff --git a/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.ads b/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.ads index 4b755fd..07aa98a 100644 --- a/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.ads +++ b/1-base/lace/source/events/mixin/xgc/lace-make_observer-deferred.ads @@ -31,7 +31,7 @@ is -- overriding - procedure receive (Self : access Item; the_Event : in Event.item'Class := Event.null_Event; + procedure receive (Self : access Item; the_Event : in Event.item'Class; from_Subject : in Event.subject_Name); overriding procedure respond (Self : access Item);