Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Future work

These features will be implemented soon:

Projection of iterators

This is very useful, and the B.MI core allows to implement it very easily. This feature will be implemented after the formal review to be able to discuss the best notation for it.

Rearrange Function

Boost.MultiIndex includes some others functions that can be included in the views.

Improved Modify Function

Improve the modify function of the views to be able to call it with a Unary Functor taking a value_type as a parameter.

typedef bimap< int, multiset_of<int> > bm_type;

void modify_relation( bm_type::relation & rel )
{
    rel.right *= rel.left;
}

int main()
{
    bm_type bm;

    ...

    bm.modify( bm.begin(), _right *= _left );

    // or...

    bm.modify( bm.begin(), modify_relation );

    return 0;
}

CompatibleKey functions

Enhance some of the views functions to be able to get compatible key_types as a parameter instead of forcing the conversion. This will improve the performance and allow better inlining for these operations.

Hooking Data

In general, programmers use maps to access information quickly. Boost.Bimap will allow the user to hook data inside the bimap so it is not necessary to maintain another map. This a possible code example:

typedef bimap< int, string, hook_data< string > > bm_type;
bm_type bm;

//...

bm.left_map.data(28928546) = "teacher";
bm.right_map.data("John Gray") = "singer";

bm_type::left_iterator iter = bm.left_map.find(23345647);
iter->data = "programmer";

bm_type::iterator iter = bm.find( bm_type::pair_by<member_at::left>(23345647,"Green Dert") );
iter->data = "student";

bm.insert( bm_type::value_type_by<member_at::left>(1456783342,"Fred Bypass","unemployed") );

More...

With the current informal review, more features will be evaluated.

Copyright © 2006 Matias Capeletto

PrevUpHomeNext