EnumBinderBind C++ enums to strings, combo-boxes, arbitrary data structures | |
Download |
EnumBinder Ranking & Summary
Advertisement
- License:
- Freeware
- Publisher Name:
- Warren Stevens
- Publisher web site:
- http://www.codeproject.com/Members/Warren-Stevens
- Operating Systems:
- Windows All
- File Size:
- 22 KB
EnumBinder Tags
EnumBinder Description
The EnumBinder test application provides an easy way to bind C++ enums to strings, combo-boxes, list-boxes, arbitrary data structures. Presents a set of templates and macros that, with a minimal amount of code, will provide a way to:- Associate each enumerator in a C++ enumeration (enum) with strings, and convert between string and enumerator, given either form. - Associate each enumerator in an enum, with an arbitrary set of data (e.g. an int, and a CRect paired to each enumerator). - Iterate (i.e. loop) over the enumeration, in a type-safe and convenient manner (i.e. with a syntax similar to writing a loop for std::vector or CArray). - Bind an enumerator to MFC Comboboxes and Listboxes (with automatic handling of population, selection and DDX). - Automatically self-test the enum declaration, which helps catch copy/paste errors that may have been made when setting up your declaration. Under the hood, the actual work is done by a combination of templates, static member functions (some of which are member templates) static class variables, and macros. I initially attempted to code everything with templates, but by the end of it all, I had to resort to the duct tape of C++ (i.e. macros) to clean up the declarations.
EnumBinder Related Software