Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-27-2005
fw_csha fw_csha is offline
Registered User
 
 
Join Date: Sep 2004
Posts: 22
a problem about how to modify a value at the iterator’s current position!

first i define a struct and a sequence in ice file.
struct stCommMess
{
string sUserId;
string sMessage;
};
sequence <stCommMess> seqMessList;

then build a freeze map,UserIdMessageMap, the key_value is string ,and the map_value is seqMessList.

when i would like to modify the map_value ,i have to do like this:

...
UserIdMessageMap::iterator p,
seqMessList b = p->second;
b.push_back(a);//a is object of stCommMess
p.set(b);
....

a simple push_back operate has to do like that ,as a low efficient operate.
is there another method to insert the stCommMess into the map?
Reply With Quote
  #2 (permalink)  
Old 03-01-2005
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 813
Your code is correct, and unfortunately Freeze does not offer a more efficient way to perform such updates. I started an internal discussion on this issue.

Best regards,
Bernard
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to modify server properties on the fly? ymcao_cn Help Center 4 07-26-2006 10:10 PM
IcePatch2 modify hellocyf Patches 3 07-26-2006 01:38 AM
Freeze Map iterator should add operator += n -=n dragzhb Comments 4 10-18-2004 11:48 PM
about Freeze::Map::iterator sylvain Comments 4 07-21-2003 12:28 PM
OpenSSLPluginI.cpp problem on FreeBSD-CURRENT rodrigc Bug Reports 2 05-30-2003 09:54 AM


All times are GMT -4. The time now is 05:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.