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

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 plug-in's constructor. Do not install the string converters in initialize.

In order to create such a plug-in, you must do the following:

To install your plug-in, use a configuration property like the one shown below:

Ice.Plugin.MyConverterPlugin=myconverter:createConverter ...

The first component of the property value represents the plug-in's entry point, which includes the abbreviated name of the shared library or DLL (myconverter) and the name of a factory function (createConverter).

If the configuration file containing this property is shared by programs in multiple implementation languages, you can use an alternate syntax that is loaded only by the Ice for C++ run time:

Ice.Plugin.MyConverterPlugin.cpp=myconverter:createConverter ...

See Also