If the default string converter plug-in does not satisfy your requirements, you can implement your own solution with help from the StringConverterPlugin class:

{zcode:cpp}
namespace Ice {
class StringConverterPlugin : public Ice::Plugin {
public:

    StringConverterPlugin(const CommunicatorPtr& communicator, 
                          const StringConverterPtr&,
                          const WstringConverterPtr& = 0);

    virtual void initialize();

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

The converters are installed by the StringConverterPlugin constructor (you can supply an argument of 0 for either converter if you do not wish to install it). The initialize and destroy methods are empty, but you can subclass StringConverterPlugin and override these methods if necessary.

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

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

{zcode}
Ice.Plugin.MyConverterPlugin=myconverter:createConverter ...
{zcode}

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:

{zcode}
Ice.Plugin.MyConverterPlugin.cpp=myconverter:createConverter ...
{zcode}
See Also