Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space IceMaster and version 3.7.1

...

If the default string converter plug-in does not satisfy your requirements, you can install your own string converters with a pluginplug-in, for example:

Code Block
languagecpp
titleC++
class MyStringConverterPlugin : public Ice::Plugin
{
public:

    MyStringConverterPlugin(const Ice::StringConverterPtr& stringConverter,
                            const Ice::WstringConverterPtr& wstringConverter = 0)
    {
        setProcessStringConverter(stringConverter);
        setProcessWstringConverter(wstringConverter);
    }

    virtual void initialize() {}
    virtual void destroy() {}
};

Like in this example, you should install the string converters in your pluginplug-in's constructor. Do not install the string converters in initialize.

...

  • Define and export a factory function that returns an instance of your plugin class plug-in class.
  • Implement the string converter(s) that you will pass to your pluginplug-in's constructor, or use the ones included with Ice.
  • Package your code into a shared library or DLL.

...