Re: IO and file path abstraction proposal



Josh MacDonald wrote:
> 
> Recently people have been proposing various abstractions for
> IO and path names.  I will share some work I've already done
> since I think it is appropriate for glib.  Basically I would
> like to see a complete abstraction: simply using "int fd" or
> "FILE*" on UNIX is not good enough because I cannot provide
> an implementation for those abstractions.  I might, for example
> like to access a string file, a file that's in a database,
> or anything else.   Essentially, this proposal is a C-ified
> version of the C++ iostream abstraction (which is a bit bulky
> for my taste, though I've used it extensively).
> 

You might want to take a look at the documentation for NSPR which uses a
system that's very similar to what you're describing here:

http://www.mozilla.org/docs/refList/refNSPR/contents.html

They use a similar vtable based system for abstracting I/O to an opaque
file descriptor.  Specificically, look at the section on I/O Functions.

--Chris

-- 

------------
Christopher Blizzard
http://odin.appliedtheory.com/
------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]