This is the ChangeLog for class_loader. Newest items are at the top.

Home page: http://s11n.net/class_loader/


20 Dec 2004:

- Removed the default of 0 from the second arg of
  instantiator::register_factory(), to avoid a
  compile problem when registering abstract base types.


2 Oct 2004:

- Fixed a compile bug in dll_util.hpp.



28 Sept 2004:

- Added dll_util.hpp, pulled in from the s11nbrowser tree.

- Added new demo under src/sample, showing the use of an
  abstract base type in a "driver-style" hierarchy.


31 Aug 2004:

- Minor internal macro fix: cl_CLASSLOADER_UNCONDITIONAL_DEBUG
  wasn't defined when it should have been.


22 Aug 2004:

- Changed configure script to prefer libltdl over libdl,
  because libdl's documentation leaves open the possibility
  for memleaks (i.e., it doesn't specify pointer ownership
  for dlerror()'s return value).

- Added mini-docs for cllite: doc/cllite.lyx.

- Changed default class_path() to prefer CLLITE_CLASSPATH
  before LD_LIBRARY_PATH.

- Removed ${prefix}/lib/libs11n_class_loader from default
  classpath.



21 Aug 2004:

- Releasing in conjunction with the Classloading paper
  i'm about to post to http://s11n.net/papers/


15 Aug 2004:

- Minor touch-ups to the internals.


9 Aug 2004:

- Added cllite::use_exceptions() functions. open_dll() can now optionally
  throw an exception when opening a DLL fails. This results in more
  information about a failure: whether a dlopen() failure happened or the
  DLL was not found. (Previously client code had to do a voodoo ritual to
  determine this.) By default cllite does NOT use exceptions, but it can
  be toggled on with cllite::use_exceptions(true).



23 June 2004:

- Change log lost in a CVS boo-boo.


	
16 June 2004:

- Removed cl_CLASSLOADER_REGISTER5(), since the lib no longer has a
  "mutable namespace".

- Renamed CLASSLOADER_REGISTERX to cl_REGISTERX

- Added macro shortcut:
  cl_CLASSLOADER_ABSTRACT_BASE() --> cl_ABSTRACT_BASE()

- Added cllite_reg.hpp "supermacro".

- Added class_loader<>::class_list().

- class_loader<>::aliases() changed from protected to public.


10 June 2004:

- Added cl::no_namespace_name_transformer, for use with open_dll().

- Fixed the 2-arg version of cllite::open_dll(). It was calling
  itself, resulting in endless recursion.


04 June 2004:

- Default class path changed: removed LD_LIBRARY_PATH and source tree
  from the compile-time default.


02 June 2004:

- No longer using version numbers: using the last-changed date as a
  version, instead.

- path_finder class:
   unsigned ints changed to size_t
   added clear_cache() member function
   removed operators: <<   >>   +

- API docs cleaned up a bit.


0.8.x:

- dll_loader class removed, in favour of the more flexible
  cllite interface.


0.7.1:

- Revoved the .SO-handle-related function[s/ality] from dll_loader,
  since it's never used.

- Added experimental "classname transformer" support to
  class_loader, to allow it to generically take on the job
  of DLL lookup/opening.

- Introducing cllite: a namespace which encapsulates most
  client-side classloading operations, simplifying the
  interface for many common uses. It also shows how clients
  can easily write their own front-ends, hiding their objects
  from the libclass_loader interface.


0.7.0: 7 March 2004

- Some macro/template fixes involving single-argument class
  templates as parameters.

- Fixed a bug where dll_loader would return NULL for valid classes
  if use_shared_instances is true.
  
- Added static load_class() and shared() to dll_loader, to avoid
  the possibility that the wrong classloader if those static
  functions are called using, e.g., a typedef-specified classloader.

- All code except dll_loader.h is known to compile under Windows 
  (MSVC 7.1 tested). class_loader "should" work under Windows, but
  dll_loader definately doesn't yet.

- Added cl_CLASSLOADER_ALIAS(BaseType,String,Alias,X) macro, to allow
  adding aliases alongside normal registrations. It's a bit kludgy,
  but it's easier than creating your own registration functions.

- Minor interface tweaks to accomodate recent changes in libs11n.

- Added cl_CLASSLOADER_ABSTRACT_BASE family of macros to allow
  registration of abstract types as BaseTypes. This has subtle
  implications: please read the docs in class_loader.h.

- Minor fixes to how the debug level is handled.

	
0.6.0: 12 Jan 2003

- Lots of internal twiddling in instantiator and the classloader
  registration process. Definately not bin-compatible with older
  versions.

- Fixed a potential post-main stepping-on-dead-object in
  instantiator::factory_map().

- After reading Herb Sutter's "What's in a Class?" article, got rid of
  class_loader::path() and class_loader::global_path(). Replaced them with
  cl::class_path(), and moved some declarations into dll_loader.h. To be
  clear, class_loader no longer has a path_finder as part of it's
  interface.

	

0.5.2: 6 Jan 2003

- Added class_loader::is_registered(), because some client code needed
  a way to know if they needed to re-register some factories post-main(),
  after the loader's factory map had been destroyed.

- Some build tree refactoring, to facilitate the sharing of this
  project's CVS tree within several different projects.

- Added class_loader-config script, useful for client applications'
  configure scripts to help determine properties of the libclass_loader
  installation. This is generated at configure-time and installed
  under ${prefix}/bin.

- Minor documentation corrections.

- Minor internal changes which don't affect client usage.


0.5.1: 25 Dec 2003

- Just lost the list of changes in a CVS-server-change snafu. :/
  Here's what i remember of it:

- Greatly simplified the internal classloader registration process.
  This removed the need for CLASSLOADER_REGISTER6() and changes the
  meaning of ...5().


0.5.0: 19 Dec 2003

- Added class aliasing support, so you can assign aliases to class names
  without having to register factories for the aliased forms. This applies
  for all KeyTypes, not just strings. See class_loader::alias().

- Replaced context_singleton<> with phoenix<>, an experimental "phoenix"
  type to provide post-main()-safe shared objects. Afterwards, i wrote
  a paper about this approach: see doc/context_classloaders.lyx.

- class_loader::register_subclass<>() now takes an optional second
  argument: a client-side factory for creating the objects, the same
  as register_factory() does.

- Removed the confusing dual meaning of class_loader::path(),
  and moved the global path into class_loader::global_path().

- Added UseSharedInstances support to dll_class_loader.

- Fair warning: UseSharedInstances is under consideration for axing,
  and it's capability *might* be moved into a class_loader subclass
  or policy class.
 
- After much internal fighting over whether the CLASSLOADER_REGISTER
  macros should have a prefix to avoid collisions when building using
  copies of this code from multiple namespaces, i've settled on the
  middle-road: CLASSLOADER_REGISTER is equivalent to:
  NS_CLASSLOADER_REGISTER, where NS is the namespace used to build
  this library. When including multiple versions of the lib
  the first one included will grab the shorthand forms of these macros,
  so clients are encouraged to use the full NS_CLASSLOADER_REGISTER
  form in their code. For projects which use only one copy of this library
  (i.e., the usual case) this is not an issue, and the shorter forms
  are fine.

- Added CLASSLOADER_REGISTER6(): identical to ...5() except that it
  adds the classloader's namespace as the 6th argument.


0.4.1: 8 Dec 2003

- Did away with the bogus change to namespace_CLASSLOADER_REGISTER()
  introduced in the last release. The macros no longer have the
  namespace prefix, just as they did not in versions before 0.4.0.

- fixed an installation bug: config.h wasn't going to the correct
  dir.

- The library's name is now dependent on it's namespace: if the
  default ns is used (cl), it's name is libclass_loader, otherwise
  it is libNAMESPACE_class_loader. This is to allow this lib to co-exist
  in the same LD_LIBRARY_PATH with different namespaces.

- A whole slew of build-related changes.

0.4.0: 1 Dec 2003

- All macros are now prefixed with the library's namespace.
 This unfortunate necessity was brought about by trying to
 compile two copies of this library, from different namespaces,
 into the same application. Since that is valid usage, the
 macros had to be adjusted to accomodate that. Thus
 CLASSLOADER_REGISTER(A,B) becomes cl_CLASSLOADER_REGISTER(A,B),
 unless you use --namespace to change the ns from 'cl' to
 something else.

- Yet more namespace-related code moves. The "real" sources
 now live under lib/cl/src, and those in lib/cl are the
 ns-filtered versions.

- The instantiator class is now a functor (my first one!).



0.3.1: 11 Nov 2003

- Removed all of the arguable MARK_AS_EVIL and dlclose()-related
  code from dll_loader. We now explicitely rely on the OS to clean
  up DLLs when an app closes, as this is the only reliable way
  to keep any potential post-main() destruction issues out of
  this code.

- Removed all code which dlopen()ed the main application,
  as that was legacy stuff from the dll_loader's early days.
  This allowed the removable of dll_loader.cpp.

- Changed the way namespace-changing is handled: we now use
  sed at config-time instead of macros at compile-time because
  if two projects use this same lib with different namespaces,
  the macro approach breaks down into chaos and non-compilability.
  Client usage does not change but lib-side maintenance changes
  significantly (e.g., class_loader.{cpp,h} becomes
  ns.class_loader.{cpp,h}).

- Changed default .a/.so library names to include the namespace.
  This allows multiple projects to use their own copies without
  concern about overwriting other-namespaced versions of the lib.
  Example: libmynamespace_class_loader.{a,so}

- Several documentation fixes and additions.


0.3.0: 6 Nov 2003

- Added support for libltdl: if it is found it is preferred
  over libdl. Hid the dlopen-related code in the new members
  dll_loader::open/close_dll()/dll_error(). (Thanks to Roger
  Leigh, from comp.lang.c++, for introducing me to libltdl!)

- Added optional 3rd template param to class_loader,
  uses_shared_instances. If enabled then load() will always
  return the same instance. See the API docs for load()
  for important info on the implications of using this!

- i just realized CLASSLOADER_REGISTER only supports loaders
  with std::string keys. The fix is:
  that macro works as before, but added CLASSLOADER_REGISTER[1-5]
  (along with an easy pneumonic to remember which to call). These
  allow complete control over key_type, the key, and
  uses_shared_instances. Had to overhaul classloader_registerer
  to handle these changes (but that's invisible to clients,
  anyway).

- minor changes to the instantiator interface.

- removed the demo code from class_loader.cpp and put it
  in cl_demo.cpp.

- added 'faildll' target to lib/cl/Makefile, to demonstrate
  a case where a DLL is not found.


0.2.1:

  - removed the bogus int return value from the
  register_factory() interface. A solution for
  this was provided by Tom from comp.lang.c++
  (many thanks!).

  - expanded build process to allow clients to rename the
  library, and improved the handling of --namespace. (This was
  necessary for libs11n.)

0.2.0: first public release