CMapEx is a class derived from the MFC template class "CMap". It is designed to allow the "CompareElements" method which CMap uses at runtime, to be specified via a template parameter rather than via a global function. This approach is much more flexible and allows the way data is stored in the map to be configured at an instance level, rather than the annoying limitation in CMap which due to its design only allows you to control this globally i.e. if you have multiple map instances which happen to store the same types of data, then all of these instances must use the same "CompareElements" method. This is quite a limitation which I have just recently encountered in one of my projects. Finally, please note that there is a std::map class in the C++ runtime which is much more fully featured than the MFC CMap class and you should aim to use this in preference to CMap/CMapEx in all your Visual C++ development work.
Usage |
Copyright |
History |
API Reference |
Contacting the Author |
v1.06 (8 April 2022)
v1.05 (3 May 2020)
v1.04 (12 March 2020)
v1.03 (26 December 2018)
v1.02 (29 April 2017)
v1.01 (21 February 2016)
v1.0 (11 June 2009)
As the class is designed to be a direct replacement for CMap, it provides no new functionality compared to CMap. Please see the CMap documentation for full details on using it. Bear in mind that due to how CMap is itself implemented, CMapEx must re-implement some of CMap's functionality and in the process intentionally hide the CMap base implementation.
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
8 April 2022