|
Boost Users : |
Subject: [Boost-users] Boost.Interprocess: Can I share the multi_index array between processes?
From: arm2arm (arm2arm_at_[hidden])
Date: 2010-04-06 13:44:09
Hello,
I would like to load multiindex container by one process lets say
serverside_loader. And access that array by another clientside_analyser
process? How to do that?
Lets assume that I have a container:
<code>
struct particleID
{
int ID;// real ID for particle from Gadget2 file "ID" block
unsigned int IDf;// postition in the file
particleID(int id,const unsigned int idf):ID(id),IDf(idf){}
bool operator<(const particleID& p)const { return ID<p.ID;}
unsigned int getByGID()const {return (ID&0x0FFF);};
};
struct ID{};
struct IDf{};
struct IDg{};
typedef multi_index_container<
particleID,
indexed_by<
ordered_unique<
tag<IDf>, BOOST_MULTI_INDEX_MEMBER(particleID,unsigned
int,IDf)>,
ordered_non_unique<
tag<ID>,BOOST_MULTI_INDEX_MEMBER(particleID,int,ID)>,
ordered_non_unique<
tag<IDg>,BOOST_MULTI_INDEX_CONST_MEM_FUN(particleID,unsigned
int,getByGID)>
>
> particlesID_set;
</code>
kind regards
Arman.
-- View this message in context: http://old.nabble.com/Boost.Interprocess%3A-Can-I-share-the-multi_index-array-between-processes--tp28155209p28155209.html Sent from the Boost - Users mailing list archive at Nabble.com.
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