Home Help Center

How to pass complex C++ containers in ICE?

jvmejvme Member Johan VermeireOrganization: Vermeire ConsultingProject: ATM software

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?




  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    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.


Sign In or Register to comment.