DDS-PSM-Cxx 1.0b2 FTF Avatar
  1. OMG Issue

DDSPSMC — Getter/Setter for member arrays

  • Key: DDSPSMC-22
  • Legacy Issue Number: 16886
  • Status: closed  
  • Source: Real-Time Innovations ( Sumant Tambe)
  • Summary:

    The specification maps IDL array to C++ native array. There are two possible alternatives as far as getter/setter functions are concerned.

    class Foo {
    char data[10];
    public:
    char * begin_data()

    { return data; }
    char * end_data() { return data + 10; }


    void data(char * begin, char *end) {}


    template <class Iter>
    void data(Iter begin, Iter end) {}
    };


    AND


    class Foo {
    char data[10];
    public:
    char * data() { return data; }

    size_t data_size()

    { return 10; }

    void data(char *ptr, size_t size) {}
    };

    The first version is more consistent with modern C++ usage of iterators. In either case a convention must be defined for portability. This may also be applicable to idl sequences.

  • Reported: DDS-PSM-Cxx 1.0b1 — Fri, 9 Dec 2011 05:00 GMT
  • Disposition: Resolved — DDS-PSM-Cxx 1.0b2
  • Disposition Summary:

    This issue is automatically resolved as a consequence of the new mapping defined for array as result of issue 16261.

  • Updated: Fri, 6 Mar 2015 20:58 GMT