Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Custom naming for the managed_external_buffer
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-06-30 05:42:20


Thomas d'Erceville wrote:
>
> Hello,
>
> I'm using a mapped file in order to share my objects between many
> processes and I already have my own kind of key to identify them. So
> instead of linking them to a <char *> in the function construct(), I
> would like to use my own type (providing convenient functions such as
> less(), operator==, ...)
> So I mean, instead of :
> MyObject * my_object = mapped_file.construct<MyObject>("object_name");
>
> I want to known if there is a way to write something like :
> MyKey *object_key*(...)
> MyObject * my_object = mapped_file.construct<MyObject>(*object_key*);
>
> I'm taking a look at the section "Building custom indexes
> <http://www.boost.org/doc/libs/1_39_0/doc/html/interprocess/customizing_interprocess.html#interprocess.customizing_interprocess.custom_indexes>"
> but I am not sure to be able to solve my problem with that.
>
> Could someone confirm?

No, you can't. Interprocess only supports name-based keys.

Best,

Ion


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