comp.lang.ada
 help / color / mirror / Atom feed
* set_index and and end_of_file with just a stream reference
@ 2021-02-20 15:26 Mehdi Saada
  2021-02-20 15:35 ` Mehdi Saada
  2021-02-20 16:04 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 14+ messages in thread
From: Mehdi Saada @ 2021-02-20 15:26 UTC (permalink / 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 ?

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-02-23 17:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 15:26 set_index and and end_of_file with just a stream reference Mehdi Saada
2021-02-20 15:35 ` 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

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