[omniORB] about STL used in omniORB (sorry for last same subject email)

Slava Garelin garelin@ukr.net
Fri Aug 23 08:42:00 2002


On Friday 23 August 2002 07:52, zhang ji wrote:
> Hi,
>
> This question may be not suitble here(sorry for
> that),but I am confused on the results.
>
> I use std::map in one omniORB servlet: below is its
> definition in .h file:
> "
>   struct eqstr
>     {
>         bool operator()(const char* s1, const char*
> s2) const
>         {
>                 return strcmp(s1, s2) == 0;
>         }
>     };
>
>     //Rule is one struct defined in IDL file
>     typedef map<const char*, Rule, eqstr > Rules_Map;

       Really map template can have three type parameters?!

>     Rules_Map rule_map;
>
> "
>
> The adding/removing entity to/from the Rules_Map is
> very simple:
> "
>         mu.lock();
>         pair<Rules_Map::iterator, bool> result =
> rule_map.insert(pair<const char*,Rule>(ru.rulename,ru));

I could not detect a similar variety of an insert. But in any case, the 
insert should return iterator or void depending on parameters of call.


-- 
Slava Garelin