[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

C.4.14 New csQueryRegistryOrLoad Function

The function csQueryRegistryOrLoad() has been added to ‘iutil/plugin.h’. This is a convenience function which embodies the common idiom of first querying the object-registry for an object implementing some interface, and then asking the plugin manager to load a plugin supplying the desired object if it was not found in the object-registry. It also registers the object with the object-registry if the plugin manager loads it successfully:

 
csRef<iEngine> engine = csQueryRegistryOrLoad<iEngine> (object_reg,
  "crystalspace.engine.3d");

This document was generated using texi2html 1.76.