bsdelf / mous

Lightweight audio player & converter for FreeBSD/Linux/macOS
BSD 2-Clause "Simplified" License
71 stars 17 forks source link

Create a Strategy pattern interface for unicode string comparator #5

Open Wang-Yue opened 8 years ago

Wang-Yue commented 8 years ago

Right now Pinyin comparator is hooked into the internal implementation of the player ui. It's better to have a Strategy pattern interface for this purpose. A factory object can generate user defined comparator.

The comparators themselves can be standalone plugins that's hooked into your plugin framework.

Also it's not a good idea to have a huge pinyin table that's built into the player binary. Usually it's done by linking the plugin itself to some i18n library (such as ICU).