Archived
This forum has been archived. Please start a new discussion on GitHub.
How to pass complex C++ containers in ICE?
in Help Center
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
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
0
Comments
-
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.0