RE: [litwindow-users] Now implemented : Re: <map> as container
Status: Alpha
Brought to you by:
hajokirchhoff
|
From: yrs90 <yr...@ya...> - 2005-04-25 11:55:04
|
Many thanks! My attempt has been stymied the proper form of the <pair>
declaration, but I see you've addressed that. I'll take a look.
Best regards,
Joel
-----Original Message-----
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
---
[This E-mail scanned for viruses by Declude Virus]
|