[litwindow-users] Now implemented : Re: <map> as container
Status: Alpha
Brought to you by:
hajokirchhoff
From: Hajo K. <mai...@ha...> - 2005-04-25 10:51:53
|
Hi all, I am about to commit changes that allow a map<> to be used with container adapters. In order to use it you must first use a typedef typedef std::map<std::string, int> the_map; then define an aggregate adapter for the pair<string, int> // note: the LWL_.... macros will replace the BEGIN_.... macros // LWL_ stands for Lit Window Library. I've lifted this scheme // from the boost library. LWL_BEGIN_AGGREGATE_NO_COPY(the_map::value_type) PROP(first) PROP(second) LWL_END_AGGREGATE() and finally use IMPLEMENT_ADAPTER_CONTAINER to make the adapter known to the system. IMPLEMENT_ADAPTER_CONTAINER(the_map) Have a look at unittests\containertests.cpp to see how it is used. Expect commit within 30 minutes. Regards Hajo |