Index: src/natools-s_expressions-generic_caches.adb ================================================================== --- src/natools-s_expressions-generic_caches.adb +++ src/natools-s_expressions-generic_caches.adb @@ -420,6 +420,12 @@ Object.Locked := Object.Absolute_Level < Lockable.Current_Level (Object.Stack); end Unlock; + + overriding function Duplicate (Object : Cursor) return Cursor is + begin + return Object; + end Duplicate; + end Natools.S_Expressions.Generic_Caches; Index: src/natools-s_expressions-generic_caches.ads ================================================================== --- src/natools-s_expressions-generic_caches.ads +++ src/natools-s_expressions-generic_caches.ads @@ -28,10 +28,11 @@ with System.Storage_Pools; with Natools.S_Expressions.Lockable; with Natools.S_Expressions.Printers; +with Natools.S_Expressions.Replayable; private with Ada.Finalization; private with Ada.Unchecked_Deallocation; private with Natools.References; @@ -53,11 +54,12 @@ function Duplicate (Cache : Reference) return Reference; -- Create a new copy of the S-expression held in Cache and return it - type Cursor is new Lockable.Descriptor with private; + type Cursor is new Lockable.Descriptor and Replayable.Descriptor + with private; pragma Preelaborable_Initialization (Cursor); overriding function Current_Event (Object : in Cursor) return Events.Event; overriding function Current_Atom (Object : in Cursor) return Atom; overriding function Current_Level (Object : in Cursor) return Natural; @@ -77,10 +79,12 @@ State : out Lockable.Lock_State); overriding procedure Unlock (Object : in out Cursor; State : in out Lockable.Lock_State; Finish : in Boolean := True); + + overriding function Duplicate (Object : Cursor) return Cursor; function First (Cache : Reference'Class) return Cursor; -- Create a new Cursor pointing at the beginning of Cache private @@ -141,11 +145,11 @@ type Reference is new Printers.Printer with record Exp : Trees.Reference; end record; - type Cursor is new Lockable.Descriptor with record + type Cursor is new Lockable.Descriptor and Replayable.Descriptor with record Exp : Trees.Reference; Position : Node_Access := null; Opening : Boolean := False; Stack : Lockable.Lock_Stack; Locked : Boolean := False;