Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-04-2005
jvme jvme is offline
Registered User
 
Name: Johan Vermeire
Organization: Vermeire Consulting
Project: ATM software
 
Join Date: Aug 2005
Location: The Flanders
Posts: 3
How to pass complex C++ containers in ICE?

Hi,

I'm relative new in this ICE technology.

I've already implemented an ICE C++ Client/Server model by using
a simple C++ mapping scheme with the Basic Slice Types for the interface definition.

I'm now investigating if it is possible to use more complex C++ containers (for example a list) as Types in the slice definition file.

Is this possible?
Is there any example available which demonstrates such ICE implementation?

Thx,

Johan
Reply With Quote
  #2 (permalink)  
Old 08-04-2005
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 885
Ice for C++ uses a mapping of Slice sequences to STL vectors because a vector is the most general abstraction of a collection, and because a vector is the most efficient in terms of memory overhead and marshaling performance.

If you are using another collection abstraction in your code, such as a set or list, you need to copy the data into a vector for transmission.

You could add a metadata directive to the Slice to allow the sequence mapping to be change to a different type, such as an STL list. However, be aware that, due to the large number of internal memory allocations when populating a list, this would reduce marshaling performance considerably.

Please let us know if you have a commercial need for this feature.

Cheers,

Michi.
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
Passing complex data structures: output parameters or return values? nactyx Help Center 4 07-15-2005 07:17 PM
how to pass/receive value which I dont know at compilation time kovacm Help Center 2 05-10-2005 05:35 PM
A very complex deployment, Does it possible? weixiande Help Center 2 12-12-2004 02:25 AM
bug when pass a class by value damingyipai Bug Reports 2 04-02-2004 02:51 AM
Semantics of pass by value for interface chaukmean Help Center 2 11-27-2003 05:21 AM


All times are GMT -4. The time now is 02:47 PM.


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.