|
Boost Users : |
Subject: Re: [Boost-users] Need a solid dictionary/map/query interface
From: Michael Powell (mwpowellnm_at_[hidden])
Date: 2011-09-24 13:12:02
On Sat, Sep 24, 2011 at 11:00 AM, Igor R <boost.lists_at_[hidden]> wrote:
> > A little background, we've got Visual Studio 2008 C++/CLI library through
> > which we'd like to expose a dictionary-mapped data abstraction. We'd like
> to
> > be able to ask some questions about the dictionary mapping, whether for
> its
> > keys, values, or some combination thereof.
> >
> > I've got a strong background in C# particularly with regard to its
> Generic
> > Collections and the Linq area. This is how I'd like to think of the
> > dictionary questions. The rub of course is that the support for C++/CLI
> Linq
> > is rather slim, if at all.
> >
> > Does boost offer something along these lines comparable to Linq?
>
> If you mean sql-like syntax, then the answer is most likely no.
>
Well, not SQL-like exactly. In the C# world, I utilize the Linq extension
methods almost exclusively and find that this meets 90% of our needs. So
even if that had to appear like Where(my_list, () => { /* a lambda */ }),
this would be perfectly fine.
> However, putting syntax aside, MultiIndex offers very powerful and
> flexible facilities. Sometimes you can also combine it with Lambda or
> Phoenix to get some "syntactic sugar", like this:
>
> http://www.boost.org/doc/libs/1_47_0/libs/multi_index/doc/tutorial/basics.html#range
>
May be worth looking into, thanks. For now, I'm going with STL/NET for its
.NET-friendly map<> since I want to map C++/CLI managed classes into the
structure. It's a little more work, but not a lot more work, to get at the
keys and/or values for the questions we want to ask. This requirement may
out-weigh using boost-collections, etc.
Thanks for the response.
______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net