From: stephan b. <st...@s1...> - 2004-12-24 11:33:51
|
On Friday 24 December 2004 03:52, stephan beal wrote: > Just comitted: > > P::System::MimeType - slightly different interface (no file > extensions). Container-friendly, via operator< and operator==. ... > It compiles and links, but is untested. As you probably saw via pclasses-cvs, this is now working. Some notable changes from the p1 code are: - MimeType is now default constructable (will need for serialization). - MimeType is now container-friendly, and can be used as a key. - MimeTypeDb is no longer a singleton, but a shared instance is provided via the conventional instance() interface. i changed this for a couple reasons, but one of them is because there are some cool potential uses for local Mime DBs in other parts of the code (later on) and in client code. - MimeTypeDb no longer reads the system-wide mime db at ctor type. Instead this is delegated to the instance() object - only that object loads mime.types by default. - MimeTypeDb::instance() is now post-main() safe, and the db is repopulated if instance() is called after the shared object has been destroyed post-main(). - Added MimeTypeDb::FileExtensionsMap typedef, plus related functions. File extensions mappings are now done once per MimeType media-subtype combination, instead of once per instance of MimeType. This change made making MimeType container-friendly straightforward, and also eases client-side use of MimeType (IMO). -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |