|
Boost : |
From: Darin Adler (darin_at_[hidden])
Date: 2001-12-21 23:07:54
On 12/21/01 6:29 AM, "jan_langer" <jan_at_[hidden]> wrote:
> the lib uses a function to_string which converts between
> basic_strings with different char types and it uses locales,
> use_facet and ctype. now i don't know how to make this portable,
> especially with the use of the boost config macros.
> i think i would be good to take it out of the filesystem stuff.
On deficient platforms, which you can probably detect with one of the
BOOST_NO_XXX macros from Boost.Config, you can probably get away with only
supporting basic_string<char>.
> many standard libs don't support the manipulators left and right
> but i need them. what is the appropriate boost-workaround?
The Boost approach is to either not support deficient compilers, libraries,
and platforms, or to make an alternate implementation for them and
conditionally compile the lesser version when the compiler, library, or
platform is underpowered.
In what sense do you "need" the left and right manipulators? Is there no
workaround?
> the same with stringstreams, i think there are two opportunities:
> use strstream instead
> use the boost macro (but what is the alternative if
> BOOST_NO_STRINGSTREAM is defined)
BOOST_NO_STRINGSTREAM just tells you when <sstream> is not available. It
doesn't tell you what to do. Some Boost libraries have workarounds that use
things like strstream, others omit features.
> i'm not sure if all the names for the attributes are well-chosen
> (eg is_set_uid sounds read only but actually is read/write-able)
>
> another task is to port it to the windows environment. but what
> does it mean? i compiled it with cygwin-g++ and it worked well.
Porting to the Windows environment means making it compile without cygwin.
Using Windows calls rather than POSIX calls.
And it could use Macintosh support. Under OS X the basic Unix implementation
will work for most things, but won't expose any of the Macintosh-specific
file attributes. Under OS 9, we'd need an implementation that used Macintosh
file system calls rather than POSIX calls.
> i put my work in the files section / filesystem directory.
> it would be great if anyone can take a look at it.
I'll look when I return from my vacation (about a week).
> what else is to do on this lib
To go with the flow of the current library, it would be good for the library
to support a well-chosen set of platform-specific attributes. For Unix,
POSIX is a good set. For Windows and Macintosh there are probably others
that are worth supporting.
It would be good to give the library a name that is not so cryptic. Other
Boost libraries have names made up mostly of English words.
This library seems an unlikely candidate for C++ Standard standardization,
at least in part because it can't be built out of the standard C I/O stuff,
and instead requires something platform specific (POSIX, for example).
-- Darin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk