[Alephmodular-devel] FSSpec beatdown and find_files.h/.cpp
Status: Pre-Alpha
Brought to you by:
brefin
|
From: Br'fin <br...@ma...> - 2003-10-14 19:55:05
|
I've been trying to beat back the use of FSSpecs in AM in all the
places which used them instead of M2's original filedesc.
Right now my biggest tussle is the mechanism used to find files. This
consists of a find_file_pb structure with input and output arguments.
While it can have a buffer of FSSpec returned to the caller of the
associated find_files, the most typical usage skips the buffer, skips
the option for alphabetical sorting, and instead goes with a callback.
The callback takes in a found FSSpec and either a user provided data
structure (rare/never), or a pointer to the associated MacOS specific
catinfo param block of found info. I believe we can get around the
catinfo information with the other info that one can request off of a
CFileDesc.
I'm thinking of making the find_file_pb into a CFindFileParam, though,
for the find operation itself, I'm thinking of pushing that through the
CFileDescFactory (Even if it's an inner-system thing... like
CFindFileParam->find() { CFileDesc_Factory::get_instance.find(*this); }
I'm probably ditching the buffer of answers options (and related flags)
as well as the catinfo option (items that should be known by the
CFileDesc... less optimal perhaps, ah well)
And I'm debating on keeping the callbacks or going with an iterator...
that the calling function can use to call appropriate functions (same
functions, but no longer handled as callbacks...)
-Jeremy Parsons
|