API review

Proposer: Mirza

Present at review:

  • Tully
  • William
  • Dirk
  • Mirza

Question / concerns / comments

Issue in c++ name mangling is not standard across compilers

4 options:

Just open and call known methods in a library

No way to easily introspect a library

Need 1 well known function

  • uses extern c to avoid mangling, poco_build_manifest()
  • Poco poco_build_manifest inserts factories for each class registered by a macro system. connecting class name to factory.
  • two other libraries do the same thing.
  • this require macros declared in one place, standard practice is to put all macros in a single file

current implementation

  • Poco named manifests
    • poco_build_manifest_FOO
    • need the name from the xml files in the manifest

Ioan's approach

  • Create a proxy class
    • library links against it
    • contains registry of plugins
  • In your cpp file you call your macro, the macro creates a constructor, which registers it with the proxy library
  • a static global variable is instantiated to force loading
  • Issues:
    • cleaning up on unload
    • do we do one proxy for all plugins
      • aggregate at pluginlib
  • want to avoid symbol visibility to protect from unload failures
  • possibly a header only implementation

Meeting agenda

To be filled out by proposer based on comments gathered during API review period


  • /!\ We're going to try to continue with Ioan's approach.

  • {x} Might be able to keep API compatiability for pluginlib MACROS, might deprecate one of the arguments as it's now unnecessary. Provides easy migration.

Wiki: pluginlib/Reviews/2012-08-20_API_Review (last edited 2012-08-20 21:00:44 by TullyFoote)