Hallo boost interprocess useres,
first of all, many thanks to Ion for his support:
std::auto_ptr segment_ptr is working well and choosing keytype as interprocess::basic_string is working great too. Thank you.
But now, I have stoppend when using map in shared memory in combination:
typedef std::pair ValueType;
where XQQuery* is pointer to object from xqilla X-Query engine: xqilla.sourceforge.net
When I'am creating shared map in one process, I can see the content of the map in second process too.
process one:
mymap->size: 10
first: xqr_full/MW_APS_CPS_APSCreditScoringResult/REQ_BE_CPS_APSCreditScoringResult.xqr, second:0x85665a8
first: xqr_full/MW_APS_CPS_APSCreditScoringResult/RES_BE_CPS_APSCreditScoringResult.xqr, second:0x8c5ba10
first: xqr_full/MW_AccountCreate/REQ_SB_AccountCreate.xqr, second:0x80a5c08
first: xqr_full/MW_AccountCreate/RES_SB_AccountCreate.xqr, second:0x80b6000
first: xqr_full/MW_LoanCreate/REQ_SB_LoanAccountCreate.xqr, second:0x88a9c78
first: xqr_full/MW_LoanCreate/RES_SB_LoanAccountCreate.xqr, second:0x8dfe298
first: xqr_full/MW_ProductFeeGet/REQ_DON_ProductFee.xqr, second:0x8e0eb90
first: xqr_full/MW_ProductFeeGet/RES_DON_ProductFee.xqr, second:0x9620ba8
first: xqr_full/SYM_AccountGetBalance/REQ_MW_AccountBalance.xqr, second:0x97adca8
first: xqr_full/SYM_AccountGetBalance/RES_MW_AccountBalance.xqr, second:0x998ffa8
process two shows the same list..
First value is key basic_string, second is address of XQQuery object.
The problem is, that the XQQuery object is ready to use only in process one, not in process two.
I think, that it could be becouse of another memory adddressing between these two processes. So the second process can not see the XQQuery* objects on
saved adresses. I would like to solve this problem, but I do not exactly know how to do it.
I have found some hint about offse_ptr on address: http://igaztanaga.drivehq.com/interprocess/interprocess/offset_ptr.html
but I do not now, if using offset_ptr will solve this problem. If yes, It will be perfect.
Thank you for any information or example :-)
Have a nice day,
Jan Suchy