...
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 | ||||
---|---|---|---|---|
| ||||
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.
...