Previous: C++ Union, Up: C++ mappings


6.2.9 Mapping for sequence types

GenoM IDL sequences mapping differ for bounded or unbouded variations of the sequence. The unbounded sequence maps onto a C++ std::vector provided by the C++ standard. The bounded sequences maps onto the specific genom3::bounded_vector class.

For instance, the following IDL:

      typedef sequence<long> unbounded;
      typedef sequence<long,16> bounded;

would map into

      typedef std::vector<int32_t> unbounded;
      typedef genom3::bounded_vector<int32_t, 16> bounded;

The genom::bounded_vector provides the following interface:

      namespace genom3 {
         template<typename T, std::size_t L> struct bounded_vector {
            T e[L];
         };
      }

This minimalistic definition will be refined before the official 3.0 GenoM

release.