Beyond the first simple program, user interface developers soon find that managing the relationships between on screen data elements can be tricky. It is usually helpful to de-couple the application data from the actual window controls, and the result will be a more elegant, easily maintainable design.
UIRepo is a small C++ class constructed using the Standard Template Library (STL). It uses the unordered_map class to store away mixed data items of type bool, int, double, string or wstring. Items are keyed by either int or string, which would normally be the identifiers of the related window controls (but of course any type of data could be stored). UIRepo should give faster data access than searching arrays or lists. It includes optional mutex locks for use in a multi-threaded environment.
Example multi-threaded implementations for wxWidgets and .NET are included in the download.
Features
- In memory repository
- Mixed types
- Supports multi-threading