comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: set_index and and end_of_file with just a stream reference
Date: Sat, 20 Feb 2021 07:26:16 -0800 (PST)	[thread overview]
Message-ID: <4d2daa8c-c159-48a4-bdf7-e9aa3b537bcan@googlegroups.com> (raw)

In term of design, I have a file inside a protected type, to ensure validity for concurrrent readings/writings.
An entry guarded by "Is_Open" provide with an "out" stream_access, a means to read/write from the stream file.
But in the procedure I wish to also use End_Of_File and Set_Index, which require a File_Type. Which cannot be passed as "out" parameter nor through an access type, since stream_access is not an access type.
Unguarded protected functions would go against the design.
Should have I have the protected object provides both in the form of entries, the first with something like Is_End_Of_File: boolean := object.End_Of_File ?

             reply	other threads:[~2021-02-20 15:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 15:26 Mehdi Saada [this message]
2021-02-20 15:35 ` set_index and and end_of_file with just a stream reference Mehdi Saada
2021-02-20 16:01   ` Simon Wright
2021-02-20 16:04 ` Dmitry A. Kazakov
2021-02-20 16:22   ` Mehdi Saada
2021-02-20 16:30     ` Mehdi Saada
2021-02-20 17:59       ` Dmitry A. Kazakov
2021-02-20 19:08         ` Mehdi Saada
2021-02-20 21:41           ` Simon Wright
2021-02-21  0:22           ` Dmitry A. Kazakov
2021-02-23 17:21           ` Shark8
2021-02-23 17:56           ` J-P. Rosen
2021-02-20 17:52     ` Dmitry A. Kazakov
2021-02-21  1:56   ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox